Xenpm command
From Xen
Jump to navigationJump to search
xenpm
Xenpm is a userspace tool that can list the power information of available processors and control the power policy according to users' preference. Its name stands for Xen Power Management(xenpm for short).
xenpm usage is as follow
usage: xenpm <command> [args] xenpm command list: get-cpuidle-states [cpuid] list cpu idle info of CPU <cpuid> or all get-cpufreq-states [cpuid] list cpu freq info of CPU <cpuid> or all get-cpufreq-para [cpuid] list cpu freq parameter of CPU <cpuid> or all set-scaling-maxfreq [cpuid] <HZ> set max cpu frequency <HZ> on CPU <cpuid> or all CPUs set-scaling-minfreq [cpuid] <HZ> set min cpu frequency <HZ> on CPU <cpuid> or all CPUs set-scaling-speed [cpuid] <num> set scaling speed on CPU <cpuid> or all it is used in userspace governor. set-scaling-governor [cpuid] <gov> set scaling governor on CPU <cpuid> or all as userspace/performance/powersave/ondemand set-sampling-rate [cpuid] <num> set sampling rate on CPU <cpuid> or all it is used in ondemand governor. set-up-threshold [cpuid] <num> set up threshold on CPU <cpuid> or all it is used in ondemand governor. start start collect Cx/Px statistics, output after CTRL-C or SIGINT.
basically it has four functions:
- Show C-state status with sub-command "get-cpuidle-states"
- Show P-state status with sub-command "get-cpufreq-states"
- Control cpufreq parameter, with sub-command "get-cpufreq-para", "set-scaling-maxfreq", "set-scaling-minfreq", "set-scaling-speed", "set-scaling-governor", "set-sampling-rate", "set-up-threshold"
- Sampling C/P state status in specified period, with sub-command "start"
the first three functions have already been illustrated in the previous cpufreq and cpuidle section, the fourth function aims to provide a overall picture of PM activity in specified period. For example, the follow command measure the C/P activity in 5 minutes
# xenpm start & sleep 5; killall -s SIGINT xenpm Elapsed time (ms): 5028 CPU0: residency percentage C0 59 ms 1.18% C1 0 ms 0.00% C2 56 ms 1.13% C3 4912 ms 97.69% P0 0 ms 0.00% P1 0 ms 0.00% P2 0 ms 0.00% P3 7 ms 100.00% CPU1: residency percentage C0 118 ms 2.36% C1 0 ms 0.00% C2 36 ms 0.73% C3 4873 ms 96.91% P0 0 ms 0.00% P1 0 ms 0.00% P2 0 ms 0.00% P3 63 ms 100.00%