9 PowerTOP Command Reference
The following table provides an overview of the powertop
command and
the options that can be used with it.
Action | Command | Description |
---|---|---|
Run PowerTOP in interactive mode. |
sudo powertop
|
PowerTOP is started in interactive mode with a tabbed interface. Tabs include Overview, Idle stats, Frequency stats, and Tunables. |
Generate an HTML report. |
sudo powertop
--html=filename
|
A HTML report is created in the current directory. If a file name is
not specified, then the default name |
Generate a CSV report. |
sudo powertop
--csv=filename
|
A CSV report is created in the current directory. If a file name is
not specified, then the default name |
Generate HTML reports by running a specified number of tests (iterations) at specified time intervals (seconds) |
sudo powertop --html=filename
--iteration=iterations
--time=seconds
|
A HTML report is created for each iteration. Each HTML file is named
using the name format
filename-yyyyMMdd-hhmmss.html,
for example: |
Generate CSV reports by running a specified number of tests (iterations) at specified time intervals (seconds) |
sudo powertop --csv=filename
--iteration=iterations
--time=seconds
|
A CSV report is created for each iteration. Each CSV file is named
using the name format
filename-yyyyMMdd-hhmmss.csv,
for example: |
Using PowerTOP in Interactive Mode
Use PowerTOP in interactive mode by running the powertop
command
without any options.
To start PowerTOP in interactive mode, run the following command:
sudo powertop
PowerTOP starts in interactive mode with a tabbed interface, with the Overview tab active, as illustrated in the following sample output:
Overview Idle stats Frequency stats Device stats Tunables WakeUp
Summary: 1937.4 wakeups/second, 0.0 GPU ops/seconds, 0.0 VFS ops/sec and 18.2% CPU use
Usage Events/s Category Description
119.9 ms/s 1088.4 Process [PID 52069] /usr/libexec/qemu-kvm...
52.2 ms/s 663.9 Process [PID 52068] /usr/libexec/qemu-kvm -name ...
1.2 ms/s 60.4 Process [PID 1793] /usr/libexec/platform-pyth...
3.5 ms/s 24.7 Timer apic_timer_fn
80.0 µs/s 18.8 Process [PID 962] [xfsaild/dm-0]
60.1 µs/s 18.8 Process [PID 1459] [xfsaild/dm-1]
34.4 µs/s 10.9 Process [PID 15] [rcu_sched]
66.8 µs/s 9.9 kWork kvmclock_update_fn
670.7 µs/s 7.9 Timer tick_sched_timer
...
2.0 pkts/s Device nic:vnet0
1.0 pkts/s Device nic:virbr0
6.8 pkts/s Device Network interface: enp0s5 (virtio_net)
...
By default, the data is refreshed every 20 seconds. To change the refresh rate, press the letter s on the keyboard, enter a new integer value, and then press Enter.
You can navigate between the tabs by using the Tab and Shift+Tab keys, and scroll vertically and horizontally by using the Arrow keys.
The following list summarizes the purpose of each tab in the interactive mode interface.
Overview
The Overview lists processes and components in descending order based on CPU and resource usage. The Overview tab contains the following columns:
-
Usage
Shows the resource usage of each process or component in the system.
Process usage is shown in CPU time allocated per second (for example
119.9 ms/s
) whilst network interface usage is indicated by the rate at which packets are processed (for example2.0 pkts/s
). -
Events/s
The number of wakeup events per second. The higher the number of wakeups, the greater the power consumption.
-
Category
Describes the type of component. For example, a process, timer, or a device.
-
Description
Describes the component. For example, a network interface might be described as follows:
Network interface: enp0s5 (virtio_net)
.
Idle Stats
The Idle stats tab displays the time the CPU components spend in different C-States.
A C-State of C0
corresponds to an active component, whilst all other
C-States, C1
,
C2
...Cn
, correspond to idle
sleep states (the higher the C-number, the deeper the sleep mode). The C-States
available depend upon the processors being used in the system.
The following output provides an example of the type of information displayed:
Pkg(HW) | Core(HW) | CPU(OS) 0 CPU(OS) 64
| | C0 active 0.0% 0.0%
| | POLL 0.0% 0.0 ms 0.0% 0.0 ms
| | C1 0.0% 0.0 ms 0.0% 0.0 ms
C2 (pc2) 52.0% | | C1E 0.0% 0.5 ms 0.0% 0.0 ms
C3 (pc3) 0.0% | C3 (cc3) 0.0% |
C6 (pc6) 0.0% | C6 (cc6) 92.4% | C6 99.9% 59.4 ms100.0% 134.7 ms
C7 (pc7) 0.0% | C7 (cc7) 0.0% |
...
Frequency Stats
The Frequency stats tab displays the frequency statistics for the processor components. Lower frequency statistics can often reflect lower power consumption. The following output provides an example of the type of information displayed:
Package | Core | CPU 0 CPU 64
| | Average 3.2 GHz 1.7 GHz
Idle | Idle | Idle
800 MHz | 800 MHz | 800 MHz
3.40 GHz | 3.40 GHz | 3.40 GHz
| Core | CPU 1 CPU 65
| | Average 1.9 GHz 2.0 GHz
| Idle | Idle
| 800 MHz | 800 MHz
| 3.40 GHz | 3.40 GHz
...
Tunables
The Tunables tab lists power-tuning settings with a status value of Good or Bad. The following output provides an example of the type of information that's displayed:
PowerTOP 2.15 Overview Idle stats Frequency stats Device stats Tunables WakeUp
>> Bad Enable SATA link power management for host1
Bad Enable SATA link power management for host2
Bad Enable SATA link power management for host3
Bad VM writeback timeout
Bad Enable SATA link power management for host0
...
Good Autosuspend for USB device UHCI Host Controller [usb2]
Good Autosuspend for USB device UHCI Host Controller [usb4]
Good Autosuspend for USB device EHCI Host Controller [usb1]
...
To switch between Bad and Good, move the cursor to the setting, using the Arrow keys, and hit the Enter key.
Note:
Changes made in the Tunables tab are only intended for testing purposes, so they are not preserved between reboots.
Wakeup
The WakeUp tab lists devices with their wakeup settings (Enabled or Disabled). The following output provides an example of the type of information displayed:
>> Disabled Wake status for USB device usb3
Disabled Wake status for USB device usb1
Disabled Wake status for USB device 1-1
Disabled Wake status for USB device usb4
Disabled Wake status for USB device usb2
To switch between Disabled and Enabled, move the cursor to the setting using the Arrow keys and hit the Enter key.
Note:
Changes made in the WakeUp tab are only intended for testing purposes, so they are not preserved between reboots.
Using PowerTOP to Generate CSV Reports
Use PowerTOP to generate CSV reports for reporting and data analysis.
To generate a CSV report, run the powertop
command with the
--csv
option. For example, to generate a CSV report called
my_csv_report.csv
in the current directory, run the following
command:
sudo powertop --csv=my_csv_report.csv
If you don't specify a file name, then the report is named
powertop.csv
by default.
You can also use the --iteration
and --time
options
to generate a particular number of reports at a specified interval. For example, to
generate three new CSV reports at a 60 second interval, run the following
command:
sudo powertop --iteration=3 --time=60 --csv=my_csv_report.csv
The output is similar to the following:
...
Loaded 0 prior measurements
RAPL device for cpu 0
RAPL device for cpu 0
...
Preparing to take measurements
Taking 3 measurement(s) for a duration of 60 second(s) each.
PowerTOP outputting using base filename my_csv_report-20250117-135852.csv
PowerTOP outputting using base filename my_csv_report-20250117-135952.csv
PowerTOP outputting using base filename my_csv_report-20250117-140052.csv
...