Thomas Vachuska

Enhanced onos-log and onos-check-logs to work against instance specific logs whe…

…n an optional second argument is given, e.g. onos-log $OC1 c0
......@@ -7,7 +7,10 @@
. $ONOS_ROOT/tools/build/envDefaults
remote=$ONOS_USER@${1:-$OCI}
instance=$2
LOG=$ONOS_INSTALL_DIR/log/karaf.log
[ -n "$instance" ] && \
LOG=$ONOS_INSTALL_DIR/$KARAF_DIST/instances/$instance/data/log/karaf.log || \
LOG=$ONOS_INSTALL_DIR/log/karaf.log
ssh $remote "egrep 'ERROR|Exception' $LOG"
......
......@@ -7,8 +7,11 @@
. $ONOS_ROOT/tools/build/envDefaults
remote=$ONOS_USER@${1:-$OCI}
instance=$2
LOG=$ONOS_INSTALL_DIR/log/karaf.log
[ -n "$instance" ] && \
LOG=$ONOS_INSTALL_DIR/$KARAF_DIST/instances/$instance/data/log/karaf.log || \
LOG=$ONOS_INSTALL_DIR/log/karaf.log
trap "ssh $remote 'ps -ef | grep \"tail -n 512\" | grep -v grep | cut -c10-15 | xargs kill'" EXIT
......