mirror of
https://opendev.org/x/pyghmi
synced 2025-01-14 11:48:33 +00:00
Add Nextscale total power capacity as a sensor
This indicates the sum of power made available by currently installed and functional PSUs. Change-Id: Ic8843cba8f58ce0ec3e6ac62a6c8f9a56374b2a8
This commit is contained in:
parent
461e3dd647
commit
941486e6f8
@ -43,6 +43,11 @@ def fpc_read_psu_fan(ipmicmd, number):
|
||||
return struct.unpack_from('<H', rsp[:2])[0]
|
||||
|
||||
|
||||
def fpc_read_powerbank(ipmicmd):
|
||||
rsp = ipmicmd.xraw_command(netfn=0x32, command=0xa2)
|
||||
return struct.unpack_from('<H', rsp['data'][3:])[0]
|
||||
|
||||
|
||||
fpc_sensors = {
|
||||
'AC Power': {
|
||||
'type': 'Power',
|
||||
@ -64,7 +69,12 @@ fpc_sensors = {
|
||||
'units': 'RPM',
|
||||
'provider': fpc_read_psu_fan,
|
||||
'elements': 6,
|
||||
}
|
||||
},
|
||||
'Total Power Capacity': {
|
||||
'type': 'Power',
|
||||
'units': 'W',
|
||||
'provider': fpc_read_powerbank,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user