How To
Summary
Use new HMC API features to verify the state of the PowerSupplies and FANs of managed systems
Objective
Display PowerSupply and FAN status
Background: The HMC will log an event if a PowerSupply/FAN has a fault, but will not currently CallHome if there are still enough units to maintain the required minimum serviceable number.
Using this utility can display the status of all the PowerSupplies and Fans and provides visibility.
Using this utility can display the status of all the PowerSupplies and Fans and provides visibility.
Environment
Power 8, 9 and 10 using IBM HMC
HMC and Server Versions:
HMC - 8.6 SP2 with PTF MH01716
Server firmware - 860_103
The attached python script has been tested on a RHEL 8.6 System (RHEL on Power)
The python environment needs lxml and request packages to be installed
Tested with Python 3.6, 3.8 and 3.11 with appropriate requests and python-<ver>-lxml packages installed
Steps
Copy the hmc_hwi.py script to a location of choice
Edit the top of the script to point to your Python3 location eg #!/usr/bin/python3.6
chmod the script to be executable eg chmod +x hmc_hwi.py
To run:
hmc_hwi.py : -i | --hmc hmc name (or comma seperated list)
-u | --user hmc user
-p | --password hmc password (if left blank will prompt)
-s | --sysnames system name (or comma seperated list)
-u | --user hmc user
-p | --password hmc password (if left blank will prompt)
-s | --sysnames system name (or comma seperated list)
-i | --hmc can be single hmc or a comma separated list of hmc FQDN or IP addresses
-s | --sysnames can be a single system name or comma separated list of systems to print status for
(the name only has to be a unique part of the Managed System Name, not the entire string)
-s | --sysnames can be a single system name or comma separated list of systems to print status for
(the name only has to be a unique part of the Managed System Name, not the entire string)
rhel8host: /usr/local/scripts/hmc_hwi.py -i mylabhmc.local -u myuser -s myp10 -p Password: SystemName:myp10test
Location FruNum SerialNum State Health Description MemberId
U78D8.ND0.AAA012X-E1 00E5353 YL10SERIAL48 Enabled OK Modular PowerSupply 1000
U78D8.ND0.AAA012X-E2 00E5353 YL10SERIAL57 Enabled OK Modular PowerSupply 1001
U78D8.ND0.AAA012X-E3 00E5353 YL10SERIAL37 Enabled OK Modular PowerSupply 1002
U78D8.ND0.AAA012X-E4 00E5353 YL10SERIAL31 Enabled OK Modular PowerSupply 1003
U78D8.ND0.AAA012X-A1 03FL593 YL10SERIALFU Enabled OK Fan 2103
U78D8.ND0.AAA012X-A1 03FL593 YL10SERIALFU Enabled OK Fan 2104
U78D8.ND0.AAA012X-A2 03FL593 YL10SERIALWU Enabled OK Fan 2105
U78D8.ND0.AAA012X-A2 03FL593 YL10SERIALWU Enabled OK Fan 2106
U78D8.ND0.AAA012X-A3 03FL593 YL10SERIALF8 Enabled OK Fan 2107
U78D8.ND0.AAA012X-A3 03FL593 YL10SERIALF8 Enabled OK Fan 2108
U78D8.ND0.AAA012X-A4 03FL593 YL10SERIALUW Enabled OK Fan 2109
U78D8.ND0.AAA012X-A4 03FL593 YL10SERIALUW Enabled OK Fan 210a
U78D8.ND0.AAA012X-A5 03FL593 YL10SERIALG6 Enabled OK Fan 210b
U78D8.ND0.AAA012X-A5 03FL593 YL10SERIALG6 Enabled OK Fan 210c
Location FruNum SerialNum State Health Description MemberId
U78D8.ND0.AAA012X-E1 00E5353 YL10SERIAL48 Enabled OK Modular PowerSupply 1000
U78D8.ND0.AAA012X-E2 00E5353 YL10SERIAL57 Enabled OK Modular PowerSupply 1001
U78D8.ND0.AAA012X-E3 00E5353 YL10SERIAL37 Enabled OK Modular PowerSupply 1002
U78D8.ND0.AAA012X-E4 00E5353 YL10SERIAL31 Enabled OK Modular PowerSupply 1003
U78D8.ND0.AAA012X-A1 03FL593 YL10SERIALFU Enabled OK Fan 2103
U78D8.ND0.AAA012X-A1 03FL593 YL10SERIALFU Enabled OK Fan 2104
U78D8.ND0.AAA012X-A2 03FL593 YL10SERIALWU Enabled OK Fan 2105
U78D8.ND0.AAA012X-A2 03FL593 YL10SERIALWU Enabled OK Fan 2106
U78D8.ND0.AAA012X-A3 03FL593 YL10SERIALF8 Enabled OK Fan 2107
U78D8.ND0.AAA012X-A3 03FL593 YL10SERIALF8 Enabled OK Fan 2108
U78D8.ND0.AAA012X-A4 03FL593 YL10SERIALUW Enabled OK Fan 2109
U78D8.ND0.AAA012X-A4 03FL593 YL10SERIALUW Enabled OK Fan 210a
U78D8.ND0.AAA012X-A5 03FL593 YL10SERIALG6 Enabled OK Fan 210b
U78D8.ND0.AAA012X-A5 03FL593 YL10SERIALG6 Enabled OK Fan 210c
Additional Information
The script does not sort the results - they are processed as per how the HMC API call sends them.
Future enhancements may include:
- sort on the output based on Managed System Name
Future enhancements may include:
- sort on the output based on Managed System Name
- Flags to display units in Error State only or 1 line Summary
- Dump the entire received HW Inventory per Managed System to a file/human readable for cross checking of HW profiles
- The script name should appear below this as hmc_hwi.py__0.txt please do check back for new versions
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB66","label":"Technology Lifecycle Services"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SSRUTI","label":"HMC FOR POWER"},"ARM Category":[{"code":"a8m0z000000bowEAAQ","label":"Hardware Management Console"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
12 February 2025
UID
ibm17182675