Check PSU Status

Hello,

We have a cluster and each server have 2 PSU.
An alarm should be raised in case of failure so we need to check periodically the PSU status wth a script.

The first idea was to check with ipmitool but this take some time to get the data and we face some other issues now due to that delay.
Using ipmitool we can parse the watt consumption for both supplies of each server and in case is 0 mean the PSU fails.

I was wondering if i can do the same with dmidecode which is executed faster.
I tried the following two commands but the problem is that i see only one PSU information.

#  dmidecode -t 39
# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0079, DMI type 39, 22 bytes
System Power Supply
        Power Unit Group: 1
        Location: To Be Filled By O.E.M.
        Name: To Be Filled By O.E.M.
        Manufacturer: To Be Filled By O.E.M.
        Serial Number: To Be Filled By O.E.M.
        Asset Tag: To Be Filled By O.E.M.
        Model Part Number: To Be Filled By O.E.M.
        Revision: To Be Filled By O.E.M.
        Max Power Capacity: Unknown
        Status: Present, OK
        Type: Switching
        Input Voltage Range Switching: Auto-switch
        Plugged: Yes
        Hot Replaceable: No
        Input Voltage Probe Handle: 0x0075
        Cooling Device Handle: 0x0077
        Input Current Probe Handle: 0x0078
#
#  dmidecode -t chassis
# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0003, DMI type 3, 22 bytes
Chassis Information
        Manufacturer: empty
        Type: Hand Held
        Lock: Not Present
        Version: empty
        Serial Number: empty
        Asset Tag: empty
        Boot-up State: Safe
        Power Supply State: Safe
        Thermal State: Safe
        Security Status: None
        OEM Information: 0x00000000
        Height: Unspecified
        Number Of Power Cords: 1
        Contained Elements: 0
        SKU Number: To be filled by O.E.M.
#

Any idea?

Thanks in advance

Some hardware manufacturers (if not all) include their own set of tools for a specific server type (if it's not bundled with the OS you can download it from their respective sites).

ProLiant servers have hplog which can give you a deep understanding of the status of all PSUs.

Dell servers, on the other hand, have omreport which works in a similar fashion.

The information reported by dmidecode is vendor-independent and filled out by the manufacturer (usually by hand). So if the manufacturer choses to specify that the serial number is �0000001� or even an empty value, there�s nothing you can do to fix that since DMI information is stored in a read-only chip (some manufacturers are lazier than others when writing the DMI table)