Caching IPMI data

August 10, 2012
I just discovered there's a dump-to-cache option when executing ipmitool.
It sure speeds things up by a factor of ~10 in my case.

Dump sdr to a file called ipmi.cache


# time ipmitool -H 192.168.10.181 -U someuser -P somepass sdr dump ipmi.cache
Dumping Sensor Data Repository to 'ipmi.cache'

real    0m5.422s
user    0m0.004s
sys     0m0.016s

Without cache


# time ipmitool -H 192.168.10.181 -U someuser -P somepass sdr type Temp
/PS0/TEMP_FAULT  | 27h | lnc | 10.0 | 0 unspecified
/PS1/TEMP_FAULT  | 36h | lnc | 10.1 | 0 unspecified
...

real    0m7.476s
user    0m0.007s
sys     0m0.017s

With cache


~# time ipmitool -S ipmi.cache -H 192.168.10.181 -U someuser -P somepass sdr type Temp
/PS0/TEMP_FAULT  | 27h | lnc | 10.0 | 0 unspecified
/PS1/TEMP_FAULT  | 36h | lnc | 10.1 | 0 unspecified
...

real    0m0.763s
user    0m0.001s
sys     0m0.001s