From: Duncan L. <du...@ic...> - 2006-01-26 21:43:43
|
Eric A. Hall wrote: > That's what I'm using now, with regex pulling out the name and value. This > works pretty well actually since it gives me something stiff to measure > against (I can catch errors through the absence of vertical bar > characters, for example). > > What I am requesting is to provide an additional parameter to that > command, so that I can request a single sensor. > > The first question is whether or not that would actually make anything > take less time. Is there support in the IPMI protocol for fetching a > single sdr or do you ahve to pull them all? If the latter then there won't > be any extra efficiency introduced. > > Yes and no... The actual Get Sensor Reading IPMI command does just take a sensor number (from the second column in the sdr output) and return a reading for that sensor. However given the flexibility of the IPMI spec this isn't guaranteed to be unique for different record types. The only truly "unique" key for a sensor is its identifier string, and the only way to do a lookup based on that is to read the SDR until found. If you're feeling adventurous you can try the CVS source and use the new "sensor reading" command that I just added. When used together with the SDR cache and even CSV output format (with -c) it should make for relatively fast and easy readings to parse: # ipmitool -S cache.sdr -c sensor reading "CPU" CPU,39 # ipmitool -S cache.sdr -c sensor reading "FAN 1" FAN 1,8000 -duncan |