Utils reading power meter using IPMI DCMI and recording value into a round-robin database (rrd).
readpower
- reads IPMI power meterpushover $title $message
- pushes arbitrary message to my phone using Pushovercheckpower
- reads power meter, writes the value into rrd and reports overage using Pushoverinit-rrd.sh
- creates a round-robin database at/opt/power.rrd
Export $PUSHOVER_TOKEN
and $PUSHOVER_USER
to set UID and API token.
Run checkpower
every 1 sec by calling watch -n 1 -- checkpower
.
To collect data and draw a graph, use rrdtool graph
. An example is given here:
sudo rrdtool graph ./power-trace.png \
-a PNG \
-s -300s \
-t 'Past 5 mins' \
-w 600 -h 200 \
DEF:watts=/opt/power.rrd:watts:AVERAGE \
AREA:watts#00C000