zpwr - Retrieve power readings
![]()
Use zpwr to retrieve power readings of a partition and central processor complex (CPC) on an IBM® Z or IBM LinuxONE server.
Partition readings include CPU, storage and I/O power readings. It specifies the number of units allocated to the configuration at the time that the reading was taken. CPC readings include total, unassigned resources and infrastructure power readings.
Power reading units are automatically presented in a human readable format, whereas complex formats like JSON, csv, json-seq, pairs display the power readings in microwatts.
CPC power readings require authorization for the LPAR. Enable the required authorization by setting Global Performance Data in the LPAR's activation profile.
If the power readings cannot be retrieved, the power readings return an empty string or null in complex formats, and the power readings are not displayed in human-readable format.
zpwr syntax
- -d or --delay <number>
-
retrieves power readings after a specified delay in seconds elapsed.
- -c or --count <number>
- sets the number of power readings.
The
-coption can be used only in conjunction with the-sor-doptions. - -s or -- stream
- retrieves power readings in stream mode. A new power reading is displayed after an interval has elapsed since the last power reading request. The interval is automatically calculated in stream mode.
The
-sand-doptions are mutually exclusive. - --format
- retrieves power readings in these formats: JSON, csv, json-seq or pairs. If no format is specified, the output defaults to the human readable format.
When the format is JSON, csv, json-seq or pairs, the power readings are displayed in microwatts.
- -h or --help
- displays help information for the command. To view the man page, enter man zpwr.
- -v or --version
- displays version information.
Output columns
- Iteration
- Iteration number of the current power readings. If the power reading is requested before the time interval has elapsed, cached power readings might be returned. The iteration number helps to determine whether the cached power readings are provided.
- Time
- The time at which power readings were taken, expressed in human readable format.
- Time epoch
- The time at which power readings were taken, expressed in epoch time.
- sec
- The number of seconds elapsed since the Unix epoch.
- nsec
- The number of nanoseconds elapsed since the last full seconds.
- Update interval
- The time interval in nanoseconds after which new power readings are available. If the power reading is requested before the time interval has elapsed, cached power readings might be returned.
- CPU
- CPU power reading of a partition.
- Storage
- Storage power reading of a partition.
- I/O
- I/O power reading of a partition.
- Total
- The number of units for all electrical and mechanical components of the system.
- Unassigned Resources
- The number of units for all types of resources in the standby state or reserved state at the time the reading was taken.
- Infrastructure
- The number of units for all subsystems in the CPC that do not provide CPU, storage or I/O resources to partitions.
Examples
# zpwr LPAR CPU: 140.00 W LPAR Storage: 1.72 W LPAR I/O: 40.00 W CPC Total: 15.40 kW CPC Unassigned Resources: 7.48 kW CPC Infrastructure: 5.31 kW Update interval: 10.00 s
# zpwr --format json --delay 10 --count 2Example output:
{
"meta": {
"api_level": "1",
"version": "2.36.0-build-20250107",
"host": "lpar001",
"time_epoch": "1736316898",
"time": "2025-01-08 07:14:58+0100"
},
"zpwr": [
{
"iteration": "0",
"time": "2025-01-08 07:14:58+0100",
"time_epoch_sec": "1736316898",
"time_epoch_nsec": "10935887",
"update_interval": "10000000000",
"lpar": [
"cpu": "140000000",
"storage": "1719200",
"io": "40000000"
],
"cpc": [
"total": "15406000000",
"unassigned_resources": "7578848100",
"infrastructure": "5283946300"
]
},
{
"iteration": "1",
"time": "2025-01-08 07:15:08+0100",
"time_epoch_sec": "1736316908",
"time_epoch_nsec": "11113153",
"update_interval": "10000000000",
"lpar": [
"cpu": "140000000",
"storage": "1719200",
"io": "40000000"
],
"cpc": [
"total": "15401000000",
"unassigned_resources": "7569928400",
"infrastructure": "5284866000"
]
}
]
}
# zpwr --format csv --stream
"iteration","time","time_epoch_sec","time_epoch_nsec","update_interval","cpu","storage","io", /n "total","unassigned_resources","infrastructure" "0","2025-01-08 07:17:05+0100","1736317025","592784684","10000000000","143000000","1708200","40000000", /n "15550000000","7659162700","5337186700" "1","2025-01-08 07:17:15+0100","1736317035","592937261","10000000000","143000000","1708200","40000000", /n "15533000000","7650389100","5328960300"