RAID batteries - time to replace?

Stephen Dowdy sdowdy at ucar.edu
Fri Aug 24 13:15:55 CDT 2012


Aaron McKinnon wrote, On 08/24/2012 11:38 AM:
> This is the magic incantation:
> 
> omconfig storage controller controller=X action=exportlog
... 
> T23:    *** BATTERY CAPACITY INFORMATION ***
> T23:    Relative State of Charge  : 95 %
> T23:    Absolute State of Charge  : 45 %
> T23:    Remaining Capacity        : 761 mAh
...

> The absolute charge needs to be above 55% or it needs replaced.

Thanks, Aaron,

If that's the case, then for those who use megacli (instead of
OMSA)... the following will do the trick:

    # megacli adpbbucmd GetBbuCapacityInfo a0                   
                                         
    BBU Capacity Info for Adapter: 0

    Relative State of Charge: 98 %
--> Absolute State of charge: 81 % <--
    Remaining Capacity: 1447 mAh
    Full Charge Capacity: 1490 mAh
    Run time to empty: Battery is not being discharged 
    Average time to empty: Battery is not being discharged 
    Average Time to full: Battery is not being charged 
    Cycle Count: 34
    Max Error: 2 %
    Remaining Capacity Alarm: 180 mAh
    Remaining Time Alarm: 10 Min

So, something like:

    bbugood() { [ $(megacli adpbbucmd GetBbuCapacityInfo ${1:-a0} | sed -ne '/^[aA]bsolute/{s/^[^[:digit:]]*\([[:digit:]]\+\).*$/\1/p}') -gt 54 ] ;}
(note that trusting LSI's megacli output to be a particular
alphabetic case, or spacing or formatting to remain consistent from
release to release isn't a good idea)

could be used in any automated (nagios/big-brother) tests. e.g.:

    bbugood a2 && echo "OK" || echo "FAIL"

(though adding in the check for isSOHGood=yes would be useful as well)

--stephen
-- 
Stephen Dowdy  -  Systems Administrator  -  NCAR/RAL
303.497.2869   -  sdowdy at ucar.edu        -  http://www.ral.ucar.edu/~sdowdy/



More information about the Linux-PowerEdge mailing list