Programs that read IPMI sensors tell you subtly different things
In my first installment, I talked
about how I had started out reading IPMI
sensors using ipmitool,
or more specifically the command '
ipmitool sensor', which took
too long on some of our machines. I then discovered that ipmi-sensors'
ran quite fast on all our machines and appeared to give us the same
information, so I was going to switch to it. Unfortunately it turned
out that ipmi-sensors doesn't give us all of the information that
ipmitool does. Fortunately I was able to find an ipmitool
command that did run fast enough for the sensors we really care
ipmitool -c sdr list full'. The 'full' is important, and
doesn't actually seem to mean what you'd think.
Based on this Sun/Oracle documentation,
the important and unclear arguments to '
ipmitool sdr list' are
full', which really means 'temperature, power, and fan sensors'
compact', which really means 'failure and presence sensors'
(which I think '
ipmitool sensor' will call 'discrete'). On some
of our Dell servers, reading all of the various 'discrete' sensors
can take some time, while reading only the temperature, power, and
fan sensors runs fast enough.
Ipmitool and ipmi-sensors give the same information on a lot of sensors. However, on at least some sensors ipmitool appears to be reading additional information. For instance, on one machine ipmi-sensors reports PSUs and fans as:
ID,Name,Type,Reading,Units,Event [...] 3,Power Supply 1,Power Supply,N/A,N/A,'Presence detected' [...] 13,Fan 1,Fan,N/A,N/A,'transition to Running'
Ipmitool's 'sdr list' reports the same PSU and fan as:
Power Supply 1,200,Watts,ok,10.1,Presence detected Fan 1,39.20,percent,ok,7.1,Transition to Running
Ipmitool is somehow extracting additional readings from the IPMI that tell it the PSU wattage and the fan speed, where for some reason the ipmi-sensors standard sensor reading gives it nothing. Not all IPMI sensors need this extra information extracted (or perhaps have it), so for many of them ipmi-sensors can supply a reading (and it matches what ipmitool reports).
(The obvious assumption is that this extra reading is also why ipmitool is much slower than ipmi-sensors when reporting on some sensors on some IPMIs. My guess would be that doing the extra reading of those specific sensors is extra-slow.)
If I knew enough about how IPMIs worked and how you communicated with them, I would probably understand more of what the difference was between what the two programs are doing. As it is, I'm just thankful that I've found a way to read all of the important IPMI sensors that's fast enough. I do find it a little frustrating that the ipmitool manpage is so uninformative, and that the ipmi-sensors and ipmitool manpages seem to describe what they do the same way (at least to a non-specialist) despite clearly doing things somewhat differently.