ipmitool interface to check warning led status?

Ryan Cox ryan_cox at byu.edu
Mon Sep 12 13:09:18 CDT 2011


I usually use ipmitool for lots of things but found that SNMP works well 
for this.  I don't remember off the top of my head what the return 
values are, but "3" is healthy.

Here is some random line noise (from a bash script) that I hacked 
together a while back.  It has a function for getting blade status as 
well as the chassis status of a Dell M1000e.  It has been tested with 
M610's and M910's.  Hopefully it's at least somewhat intelligible.  
There were some oddities in a few things, if I remember right, that I 
don't feel like looking up at the moment which are the cause of some of 
the interesting "|" and "||" parts.  The code below correctly handles 
all of them and hasn't failed us yet with >900 blades over the year the 
script has been in use.  Let me know if you have any questions.

Hope this helps.

Ryan Cox

================================================

function checkchassis {
     local retval=$(/opt/net-snmp/bin/snmpwalk -M 
/root/dell_mibs:/usr/share/snmp/mibs -c public -v2c "$1" 
DELL-RAC-MIB::drsChassisStatusGroup 2>/dev/null |grep Curr |egrep -v 
'drsGlobalCurrStatus|Blade' |grep -q critical && echo 5 || echo 3)
     if (($retval==3))
     then
         return
     fi
     # ...
     # code to add the problem to a database
}

function checkblade {
     local retval=$(/opt/net-snmp/bin/snmpget -t 1 -r 1 -M 
/root/dell_mibs:/opt/net-snmp/share/snmp/mibs -m 
/root/dell_mibs/rac_host.mib -c public -v2c -O qve $1-idrac 
DELL-RAC-MIB::drsGlobalSystemStatus.0 2>/dev/null || echo -n '3')
     local slot=$(/opt/net-snmp/bin/snmpget -t 1 -r 1 -M 
/root/dell_mibs:/opt/net-snmp/share/snmp/mibs -m 
/root/dell_mibs/rac_host.mib -c public -v2c -O qve $1-idrac 
DELL-RAC-MIB::drsProductSystemSlot.0 2>/dev/null || echo -n 'FAIL')
         #slot already has double quotes around it
     if [[ "$slot" != "FAIL" ]]
     then
         # track location of the host in case it accidentally gets swapped
         # ...
         # code to set the location of the blade in the chassis to a 
database
     fi
     if (($retval!=3))
     then
         # ...
         # code to add the problem to a database
     fi
}

================================================

On 08/22/11 15:03, Howard Powell wrote:
> I am writing a small php-generated website to monitor a rack of equipment in a remote room.  One of the things I've been able to do successfully is get ipmitool to query the ambient and/or internal operating temperatures of each server in my rack and display these as hover overs on the website.
>
> One feature I'd love to add is a quick green or yellow/red "dot" on the page that reflects the status of the chassis warning LED on the front or back of the server.
>
> I've found that I can query the delloem sysinfo part of ipmitool and get a status, but in some cases an event that generates an error in the system (such as a watchdog reset) will trigger the blinking LED but still shows up as status: ok in ipmitool.
>
> Another attempt was to read the sel list and try to grab anything that's not "normal", but there are situations where the LED is blue while a warning is in the sel (such as ambient temp warnings that are now OK).
>
> Can anyone suggest an ipmi sensor that I can query with ipmitool (from OpenIPMI) that might give me a more accurate idea of what state the system is in (or as it may be, what color the led is indicating)?
>
> Thanks!
> Howard
>
>
>
> Howard Powell
> hbp4c at virginia.edu
>
>
>
>
>
>
> _______________________________________________
> Linux-PowerEdge mailing list
> Linux-PowerEdge at dell.com
> https://lists.us.dell.com/mailman/listinfo/linux-poweredge

-- 
Ryan Cox
Systems Administrator
Fulton Supercomputing Lab
Brigham Young University

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.us.dell.com/pipermail/linux-poweredge/attachments/20110912/abc0ed25/attachment.html 


More information about the Linux-PowerEdge mailing list