Community
cancel
Showing results for 
Search instead for 
Did you mean: 
place__Gals
Beginner
328 Views

How can I get CPU power consumption for SkyLake ?

Hi,

 

I'm looking for a tool or some source code (VC/VB) that would enable me to watch CPU power consumption on an HP server

(HP ProLiant DL380 Gen 10 - CentOS7 , 2 X SkyLake CPUs).

So far no success,

Only tool I've found names s-tui can monitor one CPU only (the first one),

All the other monitoring tools do not show CPU real time power consumption in watts. (NetData etc...)

 

 

Anyone ?

 

Thanks a lot,

G.

0 Kudos
4 Replies
Greg_S
Beginner
328 Views

Typically I would suggest turbostat, but it is kernel version specific and a quick search suggests Skylake was not added until 4.1. Assume your CentOS 7 is running an old 3.x kernel?

Power is not difficult to calculate via the RAPL energy counters. Userland access was added in kernel 3.13 via /sys/class/powercap/intel-rapl/intel-rapl:0/. The file "energy_uj" exposes the CPU energy usage in microjoules. (Unsure how it is exposed per socket, but assume it is via multiple paths/files.) Take a couple of samples (with a known delay in between) and convert to watts.

The "msr-tools" package provides rdmsr as an alternative approach (requires root). The latter requires reading MSR PKG_ENERGY_STATUS scaled by MSR RAPL_POWER_UNIT (for the energy unit) and then divided by elapsed time for watts. The longer/more-accurate your sample-to-sample time, the less jitter and higher accuracy but with more averaging. 

Thomas_W_Intel
Employee
328 Views

Might pcm-power be the tool that you are looking for? It is part of the "Processor Counter Monitor" on github, and provides the necessary routines to translate RAPL energy counters to Joules. 

McCalpinJohn
Black Belt
328 Views

The /sys/class/powercap devices support SKX and CLX in CentOS 7.6.   I don't think this interface worked in CentOS 7.4 (and we skipped 7.5).

Our CentOS7.6 kernel is 3.10.0-957.27.2.el7.x86_64

gu__zhixiang
Beginner
328 Views

Take a look at likwid -powermeter, it might be the toolset you are looking for, it's super easy to use.

 

Reply