2. Power operations

This section describes power management operations using the CLI, GUI, REST, IPMI and Redfish interfaces.

2.1. BMC command line

You can use the ipum-utils command to control power. Table 2.1 lists the available commands.

Table 2.1 Power control options

Parameter

Description

power_hardoff

Immediately turn off power for the IPU and gateway domains, without saving state

power_softoff

Save state and turn off power for the IPU and gateway domains

power_hardreset

Safely turn power off and on for all power domains including the connector domain

power_on

Turn on power for the IPU and gateway domains

powercap

Show the current power cap setting

To reboot the BMC, use the Linux reboot command.

You can set a limit on the power used by the system with the powercap command, as described below.

$ powercap -h
Usage: powercap
--get-pcap     | -g: Read current power cap from MCP47FEB DAC
--user-pcap    | -p: Print user power cap config setting
--set-pcap     | -s: Set power cap to the specified value in range [600-2600] Watts. Only writes to MCP47FEB DAC volatile registers.
--force-pcap   | -f: Force power cap to the specified value in range [600-2600] Watts. Updates MCP47FEB DAC and and user configs.

Running ipum-utils powercap with no options will display the current setting.

2.2. GUI

You can use the GUI to perform power operations. The operations available in the GUI are described in Table 2.2. The user interface for these operations is shown in Fig. 2.1 and Fig. 2.2.

Table 2.2 GUI power operations

Command

Description

Immediate shutdown

Immediately turn off power for the IPU and gateway domains, without saving state

Orderly shutdown

Save state and turn off power for the IPU and gateway domains

Cold reboot

Immediate shutdown followed by power on

Warm reboot

Orderly shutdown followed by power on

Power On

Turn on power for the IPU and gateway domains

_images/gui-power-operations.png

Fig. 2.1 GUI: IPU-M2000 power operations

_images/gui-reboot-bmc.png

Fig. 2.2 GUI: BMC reboot page

To manage power consumption in the GUI, select Manage Power Usage under the Server Control tab (see Fig. 2.3).

_images/power-usage.png

Fig. 2.3 GUI: manage power use

The accepted power cap range is between 600 to 2600 Watts (AC).

2.3. 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 2.3 describes the available commands.

Table 2.3 Power operations using REST interface

Command

Description

Hard power off

Immediately turn off power for the IPU and 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 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 openbmtool.py command available. You can use the “soft power off” and “power on” commands instead.

Power on

Turn on power for the IPU and 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> chassis bmc reset

You can manage power consumption using the REST interface with the commands in Table 2.4.

Table 2.4 Power consumption management using REST interface

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

2.4. IPMI

Table 2.5 describes the ipmitool power-related commands that are available.

Table 2.5 Power operations using IPMI interface

Command

Description

Hard power off

Immediately turn off power for the IPU and 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 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 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 2.6.

Table 2.6 Power consumption management using IPMI interface

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

Disable power cap

Disable power capping

$ ipmitool -I lanplus -C 3 -p 623 -U <bmcuser> -P <bmcpass> -H <bmcip> dcmi power activate
Power limit successfully activated

Enable power cap

Enable power capping

$ ipmitool -I lanplus -C 3 -p 623 -U <bmcuser> -P <bmcpass> -H <bmcip> dcmi power deactivate
Power limit successfully deactivated

2.5. Redfish

You can see the supported power operations at https://<bmcip>/redfish/v1/Systems/system. Table 2.7 describes the power operations.

Table 2.7 Power operations using Redfish interface

Command

Description

Hard power off

Immediately turn off power for the IPU and 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 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 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>