#Lee Kirkpatrick (RSA)
#June 2015


#Grab the Log Stats for now and output to file
NwConsole -c login localhost:50002 admin netwitness -c decoder logStats | grep device | sed 's/device=//g;s/source=//g;s/count=//g' | awk -F " " '{print $2,$4,$5}' > EPS1.csv



#Grab the Log Stats 60 seconds later and output to file
sleep 60
NwConsole -c login localhost:50002 admin netwitness -c decoder logStats | grep device | sed 's/device=//g;s/source=//g;s/count=//g' | awk -F " " '{print $2,$4,$5}' > EPS2.csv



#EPS2 - EPS1 / 60 gives EPS for 60 seconds
awk '{b=$3;getline<f;$3-=b}1' f=EPS2.csv EPS1.csv | awk -F " " '{print $1 "\t" $2 "\t" $3/60}' | column -t