Thomas Vachuska | 0249b53 | 2015-02-20 16:46:18 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Scrapes intent performance numbers from the remote ONOS log file. |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| 7 | . $ONOS_ROOT/tools/build/envDefaults |
| 8 | |
Claudine Chiu | 45312d0 | 2016-06-15 13:17:12 +0000 | [diff] [blame] | 9 | nodes=$(env | sort | egrep "^OC[0-9]+" | cut -d= -f2) |
Thomas Vachuska | 0249b53 | 2015-02-20 16:46:18 -0800 | [diff] [blame] | 10 | |
| 11 | for node in $nodes; do |
| 12 | echo "fetching from ${node}..." |
| 13 | ssh $ONOS_USER@${node} " |
| 14 | grep 'Throughput: OVERALL=' $ONOS_INSTALL_DIR/log/karaf.log \ |
| 15 | | sed 's/ | INFO .*\: OVERALL=/|/;s/\; INSTALL_REQ=.*//;s/\; CURRENT=/|/' | cut -c12- |
| 16 | " > ${node}.perf.log |
| 17 | done |