root@rb3zf01(Si):/cpt/vince $ python3.12 /cpt/vince/hmc_hw.py -i <HMC-NAME> -u hscroot
Traceback (most recent call last):
File "/cpt/vince/hmc_hw.py", line 41, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
Hello Vincencio,
thanks for sharing the script.
I believe the issue is simply that the script is written for:
#!/usr/bin/python3.6
but you're running it with Python 3.12. The requests module is therefore missing in the 3.12 environment.
You can either:
• Run it with Python 3.6 (if available):
/usr/bin/python3.6 hmc_hw.py -i <HMC-NAME> -u hscroot -p
or
• Install the required modules for Python 3.12:
python3.12 -m pip install requests lxml
Note that lxml is also required and the script will fail without it.
Unfortunately I don't have access to a Power11 system, so testing in that environment is a bit difficult on my side - I'm relying on your feedback there.
Let me know how it goes.
Best regards,
Abbas
------------------------------
Abbas Meeran
------------------------------
Original Message:
Sent: Sun February 08, 2026 07:29 AM
From: Abbas Meeran
Subject: IBM HMC Script for Power Supply & Fan Status – Validated on Power10 Enterprise Systems
while read hmc frame; do
python3.10 hmc_hw.py -i "$hmc" -u hscroot -s "$frame" -p
done < hmc_frame_list.txt
I think we can use some for loop to get all details but my end having limited edition
------------------------------
Abbas Meeran
Original Message:
Sent: Sun February 08, 2026 07:20 AM
From: Vincencio Michaelis
Subject: IBM HMC Script for Power Supply & Fan Status – Validated on Power10 Enterprise Systems
i have a list of HMC.....so can i scan all HMC in a loop ? What is -i hmcimp ???? I want simply call your script with HMC names because keys for hscroot are exchanged
------------------------------
Vincencio Michaelis
Senior Expert
Bosch
Stuttgart
+4915119154774
Original Message:
Sent: Sun February 08, 2026 07:13 AM
From: Abbas Meeran
Subject: IBM HMC Script for Power Supply & Fan Status – Validated on Power10 Enterprise Systems
Thanks for your feedback
python3.6 hmc_hw.py -i hmcip -u hscroot -s frame-server -p ( i didnt tried on power11, please check and share the feedback please)
------------------------------
Abbas Meeran
Original Message:
Sent: Sun February 08, 2026 07:01 AM
From: Vincencio Michaelis
Subject: IBM HMC Script for Power Supply & Fan Status – Validated on Power10 Enterprise Systems
Hello Abbas
really great job you did and i think it is very useful !!!!!! what do i need to run this phyton ??? Do i need a list of HMC scanning for Fans etc ? I have a Power 11 if you want we can workout together to extend your python to P11 !!??? Again...great job my friend !
thx a lot
vince
------------------------------
Vincencio Michaelis
Senior Expert
Bosch
Stuttgart
+4915119154774
Original Message:
Sent: Sun February 08, 2026 02:00 AM
From: Abbas Meeran
Subject: IBM HMC Script for Power Supply & Fan Status – Validated on Power10 Enterprise Systems
I would like to share a useful IBM HMC REST-based Python script that retrieves real-time Power Supply and Fan hardware inventory and health status across managed systems. This has been successfully tested and validated on enterprise-grade Power10 (P10) systems.
This script provides:
Power Supply FRU number, serial number, state, and health
Fan status and redundancy visibility
System-level hardware inventory via REST API
Key Benefits for Our Operations
This is especially valuable for:
✅ Power switching and PSU failover testing
✅ Verifying active/standby PSU behavior during maintenance
✅ Confirming hardware redundancy and health before and after activities
✅ Proactive detection of degraded or failed components
Location FruNum SerialNum State Health Description MemberId
U78D8.ND0.FGD05QQ-E1 03KP586 YL10KF493341 Enabled OK Modular PowerSupply 1000
U78D8.ND0.FGD05QQ-E2 03KP586 YL10KF493575 Enabled OK Modular PowerSupply 1001
This approach gives us better validation evidence during PS testing compared to manual HMC checks and can be easily automated or integrated into pre/post maintenance workflows.
Note: Verified on RHEL8.X(8.10) and RHEL9.X(9.7) from python (3.6-3.9) working fine
------------------------------
Abbas Meeran
------------------------------