| # ----------------------------------------------------------------------------- |
| # Checks the logs of the remote ONOS instance and makes sure they are clean. |
| # ----------------------------------------------------------------------------- |
| $(basename $0) [node] ['old'] |
| - [node] : The node whose logs to inspect. The default is \$OCI. |
| - ['old'] : If 'old' is specified, the logs are simply searched for errors |
| and exceptions, and they are displayed. |
| Checks the logs of the remote ONOS instance and makes sure they are clean. |
| [ "$1" = "-h" ] && __usage && exit 0 |
| [ ! -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* |
| if [ "$2" = "old" ]; then |
| ssh $remote "egrep 'ERROR|Exception|Error' $LOG" |
| [ "'`uname`'" != "'"Linux"'" ] && alias tac='tail -r' |
| BEGIN { off = 0; fail = 0; } |
| / org.apache.karaf.main.lock.SimpleFileLock lock/ { |
| /^[a-zA-Z0-9.]*(Exception|Error)/ { |