Monitoring CPU Sleep States

Posted on

With a "normal" Linux node, I can use cpupower monitor or turbostat to monitor sleep states and other metrics to understand some deeper CPU performance characteristics.

I believe I can use the Node Tuning Operator to configure node-level parameters such as which sleep states a CPU is allowed to enter, etc. However, I can't find any information about how to monitor which sleep states a CPU is or has been in. Is this possible, short of loading cpupower/turbostat onto a CoreOS node via MachineConfig and doing something a bit more hacky?

I've tried running cpupower and turbostat on my OpenShift nodes, but neither are installed by default.

I can see certain sleep state configuration, but can't see how to monitor it natively.

$ cat /sys/module/intel_idle/parameters/max_cstate
$ for state in state{0..3} ; do echo c-$state `cat $state/name` `cat $state/latency` ; done
c-state0 POLL 0
c-state1 C1 2
c-state2 C1E 10
c-state3 C6 133