Debianにipmitoolを入れてmuninで監視
Dellサーバの温度測定のためにipmitoolを入れる。
apt-get install ipmitool
modconf で kernel/drivers/char/ipmi の ipmi_devintf と ipmi_si を組み込む。
/etc/rc.boot/ipmi
#!/bin/bash mknod --mode=644 /dev/ipmi0 c `grep ipmi /proc/devices |awk '{print $1;}'` 0
/etc/munin/plugins/ipmi
#!/bin/bash if [ "$1" = "autoconf" ]; then if [ -e /dev/ipmi0 ]; then echo yes exit 0 else echo no exit 1 fi fi if [ "$1" = "config" ]; then echo 'graph_title CPU Temperature' echo 'graph_args --base 1000 -l 0' echo 'graph_vlabel temperature' echo 'graph_category Temperature' echo 'graph_info This graph monitors the CPU temperature' echo 'cpu1.label cpu1 temp' echo 'cpu1.info cpu1 temperature' echo 'cpu2.label cpu2 temp' echo 'cpu2.info cpu2 temperature' exit 0 fi /usr/bin/ipmitool -c sdr list full 2>/dev/null | awk -F , 'BEGIN {cpu=1;} /ESM CPU [0-9]/ {print "cpu" cpu ".value " $2; cpu++;}'
グラフ生成部分はもう少し真面目に書いた方がいい。