Commit 78696f59 authored by Mike Hibler's avatar Mike Hibler

Make it work for new APC power controllers.

parent 7ba90d35
#!/bin/sh
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005 University of Utah and the Flux Group.
# Copyright (c) 2005-2009 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -16,11 +16,11 @@ tac=/usr/site/bin/tac
if [ $# -eq 0 ]; then exit 1; fi
host=$1
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'`
temp=`echo "$line" | sed -n -e 's/.*, \([0-9][0-9]*\.*[0-9]*\)F$/\1/p'`
temp=${temp:-'0.0'}
power=`echo $line | sed -n -e 's/.*, \([0-9][0-9]*\.*[0-9]*\)W, .*/\1/p'`
power=`echo "$line" | sed -n -e 's/.*, \([0-9][0-9]*\.*[0-9]*\)W, .*/\1/p'`
power=${power:-'0.0'}
current=`echo $line | sed -n -e 's/.*: \([0-9][0-9]*\.*[0-9]*\)A, .*/\1/p'`
current=`echo "$line" | sed -n -e 's/.*: \([0-9][0-9]*\.*[0-9]*\)A, .*/\1/p'`
current=${current:-'0.0'}
echo $temp degrees F
......
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