blob: 8d698b1afadd220b3eff0df849803dea2848654a [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
9nodes=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2)
10
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