Commit 499f4e50 authored by Mike Hibler's avatar Mike Hibler

Little adaptor we used to parse powermon output for feeding into cricket

for power/current/temp graphs.  Not installed by the makefile.
parent 979733cd
if [ $# -eq 0 ]; then exit 1; fi
line=`tac /usr/testbed/log/powermon.log | grep $host: | head -1`
temp=`echo $line | sed -n -e 's/.*, \([0-9][0-9]*\.*[0-9]*\)F$/\1/p'`
power=`echo $line | sed -n -e 's/.*, \([0-9][0-9]*\.*[0-9]*\)W, .*/\1/p'`
current=`echo $line | sed -n -e 's/.*: \([0-9][0-9]*\.*[0-9]*\)A, .*/\1/p'`
echo $temp degrees F
echo $power Watts
echo $current Amps
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment