The Cisco FRU Power Supply vendor certification calculates Time in Bad State as follows:
Percent Time in Bad State from the vendor certification:
<Expression destAttr="PctTimeInBadState">snmpConstArrayMap(cefcFRUPowerOperStatus,{0,100,0,100,100,100,100,100,100,0,100,100,0})</Expression>
The snmpConstArrayMap function maps a value (index) to a set of constant values (array). If necessary, this function rounds the input value to nearest integer value. Then, it uses the integer value as an index to the set of constant values (array) that are shown as c0, c1, up to cn -1. The c values must be integers. This function checks these values when the expression is parsed and returns c
x. If the value is not in the domain from 0 to n-1 (inclusive), the result is 0 (without an error message). Use this function to certify devices.
Actual OID polled from the Cisco FRU Power Supply vendor certification
<Attribute name="cefcFRUPowerOperStatus" type="Long">
<Documentation />
<IsKey>false</IsKey>
<NeedsDelta>false</NeedsDelta>
<Source>1.3.6.1.4.1.9.9.117.1.1.2.1.2</Source>
</Attribute>
The cefcFRUPowerOperStatus returns values 1-12 that map to states as follows:
1:offEnvOther
2:on
3:offAdmin
4:offDenied
5:offEnvPower
6:offEnvTemp
7:offEnvFan
8:failed
9:onButFanFail
10:offCooling
11:offConnectorRating
12:onButInlinePowerFail
The MIB values for the power supply returned a value of 8 which indicates failed as noted above.