blob: 401737e405433dc75550ebf574bf25e5dcd4d62a [file] [log] [blame]
Thomas Vachuska0249b532015-02-20 16:46:18 -08001#!/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 Chiu45312d02016-06-15 13:17:12 +00009nodes=$(env | sort | egrep "^OC[0-9]+" | cut -d= -f2)
Thomas Vachuska0249b532015-02-20 16:46:18 -080010
11for 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
17done