Actions
Feature #9104
closedsmbios(1M) should display PSU info
Start date:
2018-02-13
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
To test the case where we had a bad table, I went back and used mdb to lie about the table structure size and said it was 5 bytes. this resulted in an error:
... > 8069d0b/v 5 0x8069d0b: 0x16 = 0x5> :c failed to read power supply information: Structure table is shorter than expected ID SIZE TYPE 142 105 SMB_TYPE_POWERSUP (type 39) (system power supply) Manufacturer: SUPERMICRO Product: PWS-1K28P-SQ Version: 1.3 Serial Number: P1K28CG11PB0291 Asset Tag: N/A Location Tag: System Power Supply #2 Part Number: PWS-1K28P-SQ mdb: stop at smbios_info_powersup mdb: target stopped at: libsmbios.so.1`smbios_info_powersup: pushl %ebp
To test the normal path I decoded the PSU information in four different five different smbios binary images from different generations of systems. Example output:
[root@haswell /var/tmp/smbios]# ./smbios.proc ./MS934130.out -t 39 ID SIZE TYPE 141 105 SMB_TYPE_POWERSUP (type 39) (system power supply) Manufacturer: SUPERMICRO Product: PWS-1K28P-SQ Version: 1.3 Serial Number: P1K28CG11PB0292 Asset Tag: N/A Location Tag: System Power Supply #1 Part Number: PWS-1K28P-SQ Power Supply Group: 1 Maximum Output: 1280 mW Characteristics: 0x2 SMB_POWERSUP_F_PRESENT (PSU is present) Input Voltage Range Switching: 4 (auto-switch) Status: 3 (OK) Type: 4 (switching) ID SIZE TYPE 142 105 SMB_TYPE_POWERSUP (type 39) (system power supply) Manufacturer: SUPERMICRO Product: PWS-1K28P-SQ Version: 1.3 Serial Number: P1K28CG11PB0291 Asset Tag: N/A Location Tag: System Power Supply #2 Part Number: PWS-1K28P-SQ Power Supply Group: 2 Maximum Output: 1280 mW Characteristics: 0x2 SMB_POWERSUP_F_PRESENT (PSU is present) Input Voltage Range Switching: 4 (auto-switch) Status: 3 (OK) Type: 4 (switching) ID SIZE TYPE 143 182 SMB_TYPE_POWERSUP (type 39) (system power supply) Manufacturer: To be filled by O.E.M. Product: To be filled by O.E.M. Version: 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. Location Tag: System Power Supply #3 Part Number: To be filled by O.E.M. Power Supply Group: 3 Maximum Output: unknown Characteristics: 0x0 Input Voltage Range Switching: 2 (unknown) Status: 2 (unknown) Type: 2 (unknown) ID SIZE TYPE 144 182 SMB_TYPE_POWERSUP (type 39) (system power supply) Manufacturer: To be filled by O.E.M. Product: To be filled by O.E.M. Version: 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. Location Tag: System Power Supply #4 Part Number: To be filled by O.E.M. Power Supply Group: 4 Maximum Output: unknown Characteristics: 0x0 Input Voltage Range Switching: 2 (unknown) Status: 2 (unknown) Type: 2 (unknown) [root@haswell /var/tmp/smbios]# ./smbios.proc ./pa.out -t 39 smbios.proc: failed to load SMBIOS: No such file or directory [root@haswell /var/tmp/smbios]# ./smbios.proc ./pa.smbios -t 39 ID SIZE TYPE 9984 82 SMB_TYPE_POWERSUP (type 39) (system power supply) Manufacturer: DELL Product: PWR SPLY,750W,RDNT,DELTA Serial Number: CN179725A56ZCI Part Number: 0V1YJ6A00 Power Supply Group: 0 Maximum Output: 750 mW Characteristics: 0x3 SMB_POWERSUP_F_HOT (PSU is hot-replaceable) SMB_POWERSUP_F_PRESENT (PSU is present) Input Voltage Range Switching: 2 (unknown) Status: 2 (unknown) Type: 2 (unknown) ID SIZE TYPE 9985 82 SMB_TYPE_POWERSUP (type 39) (system power supply) Manufacturer: DELL Product: PWR SPLY,750W,RDNT,DELTA Serial Number: CN179725A56ZCD Part Number: 0V1YJ6A00 Power Supply Group: 0 Maximum Output: 750 mW Characteristics: 0x3 SMB_POWERSUP_F_HOT (PSU is hot-replaceable) SMB_POWERSUP_F_PRESENT (PSU is present) Input Voltage Range Switching: 2 (unknown) Status: 2 (unknown) Type: 2 (unknown) [root@haswell /var/tmp/smbios]# ./smbios.proc ./haswell.smbios -t 39 ID SIZE TYPE 65 182 SMB_TYPE_POWERSUP (type 39) (system power supply) Manufacturer: To Be Filled By O.E.M. Product: To Be Filled By O.E.M. Version: 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. Location Tag: To Be Filled By O.E.M. Part Number: To Be Filled By O.E.M. Power Supply Group: 1 Maximum Output: unknown Characteristics: 0x2 SMB_POWERSUP_F_PRESENT (PSU is present) Input Voltage Range Switching: 4 (auto-switch) Status: 3 (OK) Type: 4 (switching) Voltage Probe Handle: 61 Cooling Device Handle: 63 Current Probe Handle: 64
Updated by Electric Monk about 4 years ago
- Status changed from New to Closed
git commit 32ece1f96d76b7ae0165091c2bc2a3cdce36971b
commit 32ece1f96d76b7ae0165091c2bc2a3cdce36971b Author: Robert Mustacchi <rm@joyent.com> Date: 2018-05-24T17:13:14.000Z 9104 smbios(1M) should display PSU info 9105 smbios(1M) processor table info can be confusing Reviewed by: Tim Kordas <tim.kordas@joyent.com> Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Richard Lowe <richlowe@richlowe.net>
Actions