[SWDEV-520665] Add support for board voltage (#303)

* Add the API and CLI to show the board voltage. 

---------

Change-Id: Icb25bd653bb1d004704b5a21b378ca31b2b242c7
Signed-off-by: Arif, Maisam <Maisam.Arif@amd.com>
Signed-off-by: AL Musaffar, Yazen <Yazen.ALMusaffar@amd.com>
This commit is contained in:
Liu, Shuzhou (Bill)
2025-05-29 19:55:08 -04:00
committed by GitHub
parent 13148c5d8e
commit 970560fc7c
11 changed files with 69 additions and 22 deletions
+2
View File
@@ -874,6 +874,7 @@ class AMDSMIParser(argparse.ArgumentParser):
ecc_help = "Total number of ECC errors"
ecc_blocks_help = "Number of ECC errors per block"
pcie_help = "Current PCIe speed, width, and replay count"
voltage_help = "GPU voltage"
# Help text for Arguments only on Linux Baremetal platforms
fan_help = "Current fan speed"
@@ -939,6 +940,7 @@ class AMDSMIParser(argparse.ArgumentParser):
metric_parser.add_argument('-P', '--pcie', action='store_true', required=False, help=pcie_help)
metric_parser.add_argument('-e', '--ecc', action='store_true', required=False, help=ecc_help)
metric_parser.add_argument('-k', '--ecc-blocks', action='store_true', required=False, help=ecc_blocks_help)
metric_parser.add_argument('-V', '--voltage', action='store_true', required=False, help=voltage_help)
# Options that only apply to Hypervisors and Baremetal Linux
if self.helpers.is_hypervisor() or (self.helpers.is_baremetal() and self.helpers.is_linux()):