IPMI Power Sensors
Views:
A little script to help gather power statistics off of linux boxes see IPMI Thermal Sensors about the sdr cache.
#!/bin/sh
# 2010-01-11
# Outputs one line per sensor.
# Sensor Data Repository cache to improve performance
# generate cache with "ipmitool sdr dump <filename>"
SDR_CACHE=/var/cache/ipmitool/sdr
case $1 in
amps)
ID=10
PATTERN="^PS[[:digit:]] AC Current"
;;
watts)
ID=10
PATTERN="^PS[[:digit:]] .* Power"
;;
--help)
echo "Usage: $(basename $0) <amps|watts>"
exit 0
;;
*)
echo "Unsupported Sensor" 1>&2
exit 1
;;
esac
