blob: 611d6d7b0be09de266bdff1d5d4d5f9dcb6cedec [file] [log] [blame]
#!/bin/bash
#-------------------------------------------------------------------------------
# Monitors remote ONOS log file.
#-------------------------------------------------------------------------------
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults
remote=$ONOS_USER@${1:-$OCI}
LOG=$ONOS_INSTALL_DIR/log/karaf.log
ssh $remote "
while true; do
[ ! -f $LOG ] && sleep 2 && continue
tail -n 512 --follow=name $LOG --sleep-interval 2
done
"