Linux Command Library
commands
Commands
basic
Basic
tips
Tips

cpufreq-aperf

Calculates the average frequency over a time period

- Start calculating, defaulting to all CPU cores and 1 second refresh interval:
sudo cpufreq-aperf

- Start calculating for CPU 1 only:
sudo cpufreq-aperf -c [1]

- Start calculating with a 3 seconds refresh interval for all CPU cores:
sudo cpufreq-aperf -i [3]

- Calculate only once:
sudo cpufreq-aperf -o

cpufreq-aperf [options]

On latest processors exist two MSR registers refered to as:
- MPERF increasing with maxium (P0) frequency in C0
- APERF increasing with current/actual frequency in C0

From this information the average frequency over a time period can be calculated and this is what this tool does.

A nice falloff feature beside the average frequency is the time a processor core remained in C0 (working state) or any CX (sleep state) processor sleep state during the measured time period. This information can be determined from the fact that MPERF only increases in C0 state.

-c --cpu <CPU>

The <CPU> core to measure - default all cores.

-i --interval <seconds>

Refresh rate - default 1 second.

-o --once

Exit after one interval.

-h --help

Prints the available options.

The msr driver must be loaded for this command to work.

Thomas Renninger <trenn@suse.de>

cpufreq-set(1), cpufreq-info(1)

play store download app store download
Imprint
Sonnenallee 29, 12047 Berlin, Germany
e-mail: sschubert89@gmail.com

Privacy policy
Successfully copied