3. Power operations
This section describes power management operations using the CLI, REST, IPMI and Redfish interfaces.
3.1. BMC command line
You can use the ipum-utils
command to control power. Table 3.1 lists the available commands.
Parameter |
Description |
---|---|
|
Immediately turn off power for the IPU and IPU-Gateway domains, without saving state |
|
Save state and turn off power for the IPU and IPU-Gateway domains |
|
Safely turn power off and on for all power domains including the connector domain |
|
Turn on power for the IPU and IPU-Gateway domains |
|
Show the current power cap setting |
To reboot the BMC, use the Linux reboot
command.
3.1.1. Power cap operations
The power used by a system can be limited (capped) using a ceiling imposed by the powercap
utility.
Depending on the state of the machine, different values might take effect:
By default, the power cap is set to 1700 watts on Bow-2000, and 1500 watts on IPU-M2000.
Bow-2000 can be configured to be power cap compatible with IPU-M2000, if compatibility mode is enabled. In this case, the power will be limited to 1500 watts.
The power consumption of the machine can be capped with a user-defined value between 600 and 2600 watts. This value takes precedence over default and compatibility configurations.
In case of a power-supply unit (PSU) failure, power will be limited to a user-defined value if PSU failure capping is enabled. This value takes precedence over default, compatibility and user settings.
When a thermal trip is detected, a power cap of 600 watts will be applied automatically until the system recovers, taking precedence over all other power cap values.
You can use the powercap
command to adjust the power cap settings, as shown below:
Configuration of custom power cap values
In order to set the power cap to a custom value, the
user mode
must be enabled. This can be accomplished using thepowercap set user enabled
command. The power cap value can be adjusted withpowercap set user value
. The active user settings can be listed using thepowercap get user
command.$ powercap get user User Powercap Settings: * Value: 1500W * Enabled: false $ powercap set user enabled 1 $ powercap set user value 1650 $ powercap get user User Powercap Settings: * Value: 1650W * Enabled: true
Activation and deactivation of Bow-2000 power cap compatibilty mode
$ powercap set compatibility enabled 1 $ powercap get compatibility Compatibility Mode: * Enabled: true $ powercap set compatibility enabled 0 $ powercap get compatibility Compatibility Mode: * Enabled: false
Configuration of psu failure power cap
$ powercap get psufailure PSU Failure Powercap: * Value: 1500W * Enabled: false $ powercap set psufailure enabled 1 $ powercap set psufailure value 1100 $ powercap get psufailure PSU Failure Powercap: * Value: 1100W * Enabled: true
Readout of the active power cap value that was written to the hardware registers
$ powercap get dac MCP47FEB DAC: * Capped output power: 1380W * Capped input power: 1500W
3.2. REST API
You can perform power operations through the REST API either by sending
curl
queries to the URI or by using the Graphcore openbmctool.py
utility.
Table 3.2 describes the available commands.
Command |
Description |
---|---|
Hard power off |
Immediately turn off power for the IPU and IPU-Gateway domains, without saving state |
$ curl -k -H "Content-Type: application/json" -X PUT -d '{"data":"xyz.openbmc_project.State.Chassis.Transition.Off"}' https://<bmcuser>:<bmcpass>@<bmcip>/xyz/openbmc_project/state/chassis0/attr/RequestedPowerTransition
$ python3 openbmctool.py -H <bmcip> -U <bmcuser> -P <bmcpass> chassis power hardoff
|
|
Soft power off |
Save state and turn off power for the IPU and IPU-Gateway domains |
$ curl -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.State.Host.Transition.Off"}' https://<bmcuser>:<bmcpass>@<bmcip>/xyz/openbmc_project/state/host0/attr/RequestedHostTransition
$ python3 openbmctool.py -H <bmcip> -U <bmcuser> -P <bmcpass> chassis power softoff
|
|
Warm reboot |
Soft power off followed by power on |
$ curl -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.State.Host.Transition.Reboot"}' https://<bmcuser>:<bmcpass>@<bmcip>/xyz/openbmc_project/state/host0/attr/RequestedHostTransition
No direct |
|
Power on |
Turn on power for the IPU and IPU-Gateway domains |
$ curl -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.State.Host.Transition.On"}' https://<bmcuser>:<bmcpass>@<bmcip>/xyz/openbmc_project/state/host0/attr/RequestedHostTransition
$ python3 openbmctool.py -H <bmcip> -U <bmcuser> -P <bmcpass> chassis power on
|
|
BMC reboot |
Reboot the BMC |
$ curl -k -H "Content-Type: application/json" -X PUT -d '{"data":"xyz.openbmc_project.State.BMC.Transition.Reboot"}' https://<bmcuser>:<bmcpass>@<bmcip>/xyz/openbmc_project/state/bmc0/attr/RequestedBMCTransition
$ python3 openbmctool.py -H <bmcip> -U <bmcuser> -P <bmcpass> bmc reset
|
You can manage power consumption using the REST interface with the commands in Table 3.3.
Command |
Description |
---|---|
Power cap status |
Get current settings |
$ python3 openbmctool.py -H <bmcip> -U <bmcuser> -P <bmcpass> chassis chassis pcap -g
Attempting login...
Chassis PowerCap State: {'PowerCap': 2400, 'PowerCapEnable': False}
User root has been logged out
|
|
Set power cap |
Set new power cap value |
$ python3 openbmctool.py -H <bmcip> -U <bmcuser> -P <bmcpass> chassis pcap -s <600-2600>
Attempting login...
Attempting to disable power cap ...
User root has been logged out
|
|
Disable power cap |
Disable power capping |
$ python3 openbmctool.py -H <bmcip> -U <bmcuser> -P <bmcpass> chassis pcap -d
|
3.3. IPMI
Table 3.4 describes the ipmitool
power-related commands that are
available.
Command |
Description |
---|---|
Hard power off |
Immediately turn off power for the IPU and IPU-Gateway domains, without saving state |
$ ipmitool -I lanplus -C 3 -p 623 -U <bmcuser> -P <bmcpass> -H <bmcip> power off
|
|
Soft power off |
Save state and turn off power for the IPU and IPU-Gateway domains |
$ ipmitool -I lanplus -C 3 -p 623 -U <bmcuser> -P <bmcpass> -H <bmcip> power soft
|
|
Warm reboot |
Soft power off followed by power on |
$ ipmitool -I lanplus -C 3 -p 623 -U <bmcuser> -P <bmcpass> -H <bmcip> power reset
|
|
Power on |
Turn on power for the IPU and IPU-Gateway domains |
$ ipmitool -I lanplus -C 3 -p 623 -U <bmcuser> -P <bmcpass> -H <bmcip> power on
|
|
BMC reboot |
Reboot the BMC |
$ ipmitool -I lanplus -C 3 -p 623 -U <bmcuser> -P <bmcpass> -H <bmcip> bmc reset cold
|
You can manage power consumption using the IPMI interface with the commands in Table 3.5.
Command |
Description |
---|---|
Power cap status |
Get current settings |
$ ipmitool -I lanplus -C 3 -p 623 -U <bmcuser> -P <bmcpass> -H <bmcip> dcmi power get_limit
Current Limit State: No Active Power Limit0
Exception actions: Hard Power Off & Log Event to SEL
Power Limit: 2200 Watts
Correction time: 0 milliseconds
Sampling period: 0 seconds
|
|
Set power cap |
Set new power cap value |
$ ipmitool -I lanplus -C 3 -p 623 -U <bmcuser> -P <bmcpass> -H <bmcip> dcmi power set_limit limit 2100
Current Limit State: No Active Power Limit0
Exception actions: Hard Power Off & Log Event to SEL
Power Limit: 2100 Watts
Correction time: 0 milliseconds
Sampling period: 0 seconds
|
|
Enable power cap |
Enable power capping |
$ ipmitool -I lanplus -C 3 -p 623 -U <bmcuser> -P <bmcpass> -H <bmcip> dcmi power activate
Power limit successfully activated
|
|
Disable power cap |
Disable power capping |
$ ipmitool -I lanplus -C 3 -p 623 -U <bmcuser> -P <bmcpass> -H <bmcip> dcmi power deactivate
Power limit successfully deactivated
|
3.4. Redfish
You can see the supported power operations at
https://<bmcip>/redfish/v1/Systems/system
.
Table 3.6 describes the power operations.
Command |
Description |
|
---|---|---|
Hard power off |
Immediately turn off power for the IPU and IPU-Gateway domains, without saving state |
|
$ curl -k -H "X-Auth-Token: <token>" -X POST https://${bmcip}/redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "ForceOff"}' -u <bmcpass>:<bmcuser>
|
||
Soft power off |
Save state and turn off power for the IPU and IPU-Gateway domains |
|
$ curl -k -H "X-Auth-Token: <token>" -X POST https://${bmcip}/redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulShutdown"}' -u <bmcpass>:<bmcuser>
|
||
Warm reboot |
Soft power off followed by power on |
|
$ curl -k -H "X-Auth-Token: <token>" -X POST https://${bmcip}/redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' -u <bmcpass>:<bmcuser>
|
||
Power on |
Turn on power for the IPU and IPU-Gateway domains |
|
$ curl -k -H "X-Auth-Token: <token>" -X POST https://${bmcip}/redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "ForceOn"}' -u <bmcpass>:<bmcuser>
|