intel / pcm Goto Github PK
View Code? Open in Web Editor NEWIntel® Performance Counter Monitor (Intel® PCM)
License: BSD 3-Clause "New" or "Revised" License
Intel® Performance Counter Monitor (Intel® PCM)
License: BSD 3-Clause "New" or "Revised" License
Hello,
I'm trying to create a prometheus.io exporter for opcm, starting with specifically pcm-memory.x
.
It'd be good to have a option to silence this bit of the output:
Processor Counter Monitor: Memory Bandwidth Monitoring Utility ($Format:%ci ID=%h$)
This utility measures memory bandwidth per channel or per DIMM rank in real-time
Number of physical cores: 32
Number of logical cores: 64
Number of online logical cores: 64
Threads (logical cores) per physical core: 2
Num sockets: 2
Physical cores per socket: 16
Core PMU (perfmon) version: 4
Number of core PMU generic (programmable) counters: 4
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 2100000000 Hz
Package thermal spec power: 125 Watt; Package minimum power: 69 Watt; Package maximum power: 264 Watt;
Socket 0: 2 memory controllers detected with total number of 6 channels. 3 QPI ports detected.
Socket 1: 2 memory controllers detected with total number of 6 channels. 3 QPI ports detected.
Hi, I am trying to build WinMSR with sdk=V10, and ndk10, but then I got the following error. Can anyone explain why? Any help is much appreciated.
Generating Code...
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /Zi /nologo /W3 /WX- /Od /D WIN32 /D _
DEBUG /D _WINDOWS /D _USRDLL /D PCM_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Z
c:wchar_t /Zc:forScope /Zc:inline /Fo"x64\Debug\\" /Fd"x64\Debug\vc140.pdb" /Gd /TP /errorReport:queue dllmain.cpp
dllmain.cpp
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /AI"C:\Program Files (x86)\Reference A
ssemblies\Microsoft\Framework\.NETFramework\v4.0" /AI"C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfig
uration\Neutral" /Zi /clr /nologo /W3 /WX- /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D PCM_EXPORTS /D _WINDLL /D
_UNICODE /D UNICODE /Gm /EHa /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"x64\Debug\\" /Fd"x64
\Debug\vc140.pdb" /Gd /TP /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\msco
rlib.dll" /errorReport:queue /clr:nostdlib ..\PCM_Win\restrictDriverAccess.cpp
cl : Command line error D8016: '/clr' and '/Gm' command-line options are incompatible [E:\github\pcm\PCM-Lib_Win\PCM-Li
b.vcxproj]
While using secure boot, PCM returns zeros, but perf still works.
1.000132123 1.67 MiB uncore_imc_1/cas_count_read/
2.000226366 0.91 MiB uncore_imc_1/cas_count_read/
3.000350818 2.66 MiB uncore_imc_1/cas_count_read/
4.000489773 2.84 MiB uncore_imc_1/cas_count_read/
|---------------------------------------||---------------------------------------|
|-- Socket 0 --||-- Socket 1 --|
|---------------------------------------||---------------------------------------|
|-- Memory Channel Monitoring --||-- Memory Channel Monitoring --|
|---------------------------------------||---------------------------------------|
|-- NODE 0 Mem Read (MB/s) : 0.00 --||-- NODE 1 Mem Read (MB/s) : 0.00 --|
|-- NODE 0 Mem Write(MB/s) : 0.00 --||-- NODE 1 Mem Write(MB/s) : 0.00 --|
|-- NODE 0 P. Write (T/s): 0 --||-- NODE 1 P. Write (T/s): 0 --|
|-- NODE 0 Memory (MB/s): 0.00 --||-- NODE 1 Memory (MB/s): 0.00 --|
|---------------------------------------||---------------------------------------|
|---------------------------------------||---------------------------------------|
|-- System Read Throughput(MB/s): 0.00 --|
|-- System Write Throughput(MB/s): 0.00 --|
|-- System Memory Throughput(MB/s): 0.00 --|
|---------------------------------------||---------------------------------------|
|---------------------------------------||---------------------------------------|
|-- Socket 0 --||-- Socket 1 --|
|---------------------------------------||---------------------------------------|
|-- Memory Channel Monitoring --||-- Memory Channel Monitoring --|
|---------------------------------------||---------------------------------------|
|-- Mem Ch 0: Reads (MB/s): 0.62 --||-- Mem Ch 0: Reads (MB/s): 0.60 --|
|-- Writes(MB/s): 0.56 --||-- Writes(MB/s): 0.57 --|
|-- Mem Ch 1: Reads (MB/s): 0.57 --||-- Mem Ch 1: Reads (MB/s): 0.59 --|
|-- Writes(MB/s): 0.52 --||-- Writes(MB/s): 0.56 --|
|-- Mem Ch 2: Reads (MB/s): 0.56 --||-- Mem Ch 2: Reads (MB/s): 0.59 --|
|-- Writes(MB/s): 0.52 --||-- Writes(MB/s): 0.56 --|
|-- Mem Ch 3: Reads (MB/s): 0.55 --||-- Mem Ch 3: Reads (MB/s): 0.65 --|
|-- Writes(MB/s): 0.52 --||-- Writes(MB/s): 0.65 --|
|-- Mem Ch 4: Reads (MB/s): 0.56 --||-- Mem Ch 4: Reads (MB/s): 0.68 --|
|-- Writes(MB/s): 0.52 --||-- Writes(MB/s): 0.68 --|
|-- Mem Ch 5: Reads (MB/s): 0.54 --||-- Mem Ch 5: Reads (MB/s): 0.66 --|
|-- Writes(MB/s): 0.50 --||-- Writes(MB/s): 0.66 --|
|-- NODE 0 Mem Read (MB/s) : 3.40 --||-- NODE 1 Mem Read (MB/s) : 3.77 --|
|-- NODE 0 Mem Write(MB/s) : 3.15 --||-- NODE 1 Mem Write(MB/s) : 3.69 --|
|-- NODE 0 P. Write (T/s): 37643 --||-- NODE 1 P. Write (T/s): 37645 --|
|-- NODE 0 Memory (MB/s): 6.55 --||-- NODE 1 Memory (MB/s): 7.46 --|
|---------------------------------------||---------------------------------------|
|---------------------------------------||---------------------------------------|
|-- System Read Throughput(MB/s): 7.16 --|
|-- System Write Throughput(MB/s): 6.84 --|
|-- System Memory Throughput(MB/s): 14.00 --|
|---------------------------------------||---------------------------------------|
CPU Info
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
pcm-power log
Processor Counter Monitor (2018-11-06 11:29:12 +0100 ID=769c8dd)
Power Monitoring Utility
Number of physical cores: 4
Number of logical cores: 8
Number of online logical cores: 8
Threads (logical cores) per physical core: 2
Num sockets: 1
Physical cores per socket: 4
Core PMU (perfmon) version: 4
Number of core PMU generic (programmable) counters: 4
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 2900000000 Hz
Package thermal spec power: 45 Watt; Package minimum power: 0 Watt; Package maximum power: 0 Watt;
Unsupported processor model (158).
Cleaning up
Any idea when you may have SKX server support?
The Windows binaries on https://ci.appveyor.com/project/opcm/pcm/build/artifacts result in this error on a clean Windows system:
pcm-memory.exe - System Error
The code execution cannot proceed because MSVCP140.dll was not found. Reinstalling the program may fix this problem.
That is apparently looking for Visual C++ Redistributable for Visual Studio 2015. However, there is no .msi installer program to help distribute the necessary DLLs. Perhaps there is there a compiler option to make these .exe files work on their own?
I have 3-4 systems, where I am running pcm.exe with msr.sys built with vs2015.
It is running fine, today I setup new system with Windows1064-RS2 RTM
and I am getting error -
You must have signed msr.sys driver in your current directory and have administrator rights to run this program
Any idea why on one single machine it is giving signature error?
There are already many tools to measure the % of the CPU waiting time during I/O operations, like dstat
. Nevertheless, I am looking for a way to measure the waiting time of the active cores, pretty much in a way like pcm.x
reports the utilization of cores in the active state.
I am running a compute-intensive map-reduce application, which is using only a few cores. Programs like dstat
report only the total I/O waiting time across all cores (active and inactive), but I am suspecting that my active cores may be I/O bottlenecked.
When I run pcm-power on my Skylake CPU I get:
Power Monitoring Utility
Number of physical cores: 4
Number of logical cores: 4
Number of online logical cores: 4
Threads (logical cores) per physical core: 1
Num sockets: 1
Physical cores per socket: 4
Core PMU (perfmon) version: 4
Number of core PMU generic (programmable) counters: 8
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 2600000000 Hz
Package thermal spec power: 45 Watt; Package minimum power: 0 Watt; Package maximum power: 0 Watt;
Unsupported processor model (94).
Cleaning up
When -DPCM_USE_PERF is enabled with the Linux kernel 4.11, pcm fails to measure the "Cycles", and "IPC" becomes "inf" due to a division by 0. If the line CXXFLAGS += -DPCM_USE_PERF
is commented-out, it works perfectly.
My environment is as follows.
Because $ sudo perf stat -e cycles
gives correct results in the same environment, I guess the reason is not a bug of the kernel but a mis-configuration from the pcm side, possibly stemming from recent changes to the kernel code.
github shows the raw as a mess of formatting; if you download and open the .rtf with wordpad, it shows the html of the github page.
The way it seems to work is to copypasta the github raw into a plain text document that you rename with the .rtf extension.
I might be doing something dumb here, but this computer is basically fresh out of the box and the howto isn't "just working" for it, so it seems to be a bug in at least some sense.
I am able to build pcm now. However, the kext will not load. I am running 10.12.4 on a 2014 MacBook Pro, XCode 8.3. I generally compile with llvm and nasm. So my XCode configuration is out of the box stock.
After sudo sh:
./kextload.sh
/System/Library/Extensions/PcmMsrDriver.kext failed to load - (libkern/kext) not loadable (reason unspecified); check the system/kernel logs for errors or try kextutil(8).
Also,
kextutil -i /System/Library/Extensions/PcmMsrDriver.kext
Diagnostics for /System/Library/Extensions/PcmMsrDriver.kext:
Code Signing Failure: not code signed
/System/Library/Extensions/PcmMsrDriver.kext appears to be loadable (not including linkage for on-disk libraries).
Untrusted kexts are not allowed
ERROR: invalid signature for com.intel.driver.PcmMsr, will not load
Nothing of interest in the logs.
Hello,
I'm trying to compile for k1om-mpss-linux environment and I get the following error messages:
cpucounters.cpp: In member function 'PCM::ErrorCode PCM::program(PCM::ProgramMode, const void*)':
cpucounters.cpp:2100:23: error: 'struct perf_event_attr' has no member named 'config1'
e.config1 = pExtDesc->OffcoreResponseMsrValue[0];
^
cpucounters.cpp:2102:23: error: 'struct perf_event_attr' has no member named 'config1'
e.config1 = pExtDesc->OffcoreResponseMsrValue[1];
^
Makefile:65: recipe for target 'cpucounters.o' failed
make: *** [cpucounters.o] Error 1
My environment is defined by using:
source /opt/mpss/3.8.4/environment-setup-k1om-mpss-linux
Is PCM supported within k1om-mpss-linux environment? If so, can you suggest how to fix?
Thanks in advance.
Dear developers,
I have a Knights Landing processor and I measured power getting contradictory data.
Package minimum power: 98 Watt [..]
Watts: 43.79 [..] Consumed DRAM Joules: 1.69
Added together the total wattage is 45.48W which is less than the package minimum power 98W. Or is there a missing component whose power-data (with about 52W) is not shown ?
Thanks in advance. Below you can find the complete output.
./pcm-power.x 1
Intel(r) Performance Counter Monitor V2.11.1 (2017-01-24 15:51:44 +0100 ID=4b0c8f7)
Power Monitoring Utility
Copyright (c) 2009-2016 Intel Corporation
Number of physical cores: 64
Number of logical cores: 256
Number of online logical cores: 256
Threads (logical cores) per physical core: 4
Num sockets: 1
Physical cores per socket: 64
Core PMU (perfmon) version: 3
Number of core PMU generic (programmable) counters: 2
Width of generic (programmable) counters: 40 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 40 bits
Nominal core frequency: 1300000000 Hz
Package thermal spec power: 215 Watt; Package minimum power: 98 Watt; Package maximum power: 258 Watt;
On the socket detected 2 memory controllers with total number of 6 channels.
The Windows binaries on https://ci.appveyor.com/project/opcm/pcm/build/artifacts are just the pcm*.exe files. msr.sys file is another binary that is required - and it probably needs to be signed, since it is a driver.
KBL_1
is already included in the PCM::SupportedCPUModels
, but it is missed in initCStateSupportTables
. So processor such as Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
is not supported by PCM.
It seems I have some unusual setup pcm-memory
refuses to work on. Some information about system:
$ uname -a
Linux localhost.localdomain 4.17.3-200.fc28.x86_64 #1 SMP Tue Jun 26 14:17:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ cat /proc/cpuinfo | tail -28
processor : 11
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Core(TM) i7-7800X CPU @ 3.50GHz
stepping : 4
microcode : 0x2000043
cpu MHz : 1201.565
cache size : 8448 KB
physical id : 0
siblings : 12
core id : 5
cpu cores : 6
apicid : 11
initial apicid : 11
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault cat_l3 cdp_l3 invpcid_single pti mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 7000.00
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Sky Lake-E DMI3 Registers [8086:2020] (rev 04)
00:04.0 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.1 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.2 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.3 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.4 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.5 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.6 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.7 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:05.0 System peripheral [0880]: Intel Corporation Sky Lake-E MM/Vt-d Configuration Registers [8086:2024] (rev 04)
00:05.2 System peripheral [0880]: Intel Corporation Device [8086:2025] (rev 04)
00:05.4 PIC [0800]: Intel Corporation Device [8086:2026] (rev 04)
00:08.0 System peripheral [0880]: Intel Corporation Sky Lake-E Ubox Registers [8086:2014] (rev 04)
00:08.1 Performance counters [1101]: Intel Corporation Sky Lake-E Ubox Registers [8086:2015] (rev 04)
00:08.2 System peripheral [0880]: Intel Corporation Sky Lake-E Ubox Registers [8086:2016] (rev 04)
00:14.0 USB controller [0c03]: Intel Corporation 200 Series PCH USB 3.0 xHCI Controller [8086:a2af]
00:14.2 Signal processing controller [1180]: Intel Corporation 200 Series PCH Thermal Subsystem [8086:a2b1]
00:16.0 Communication controller [0780]: Intel Corporation 200 Series PCH CSME HECI #1 [8086:a2ba]
00:17.0 SATA controller [0106]: Intel Corporation 200 Series PCH SATA controller [AHCI mode] [8086:a282]
00:1c.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #1 [8086:a290] (rev f0)
00:1c.2 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #3 [8086:a292] (rev f0)
00:1d.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #9 [8086:a298] (rev f0)
00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:a2d2]
00:1f.2 Memory controller [0580]: Intel Corporation 200 Series PCH PMC [8086:a2a1]
00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
00:1f.4 SMBus [0c05]: Intel Corporation 200 Series PCH SMBus Controller [8086:a2a3]
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-V [8086:15b8]
01:00.0 USB controller [0c03]: ASMedia Technology Inc. Device [1b21:2142]
02:00.0 USB controller [0c03]: ASMedia Technology Inc. Device [1b21:2142]
03:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961 [144d:a804]
16:00.0 PCI bridge [0604]: Intel Corporation Sky Lake-E PCI Express Root Port A [8086:2030] (rev 04)
16:05.0 System peripheral [0880]: Intel Corporation Device [8086:2034] (rev 04)
16:05.2 System peripheral [0880]: Intel Corporation Sky Lake-E RAS Configuration Registers [8086:2035] (rev 04)
16:05.4 PIC [0800]: Intel Corporation Device [8086:2036] (rev 04)
16:08.0 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208d] (rev 04)
16:08.1 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208d] (rev 04)
16:08.2 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208d] (rev 04)
16:08.3 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208d] (rev 04)
16:08.4 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208d] (rev 04)
16:08.5 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208d] (rev 04)
16:08.6 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208d] (rev 04)
16:08.7 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208d] (rev 04)
16:09.0 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208d] (rev 04)
16:09.1 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208d] (rev 04)
16:0e.0 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208e] (rev 04)
16:0e.1 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208e] (rev 04)
16:0e.2 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208e] (rev 04)
16:0e.3 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208e] (rev 04)
16:0e.4 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208e] (rev 04)
16:0e.5 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208e] (rev 04)
16:0e.6 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208e] (rev 04)
16:0e.7 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208e] (rev 04)
16:0f.0 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208e] (rev 04)
16:0f.1 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:208e] (rev 04)
16:1d.0 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:2054] (rev 04)
16:1d.1 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:2055] (rev 04)
16:1d.2 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:2056] (rev 04)
16:1d.3 System peripheral [0880]: Intel Corporation Sky Lake-E CHA Registers [8086:2057] (rev 04)
16:1e.0 System peripheral [0880]: Intel Corporation Sky Lake-E PCU Registers [8086:2080] (rev 04)
16:1e.1 System peripheral [0880]: Intel Corporation Sky Lake-E PCU Registers [8086:2081] (rev 04)
16:1e.2 System peripheral [0880]: Intel Corporation Sky Lake-E PCU Registers [8086:2082] (rev 04)
16:1e.3 System peripheral [0880]: Intel Corporation Sky Lake-E PCU Registers [8086:2083] (rev 04)
16:1e.4 System peripheral [0880]: Intel Corporation Sky Lake-E PCU Registers [8086:2084] (rev 04)
16:1e.5 System peripheral [0880]: Intel Corporation Sky Lake-E PCU Registers [8086:2085] (rev 04)
16:1e.6 System peripheral [0880]: Intel Corporation Sky Lake-E PCU Registers [8086:2086] (rev 04)
17:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] [10de:1c03] (rev a1)
17:00.1 Audio device [0403]: NVIDIA Corporation GP106 High Definition Audio Controller [10de:10f1] (rev a1)
64:00.0 PCI bridge [0604]: Intel Corporation Sky Lake-E PCI Express Root Port A [8086:2030] (rev 04)
64:05.0 System peripheral [0880]: Intel Corporation Device [8086:2034] (rev 04)
64:05.2 System peripheral [0880]: Intel Corporation Sky Lake-E RAS Configuration Registers [8086:2035] (rev 04)
64:05.4 PIC [0800]: Intel Corporation Device [8086:2036] (rev 04)
64:08.0 System peripheral [0880]: Intel Corporation Device [8086:2066] (rev 04)
64:09.0 System peripheral [0880]: Intel Corporation Device [8086:2066] (rev 04)
64:0a.0 System peripheral [0880]: Intel Corporation Device [8086:2040] (rev 04)
64:0a.1 System peripheral [0880]: Intel Corporation Device [8086:2041] (rev 04)
64:0a.2 System peripheral [0880]: Intel Corporation Device [8086:2042] (rev 04)
64:0a.3 System peripheral [0880]: Intel Corporation Device [8086:2043] (rev 04)
64:0a.4 System peripheral [0880]: Intel Corporation Device [8086:2044] (rev 04)
64:0a.5 System peripheral [0880]: Intel Corporation Device [8086:2045] (rev 04)
64:0a.6 System peripheral [0880]: Intel Corporation Device [8086:2046] (rev 04)
64:0a.7 System peripheral [0880]: Intel Corporation Device [8086:2047] (rev 04)
64:0b.0 System peripheral [0880]: Intel Corporation Device [8086:2048] (rev 04)
64:0b.1 System peripheral [0880]: Intel Corporation Device [8086:2049] (rev 04)
64:0b.2 System peripheral [0880]: Intel Corporation Device [8086:204a] (rev 04)
64:0b.3 System peripheral [0880]: Intel Corporation Device [8086:204b] (rev 04)
64:0c.0 System peripheral [0880]: Intel Corporation Device [8086:2040] (rev 04)
64:0c.1 System peripheral [0880]: Intel Corporation Device [8086:2041] (rev 04)
64:0c.2 System peripheral [0880]: Intel Corporation Device [8086:2042] (rev 04)
64:0c.3 System peripheral [0880]: Intel Corporation Device [8086:2043] (rev 04)
64:0c.4 System peripheral [0880]: Intel Corporation Device [8086:2044] (rev 04)
64:0c.5 System peripheral [0880]: Intel Corporation Device [8086:2045] (rev 04)
64:0c.6 System peripheral [0880]: Intel Corporation Device [8086:2046] (rev 04)
64:0c.7 System peripheral [0880]: Intel Corporation Device [8086:2047] (rev 04)
64:0d.0 System peripheral [0880]: Intel Corporation Device [8086:2048] (rev 04)
64:0d.1 System peripheral [0880]: Intel Corporation Device [8086:2049] (rev 04)
64:0d.2 System peripheral [0880]: Intel Corporation Device [8086:204a] (rev 04)
64:0d.3 System peripheral [0880]: Intel Corporation Device [8086:204b] (rev 04)
65:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP108 [GeForce GT 1030] [10de:1d01] (rev a1)
65:00.1 Audio device [0403]: NVIDIA Corporation GP108 High Definition Audio Controller [10de:0fb8] (rev a1)
b2:05.0 System peripheral [0880]: Intel Corporation Device [8086:2034] (rev 04)
b2:05.2 System peripheral [0880]: Intel Corporation Sky Lake-E RAS Configuration Registers [8086:2035] (rev 04)
b2:05.4 PIC [0800]: Intel Corporation Device [8086:2036] (rev 04)
b2:12.0 Performance counters [1101]: Intel Corporation Sky Lake-E M3KTI Registers [8086:204c] (rev 04)
b2:12.1 Performance counters [1101]: Intel Corporation Sky Lake-E M3KTI Registers [8086:204d] (rev 04)
b2:12.2 System peripheral [0880]: Intel Corporation Sky Lake-E M3KTI Registers [8086:204e] (rev 04)
b2:15.0 System peripheral [0880]: Intel Corporation Sky Lake-E M2PCI Registers [8086:2018] (rev 04)
b2:16.0 System peripheral [0880]: Intel Corporation Sky Lake-E M2PCI Registers [8086:2018] (rev 04)
b2:16.4 System peripheral [0880]: Intel Corporation Sky Lake-E M2PCI Registers [8086:2018] (rev 04)
b2:17.0 System peripheral [0880]: Intel Corporation Sky Lake-E M2PCI Registers [8086:2018] (rev 04)
$ ll /dev/cpu/*/msr
crw------- 1 root root 202, 0 Jul 10 13:39 /dev/cpu/0/msr
crw------- 1 root root 202, 10 Jul 10 13:39 /dev/cpu/10/msr
crw------- 1 root root 202, 11 Jul 10 13:39 /dev/cpu/11/msr
crw------- 1 root root 202, 1 Jul 10 13:39 /dev/cpu/1/msr
crw------- 1 root root 202, 2 Jul 10 13:39 /dev/cpu/2/msr
crw------- 1 root root 202, 3 Jul 10 13:39 /dev/cpu/3/msr
crw------- 1 root root 202, 4 Jul 10 13:39 /dev/cpu/4/msr
crw------- 1 root root 202, 5 Jul 10 13:39 /dev/cpu/5/msr
crw------- 1 root root 202, 6 Jul 10 13:39 /dev/cpu/6/msr
crw------- 1 root root 202, 7 Jul 10 13:39 /dev/cpu/7/msr
crw------- 1 root root 202, 8 Jul 10 13:39 /dev/cpu/8/msr
crw------- 1 root root 202, 9 Jul 10 13:39 /dev/cpu/9/msr
pcm-memory.x
refuses to work with following stdout:
$ sudo ./pcm-memory.x 1
Processor Counter Monitor: Memory Bandwidth Monitoring Utility ($Format:%ci ID=%h$)
This utility measures memory bandwidth per channel or per DIMM rank in real-time
Number of physical cores: 6
Number of logical cores: 12
Number of online logical cores: 12
Threads (logical cores) per physical core: 2
Num sockets: 1
Physical cores per socket: 6
Core PMU (perfmon) version: 4
Number of core PMU generic (programmable) counters: 4
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 3500000000 Hz
Package thermal spec power: 122 Watt; Package minimum power: 45 Watt; Package maximum power: 308 Watt;
PCM Error: Cannot open /sys/firmware/acpi/tables/MCFG
Can not access Jaketown/Ivytown PCI configuration space. Access to uncore counters (memory and QPI bandwidth) is disabled.
You must be root to access these Jaketown/Ivytown counters in PCM.
Access to Processor Counter Monitor has denied (no MSR or PCI CFG space access).
Cleaning up
Freeing up all RMIDs
When debugging this problem I found that pcm-memory
try to read /sys/firmware/acpi/tables/MCFG
file which is missing on my OS.
$ ll /sys/firmware/acpi/tables
total 0
-r-------- 1 root root 1822 Jul 10 14:02 APIC
-r-------- 1 root root 56 Jul 10 14:02 BGRT
drwxr-xr-x 2 root root 0 Jul 10 14:02 data
-r-------- 1 root root 84 Jul 10 14:02 DBG2
-r-------- 1 root root 52 Jul 10 14:02 DBGP
-r-------- 1 root root 232 Jul 10 14:02 DMAR
-r-------- 1 root root 123480 Jul 10 14:02 DSDT
drwxr-xr-x 2 root root 0 Jul 10 14:02 dynamic
-r-------- 1 root root 276 Jul 10 14:02 FACP
-r-------- 1 root root 64 Jul 10 14:02 FACS
-r-------- 1 root root 156 Jul 10 14:02 FIDT
-r-------- 1 root root 68 Jul 10 14:02 FPDT
-r-------- 1 root root 56 Jul 10 14:02 HPET
-r-------- 1 root root 148 Jul 10 14:02 LPIT
-r-------- 1 root root 60 Jul 10 14:02 MCFG1
-r-------- 1 root root 60 Jul 10 14:02 MCFG2
-r-------- 1 root root 64 Jul 10 14:02 MIGT
-r-------- 1 root root 78 Jul 10 14:02 MSCT
-r-------- 1 root root 113 Jul 10 14:02 NITR
-r-------- 1 root root 43979 Jul 10 14:02 OEM1
-r-------- 1 root root 170610 Jul 10 14:02 OEM4
-r-------- 1 root root 110 Jul 10 14:02 PCCT
-r-------- 1 root root 48 Jul 10 14:02 RASF
-r-------- 1 root root 108 Jul 10 14:02 SLIT
-r-------- 1 root root 2608 Jul 10 14:02 SRAT
-r-------- 1 root root 54311 Jul 10 14:02 SSDT1
-r-------- 1 root root 3973 Jul 10 14:02 SSDT2
-r-------- 1 root root 671 Jul 10 14:02 SSDT3
-r-------- 1 root root 12290 Jul 10 14:02 SSDT4
-r-------- 1 root root 50 Jul 10 14:02 SVOS
-r-------- 1 root root 66 Jul 10 14:02 UEFI
-r-------- 1 root root 308 Jul 10 14:02 WDAT
-r-------- 1 root root 64 Jul 10 14:02 WDDT
-r-------- 1 root root 40 Jul 10 14:02 WSMT1
-r-------- 1 root root 40 Jul 10 14:02 WSMT2
but I have MCFG1
/MCFG2
tables. I have tried to recompile pcm-memory
with all mentions of /sys/firmware/acpi/tables/MCFG
changed to /sys/firmware/acpi/tables/MCFG1
(and subsequently MCFG2
). In both cases it looks like pcm-memory
is able to show meaningful data:
Processor Counter Monitor: Memory Bandwidth Monitoring Utility ($Format:%ci ID=%h$)
This utility measures memory bandwidth per channel or per DIMM rank in real-time
Number of physical cores: 6
Number of logical cores: 12
Number of online logical cores: 12
Threads (logical cores) per physical core: 2
Num sockets: 1
Physical cores per socket: 6
Core PMU (perfmon) version: 4
Number of core PMU generic (programmable) counters: 4
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 3500000000 Hz
Package thermal spec power: 122 Watt; Package minimum power: 45 Watt; Package maximum power: 308 Watt;
On the socket detected 2 memory controllers with total number of 6 channels.
Detected Intel(R) Core(TM) i7-7800X CPU @ 3.50GHz "Intel(r) microarchitecture codename Skylake-SP"
Update every 1 seconds
|---------------------------------------|
|-- Socket 0 --|
|---------------------------------------|
|-- Memory Channel Monitoring --|
|---------------------------------------|
|-- Mem Ch 0: Reads (MB/s): 1.03 --|
|-- Writes(MB/s): 0.54 --|
|-- Mem Ch 1: Reads (MB/s): 1.03 --|
|-- Writes(MB/s): 0.53 --|
|-- NODE0 Mem Read (MB/s): 2.06 --|
|-- NODE0 Mem Write (MB/s) : 1.07 --|
|-- NODE0 P. Write (T/s) : 0 --|
|-- NODE0 Memory (MB/s): 3.13 --|
|---------------------------------------|
|---------------------------------------||---------------------------------------|
|-- System Read Throughput(MB/s): 2.06 --|
|-- System Write Throughput(MB/s): 1.07 --|
|-- System Memory Throughput(MB/s): 3.13 --|
|---------------------------------------||---------------------------------------|
Unfortunately I haven't found any mentions of MCFG
table could be split in MCFG1
/MCFG2
.
Here is dump of those tables:
$ sudo hexdump -C MCFG1
00000000 4d 43 46 47 3c 00 00 00 01 81 41 4c 41 53 4b 41 |MCFG<.....ALASKA|
00000010 41 20 4d 20 49 00 00 00 09 20 07 01 4d 53 46 54 |A M I.... ..MSFT|
00000020 97 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 |...............`|
00000030 00 00 00 00 00 00 00 ff 00 00 00 00 |............|
0000003c
$ sudo hexdump -C MCFG2
00000000 4d 43 46 47 3c 00 00 00 01 df 41 4c 41 53 4b 41 |MCFG<.....ALASKA|
00000010 41 20 4d 20 49 20 00 00 01 00 00 00 49 4e 54 4c |A M I ......INTL|
00000020 13 10 09 20 00 00 00 00 00 00 00 00 00 00 00 60 |... ...........`|
00000030 00 00 00 00 00 00 00 ff 00 00 00 00 |............|
0000003c
So the questions are:
pcm-memory
supposed to work on single socket systems like I have?pcm-tools
pointing to MCFG1
/MCFG2
instead of MCFG
and what potential problems you see in this case?Hey, this is just a minor thing. Can you please include the output directories of doxygen in the gitignore file? Thanks & regards.
diff --git a/.gitignore b/.gitignore
index 6f5b269..6f63201 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,5 @@ Release
Debug64
Release64
.metadata/
+html/
+latex/
I am interested in collecting more than 4 custom counter events at once. Is the current limitation of 4 in psx-core.x a limitation of the HW (I am using Skylake, for reference) or of the software?
I tried to take a gander myself and see that BasicCounterState defines Event0, Event1, Event2, and Event3, but grepping does not reveal where those values are set, so I can't easily asses why BasicCounterState only supports 4 events.
Hi Processor Counter Monitor Team,
I was wondering whether it would be possible to distribute a precompiled Kext module, for the Mac OS X driver for Intel PCM?
While on Windows we can access the MSR using winring0
and winpmem
, Mac OS X, particularly El Capitan and macOS Sierra, require a Developer ID certificate for signing Kexts. Therefore, to load the Kext, System Integrity Protection has to be disabled, leaving the Mac OS X system vulnerable.
While the code to hangle and interpret the MSR data undergoes improvements overtime, it seems that the interface to read the MSR data from the Mac OS X kernel does not change as often. Most of the files in the MacMSRDriver have copyrights headers dating from 2013. As such would it be possible to have a signed precompiled kernel, so it can be loaded without disabling Mac OS X System Integrity Protection? The users of Intel PCM will eventually have to recompile the client interface only, and work on a stable driver, that will be updated with new releases of Mac OS X.
Greetings,
Alen Stojanov
Glad to hear having new pcm repository.
Is it OK to ask something like this topic here?
We've bought machines using Intel(R) Xeon(R) CPU E3-1220 v5 and noticed pcm-memory.x is not working on this machine. pcm.x still works through perf though.
Is it possible to solve this issue by modifying something like https://software.intel.com/en-us/forums/software-tuning-performance-optimization-platform-monitoring/topic/594458 discussion? Thanks in advance.
I am learning about windows driver, with this project,
Trying to understand the type of the driver.
From my understanding while reading MSDN docs, is this Software driver (Upper level filter driver)?
Also why doesn't it show up in device manager?
Hi Developers,
I'd like to use PCM Tools to monitor UPI traffic and execute UPI stress on my server. There are two processors (Intel Xeon Gold 5115 2.4GHz) and 16 x 8 GB DDR4 2400 on my server.
I use ./pcm.x to launch the UPI monitor, and use "numactl --cpunodebind=0 --membind=1 ./memoptest 2" "numactl --cpunodebind=1 --membind=0 ./memoptest 2 to run memory bandwidth test.
I have some questions that need your help.
Q1. When I use this two commands to run memory bandwidth test, the pcm.x show some data numbers in UPI0 and UPI1 columns. What's the meaning about 13G and 55% ?
Q2. If the 55% is the total Percentage of UPI bandwidth, how could I do to make the UPI bandwidth up to 100% ?
Thanks.
Hi,
Any idea what may cause pcm-memory.x to have a segmentation fault (running on Broadwell).
Thanks,
Dan
[root@cd6n2 pcm]# ./pcm-memory.x 1
Processor Counter Monitor: Memory Bandwidth Monitoring Utility ($Format:%ci ID=%h$)
This utility measures memory bandwidth per channel or per DIMM rank in real-time
Number of physical cores: 20
Number of logical cores: 40
Number of online logical cores: 40
Threads (logical cores) per physical core: 2
Num sockets: 2
Physical cores per socket: 10
Core PMU (perfmon) version: 3
Number of core PMU generic (programmable) counters: 4
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 2200000000 Hz
Package thermal spec power: 85 Watt; Package minimum power: 42 Watt; Package maximum power: 170 Watt;
Socket 0: 2 memory controllers detected with total number of 5 channels. 2 QPI ports detected. 0 M2M (mesh to memory) blocks detected.
Socket 1: 2 memory controllers detected with total number of 5 channels. 2 QPI ports detected. 0 M2M (mesh to memory) blocks detected.
Detected Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz "Intel(r) microarchitecture codename Broadwell-EP/EX" stepping 1 microcode level 0xb000021
Update every 1 seconds
DEBUG: caught signal to interrupt (Segmentation fault).
Cleaning up
Freeing up all RMIDs
ERROR 21 error C2059: Syntaxerror: ')' 70 1 pcm-core-win
ERROR 29 error C2059: Syntaxerror: ')' 110 1 pcm-core-win
It seems that there is a problem with the include paths or something like that, since VS2010 highlight, that etc. are not available. I don't really know, what the problem is, since I use in general Linux and make, cmake or something like that and not VisualStudio on Windows.
I just want to compile the project to thest it with my i7-920 CPU to see, if it works fine with games.
I also tried the precompiled binaries, but it seems, that the don't work.
pcm/pcm.x
Processor Counter Monitor ($Format:%ci ID=%h$)
Number of physical cores: 4
Number of logical cores: 4
Number of online logical cores: 4
Threads (logical cores) per physical core: 1
Num sockets: 1
Physical cores per socket: 4
Core PMU (perfmon) version: 3
Number of core PMU generic (programmable) counters: 8
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 3200000000 Hz
Package thermal spec power: 84 Watt; Package minimum power: 0 Watt; Package maximum power: 0 Watt;
Detected Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz "Intel(r) microarchitecture codename Haswell" stepping 3
EXEC : instructions per nominal CPU cycle
IPC : instructions per CPU cycle
FREQ : relation to nominal CPU frequency='unhalted clock ticks'/'invariant timer ticks' (includes Intel Turbo Boost)
AFREQ : relation to nominal CPU frequency while in active state (not in power-saving C state)='unhalted clock ticks'/'invariant timer ticks while in C0-state' (includes Intel Turbo Boost)
L3MISS: L3 cache misses
L2MISS: L2 cache misses (including other core's L2 cache *hits*)
L3HIT : L3 cache hit ratio (0.00-1.00)
L2HIT : L2 cache hit ratio (0.00-1.00)
L3MPI : number of L3 cache misses per instruction
L2MPI : number of L2 cache misses per instruction
READ : bytes read from main memory controller (in GBytes)
WRITE : bytes written to main memory controller (in GBytes)
IO : bytes read/written due to IO requests to memory controller (in GBytes); this may be an over estimate due to same-cache-line partial requests
TEMP : Temperature reading in 1 degree Celsius relative to the TjMax temperature (thermal headroom): 0 corresponds to the max temperature
energy: Energy in Joules
Core (SKT) | EXEC | IPC | FREQ | AFREQ | L3MISS | L2MISS | L3HIT | L2HIT | L3MPI | L2MPI | TEMP
0 0 0.04 0.87 0.04 0.97 337 K 661 K 0.49 0.40 0.00 0.01 57
1 0 0.04 0.84 0.04 1.04 320 K 614 K 0.48 0.48 0.00 0.01 59
2 0 0.02 0.65 0.03 1.00 227 K 451 K 0.50 0.36 0.00 0.01 61
3 0 0.03 0.77 0.04 1.01 206 K 435 K 0.53 0.44 0.00 0.00 58
---------------------------------------------------------------------------------------------------------------
SKT 0 0.03 0.80 0.04 1.01 1091 K 2162 K 0.50 0.43 0.00 0.01 57
---------------------------------------------------------------------------------------------------------------
TOTAL * 0.03 0.80 0.04 1.01 1091 K 2162 K 0.50 0.43 0.00 0.01 N/A
Instructions retired: 394 M ; Active cycles: 495 M ; Time (TSC): 3228 Mticks ; C0 (active,non-halted) core residency: 3.81 %
C1 core residency: 96.19 %; C3 core residency: 0.00 %; C6 core residency: 0.00 %; C7 core residency: 0.00 %;
C2 package residency: 0.00 %; C3 package residency: 0.00 %; C6 package residency: 0.00 %; C7 package residency: 0.00 %;
PHYSICAL CORE IPC : 0.80 => corresponds to 19.91 % utilization for cores in active state
Instructions per nominal CPU cycle: 0.03 => corresponds to 0.76 % core utilization over time interval
SMI count: 0
---------------------------------------------------------------------------------------------------------------
MEM (GB)->| READ | WRITE | IO | CPU energy |
---------------------------------------------------------------------------------------------------------------
SKT 0 0.55 0.04 0.45 0.79
---------------------------------------------------------------------------------------------------------------
on system with i5-2520M display all counters Package thermal spec power: 35 Watt; Package minimum power: 24 Watt; Package maximum power: 56 Watt;
This utility bug or processor not supported? Another utility have similar problem Yamagi/powermon#1
On a system with Skylake CPUs, the inter-socket interface is called UPI, but pcm.x still prints some messages calling it QPI like this:
Max QPI link 0 speed: 23.3 GBytes/second (10.4 GT/second)
Other prints refer to it as UPI:
Intel(r) UPI data traffic estimation in bytes (data traffic coming to CPU/socket through UPI links):
Total UPI outgoing data and non-data traffic: 22 M
Suggestion
Any print that still has QPI hardcoded like:
std::cerr << "Max QPI speed: " << max_qpi_speed / (1e9) << " GBytes/second (" << max_qpi_speed / (1e9*getBytesPerLinkTransfer()) << " GT/second)" << std::endl;
should use m->xPI() like this:
cout << "\n" << "Intel(r) "<< m->xPI() <<" data traffic estimation in bytes (data traffic coming to CPU/socket through "<< m->xPI() <<" links):" << "\n" << "\n";
to print the right name based on the CPU:
const char * xPI() const
{
if (hasUPI())
return "UPI";
return "QPI";
}
Launching pcm-core.exe
from CI artifacts on Win 10 gives me this error:
ERROR: winpmem_64.sys not found in current directory. Download it from https://volatility.googlecode.com/svn-history/r2813/branches/scudette/tools/windows/winpmem/binaries/winpmem_64.sys .
The link doesn't exist anymore. Related piece of code: https://github.com/opcm/pcm/blob/456ff2fd8734fc1b51114d9e5bf92b6b42fb588e/client_bw.cpp#L52
Hi
I am running pcm.exe and it dumps output to console window, I have some doubts regarding the output-
".....
C1 core residency: 1.27 %; C3 core residency: 0.00 %; C6 core residency: 0.00 %; C7 core residency: 95.40 %;
C2 package residency: 22.54 %; C3 package residency: 0.06 %; C6 package residency: 0.01 %; C7 package residency: 62.43 %; C8 package residency: 0.00 %; C9 package residency: 0.00 %; C10 package residency: 0.00 %;
"
Thank you
I have tried to compile WinMSRDriver under Windows 10 within VS 2015 with 14393 DDK.
I created new VS 2015 KMDF Project, then manually added all h and c files and compiled it. It worked fine and generated msr.sys file.
After that I generated pcm.exe but when I run pcm.exe I get this error - SystemAccessViolation Exception
Platform - win1064 RS1 14393 + Kabylake
log as below
D:\PCM>pcm.exe
DEBUG: Setting Ctrl+C done.
Processor Counter Monitor (2017-03-24 23:15:23 +0100 ID=ea6ef86)
Starting MSR service failed with error 1275 This driver has been blocked from loading
Trying to load winring0.dll/winring0.sys driver...
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at mainCRTStartup()
DEBUG: Unhandled Exception event
When pcm-memory.x is reporting metrics to csv file you have two headers
;;SKT0;SKT0;SKT0;SKT0;SKT0;SKT0;SKT0;SKT0;SK
```
2. The data header, telling you what data is reported in the column
when pcm.x is reporting metrics to csv file you also have two headers
1. socket header, telling this stat is for X socket
- The socket header lines are empty if they repeat
looks something like this
System;;;;;;;;;;;;;;;;;;;;;;System Core C-States;;;;;System Pack C-States;;;;;;Socket0;;;;;;;;;;;;;;;;Socket1;;;;;;;;;;;;;;;;S
2. The data header, telling you what data is reported in the column
The Issue:
I need consistency. I would rather have the socket/system header repeat over and over even if it's a repeat header because it involves less over head on my part.
I'm trying to compile WinMSRDriver under Windows 10 within the VS 2015 developer command prompt. When it tries to run nmake
it errors with makefile(1) : fatal error U1052: file '\makefile.def' not found
. I downloaded WDK 10 in the hope this is compatible (as the instructions mention the DDK).
Otherwise, I could compile the VS solution without problems, it's just the driver which is making trouble.
I run ./pcm.x as rooter on Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz "Intel(r) microarchitecture codename Skylake-SP", the information is listed below:
Core (SKT) | EXEC | IPC | FREQ | AFREQ | L3MISS | L2MISS | L3HIT | L2HIT | L3MPI | L2MPI | L3OCC | TEMP
0 0 0.00 -1.00 0.00 -1.00 0 0 1.00 1.00 0.00 0.00 256 58
1 1 0.00 -1.00 0.00 -1.00 0 0 1.00 1.00 0.00 0.00 1024 61
2 0 0.00 -1.00 0.00 -1.00 0 0 1.00 1.00 0.00 0.00 544 60
3 1 0.00 -1.00 0.00 -1.00 0 0 1.00 1.00 0.00 0.00 448 59
4 0 0.00 -1.00 0.00 -1.00 0 0 1.00 1.00 0.00 0.00 96 59
...
Why IPC = -1, LxMISS=0, Lxhit=1?
The kextload.sh script in MacMSRDriver is sincerely wedged.
cp -R Build/Products/Release/PcmMsrDriver.kext /tmp/.
build should be lowercase (my OSX filesystem is case sensitive) and Products should be removed.
cp -R build/Release/PcmMsrDriver.kext /tmp/.
Also, the file is a DOS file meaning that it has carriage returns and linefeeds. This confuses bash.
: command not found 2:
mv: rename /tmp/PcmMsrDriver.kext to /System/Library/Extensions\r: No such file or directory
chown: /System/Library/Extensions/PcmMsrDriver.kext\r: No such file or directory
failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
make: *** [install] Error 71
This is the od -c dump of kextload.sh:
0000000 # ! / u s r / b i n / e n v b
0000020 a s h \r \n \r \n c p - R b u i
I do not as yet have a working PCM on OSX compiled from the github zip file.
Hey, could you please extend the makefile to link the produced object files into a static library, e.g. via ar -rcs libPCM.a *.o
?
Regards
Developers,
When I am using this tool on Linux I get the message:
Unsupported processor model (158).
Is there already support (or an workaround) by someone for the Intel Coffee Lake processors? More specific in my case:
Model: 158
Model name: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
Cheers,
Carlos
My program links to libpcm.so and uses the C API, which does not provide a way to disable the spurious console output generated by various PCM functions. Of course it's normal for a program to write things on stdout
, but as everyone knows, it's never acceptable for a library to do so. The best thing would be to remove all the printf
and cout
statements from those PCM function that are reachable via library exports.
I Built pcm using visual studio 15 running on ws2012. The build was successful and executable generated on x64/debug folder however when executing, dll error message:
Starting MSR service failed with error 2 The system cannot find the file specified.
Trying to load winring0.dll/winring0.sys driver...
Failed to load winring0.dll/winring0.sys driver.
Cannot access CPU counters
You must have signed msr.sys driver in your current directory and have administrator rights to run this program
Access to Processor Counter Monitor has denied (no MSR or PCI CFG space access).
Hi Developers,
I'm wondering if there is any plan to support the monitoring of branch misses? It would be great if there is a function like getBranchMisses() since it's really a critical metric to anyone who cares performance.
Thanks
Hello,
I'm looking into creating a prometheus.io exporter for opcm, however, I can't find an easy way to take OPCM output which looks like:
|---------------------------------------||---------------------------------------|
|-- Socket 0 --||-- Socket 1 --|
|---------------------------------------||---------------------------------------|
|-- Memory Channel Monitoring --||-- Memory Channel Monitoring --|
|---------------------------------------||---------------------------------------|
|-- Mem Ch 0: Reads (MB/s): 0.49 --||-- Mem Ch 0: Reads (MB/s): 0.44 --|
|-- Writes(MB/s): 0.46 --||-- Writes(MB/s): 0.50 --|
|-- Mem Ch 1: Reads (MB/s): 0.48 --||-- Mem Ch 1: Reads (MB/s): 0.44 --|
|-- Writes(MB/s): 0.45 --||-- Writes(MB/s): 0.50 --|
|-- Mem Ch 2: Reads (MB/s): 0.47 --||-- Mem Ch 2: Reads (MB/s): 0.44 --|
|-- Writes(MB/s): 0.45 --||-- Writes(MB/s): 0.49 --|
|-- Mem Ch 3: Reads (MB/s): 0.52 --||-- Mem Ch 3: Reads (MB/s): 0.49 --|
|-- Writes(MB/s): 0.45 --||-- Writes(MB/s): 0.50 --|
|-- Mem Ch 4: Reads (MB/s): 0.51 --||-- Mem Ch 4: Reads (MB/s): 0.49 --|
|-- Writes(MB/s): 0.45 --||-- Writes(MB/s): 0.49 --|
|-- Mem Ch 5: Reads (MB/s): 0.52 --||-- Mem Ch 5: Reads (MB/s): 0.49 --|
|-- Writes(MB/s): 0.45 --||-- Writes(MB/s): 0.50 --|
|-- NODE 0 Mem Read (MB/s) : 2.98 --||-- NODE 1 Mem Read (MB/s) : 2.79 --|
|-- NODE 0 Mem Write(MB/s) : 2.70 --||-- NODE 1 Mem Write(MB/s) : 2.97 --|
|-- NODE 0 P. Write (T/s): 37638 --||-- NODE 1 P. Write (T/s): 37638 --|
|-- NODE 0 Memory (MB/s): 5.68 --||-- NODE 1 Memory (MB/s): 5.76 --|
|---------------------------------------||---------------------------------------|
|---------------------------------------||---------------------------------------|
|-- System Read Throughput(MB/s): 5.76 --|
|-- System Write Throughput(MB/s): 5.68 --|
|-- System Memory Throughput(MB/s): 11.44 --|
|---------------------------------------||---------------------------------------|
The CSV format kind of helps. but ideally I'd like every key/value to be on its own new line so that I can easily parse the values out and expose them in the exporter.
For instance, the node-exporter
1 exposes the following for CPU metrics:
node_cpu{cpu="cpu0",mode="guest"} 180228.76
node_cpu{cpu="cpu0",mode="idle"} 1.2785727e+06
node_cpu{cpu="cpu0",mode="iowait"} 63074.1
node_cpu{cpu="cpu0",mode="irq"} 0
node_cpu{cpu="cpu0",mode="nice"} 2.84
node_cpu{cpu="cpu0",mode="softirq"} 8021.39
node_cpu{cpu="cpu0",mode="steal"} 0
node_cpu{cpu="cpu0",mode="system"} 149479.42
node_cpu{cpu="cpu0",mode="user"} 214962.05
Running make lib
on Linux causes the following error:
make -C daemon/daemon/Debug
make[1]: Entering directory '/home/bhyoo/projects/dirigent/pcm/daemon/daemon/Debug'
make[1]: Nothing to be done for 'daemon.d'.
make[1]: Leaving directory '/home/bhyoo/projects/dirigent/pcm/daemon/daemon/Debug'
make -C daemon/client/Debug
make[1]: Entering directory '/home/bhyoo/projects/dirigent/pcm/daemon/client/Debug'
make[1]: Nothing to be done for 'client.d'.
make[1]: Leaving directory '/home/bhyoo/projects/dirigent/pcm/daemon/client/Debug'
ar -rcs libPCM.a msr.o cpucounters.o pci.o client_bw.o utils.o pcm.o pcm-numa.o pcm-power.o pcm-sensor.o pcm-msr.o pcm-memory.o pcm-tsx.o pcm-pcie.o pcm-core.o pcm-iio.o pcm-lspci.o pcm-pcicfg.o daemon-binaries
ar: daemon-binaries: No such file or directory
Makefile:58: recipe for target 'libPCM.a' failed
make: *** [libPCM.a] Error 1
Hi,
I tried to compile the project with VS2010. I used the pcm-all.sln file to load the project and used the release build.
When I tried to compile it, I got the following error:
Specified platform toolset (v110) is not installed or invalid. Please make sure that a supported PlatformToolset value is
To fix this problem I have to perform the following tasks:
-Select all the subprojects in the project overview with shift
-Right click on one project
-Select Properties
-Select Configuration Properties
-General
-Platform Toolset
-Choose one of the available versions
Duplicate symbol errors occur when the pcm utilities from the root directory are compiled:
make
c++ -Wall -g -O3 -Wno-unknown-pragmas -I/usr/include -IMacMSRDriver -std=c++0x -c pcm-numa.cpp -o pcm-numa.o
c++ -MM -Wall -g -O3 -Wno-unknown-pragmas -I/usr/include -IMacMSRDriver -std=c++0x pcm-numa.cpp > pcm-numa.d
c++ -Wall -g -O3 -Wno-unknown-pragmas -I/usr/include -IMacMSRDriver -std=c++0x -c msr.cpp -o msr.o
[...]
duplicate symbol std::vector<TopologyEntry, std::allocator<TopologyEntry> >::operator=(std::initializer_list<TopologyEntry>) in:
pcm-numa.o
utils.o
duplicate symbol std::vector<TopologyEntry, std::allocator<TopologyEntry> >::assign(std::initializer_list<TopologyEntry>) in:
pcm-numa.o
utils.o
duplicate symbol std::vector<TopologyEntry, std::allocator<TopologyEntry> >::insert(__gnu_cxx::__normal_iterator<TopologyEntry const*, std::vector<TopologyEntry, std::allocator<TopologyEntry> > >, std::initializer_list<TopologyEntry>) in:
pcm-numa.o
utils.o
ld: 522 duplicate symbols for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [pcm-numa.x] Error 1
For some reason the following lines are defined in cpucounters.h and must be removed in order to compile the utilities without duplicate symbol errors:
#ifndef HACK_TO_REMOVE_DUPLICATE_ERROR
template class PCM_API std::allocator<TopologyEntry>;
template class PCM_API std::vector<TopologyEntry>;
template class PCM_API std::allocator<CounterWidthExtender *>;
template class PCM_API std::vector<CounterWidthExtender *>;
template class PCM_API std::allocator<uint32>;
template class PCM_API std::vector<uint32>;
template class PCM_API std::allocator<char>;
#endif
Alternatively HACK_TO_REMOVE_DUPLICATE_ERROR must be defined somewhere for these lines to be silent during compilation (which is actually something already in place when compiling MacMSRDriver lib and driver).
When the above lines are removed (AFTER compiling the libPcmMsr.dylib from the MacMSRDriver directory) the utilities are compiled successfully.
Hi,
On Macos Mojave the installation instructions lead to an error. Namely, when sudo sh ./kextload.sh
calls cp -R kextbuild/Release/PcmMsrDriver.kext /tmp/.
the file PcmMsrDriver.kext
is not found.
When I run make kext
, the file gets build. I believe the issue is that when calling make kext library
, the build step for library overwrites the generated kext file - I was able to install pcm manually when I backed the kext file before running make library
.
I think that a sufficient fix would be to let xcodebuild operate in different directories.
Cheers,
Pavel
Hello,
I'm adding support for PCM to OPPAT (https://patinnc.github.io/) but I need to be able to correlate the pcm csv data with other data. In particular with higher resolution than 1 second. This would let me correlate the PCM data with ETW or ftrace data.
I would like to add an absolute timestamp such as in the attached patch. It uses GetSystemTimeAsFileTime on windows, clock_gettime(CLOCK_MONOTONIC, &tp) on linux. I'm not sure what to do on FreeBSD or Mac.
Thanks
Pat
Hi Processor Counter Monitor Team,
I am experiencing issues running the pcm.x
tool on a Mac OS X machine, when Intel® Hyper-Threading Technology is disabled.
Namely when running pcm.x -r
before disabling Intel® Hyper-Threading, I obtain the following:
$ ./pcm.x -r
Intel(r) Performance Counter Monitor V2.11.1 ($Format:%ci ID=%h$)
Copyright (c) 2009-2016 Intel Corporation
Number of physical cores: 4
Number of logical cores: 8
Number of online logical cores: 8
Threads (logical cores) per physical core: 2
Num sockets: 1
Physical cores per socket: 4
Core PMU (perfmon) version: 3
Number of core PMU generic (programmable) counters: 4
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 2800000000 Hz
Package thermal spec power: 47 Watt; Package minimum power: 0 Watt; Package maximum power: 0 Watt;
Resetting PMU configuration
Zeroed PMU registers
Detected Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz "Intel(r) microarchitecture codename Haswell" stepping 1
To disable Intel® Hyper-Threading, I use the following procedure:
Instruments
app.Preferences
and select the CPUs
tab.Hardware Multi-Threading
.Then, running pcm.x
again, I obtain the following:
$ ./pcm.x -r
Intel(r) Performance Counter Monitor V2.11.1 ($Format:%ci ID=%h$)
Copyright (c) 2009-2016 Intel Corporation
Number of physical cores: 2
Number of logical cores: 4
Number of online logical cores: 4
Threads (logical cores) per physical core: 2
Num sockets: 1
Physical cores per socket: 2
Core PMU (perfmon) version: 3
Number of core PMU generic (programmable) counters: 4
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 5200000000 Hz
Package thermal spec power: 23712 Watt; Package minimum power: 23605 Watt; Package maximum power: 32767 Watt;
Resetting PMU configuration
Zeroed PMU registers
WARNING: Core 1 IA32_PERFEVTSEL0_ADDR are not zeroed 140734740421736
Access to Intel(r) Performance Counter Monitor has denied (Performance Monitoring Unit is occupied by other application). Try to stop the application that uses PMU.
Alternatively you can try running Intel PCM with option -r to reset PMU configuration at your own risk.
Cleaning up
As you can see from above, the reported count of physical cores is incorrect, since Intel(R) Core(TM) i7-4980HQ has 4 physical cores, and 8 logical cores. The pcm.x
is unable to detect the offline cores, and the execution of the program is interrupted.
I am running pcm.x
on a Mac OS X El Capitan 10.11.6, compiled with Apple LLVM version 8.0.0 (clang-800.0.42.1). I have observed the same problem running on macOS Sierra.
Would it be possible to fix this issue?
D:\CEC\PCM>pcm.exe
DEBUG: Setting Ctrl+C done.
Processor Counter Monitor (2017-03-24 23:15:23 +0100 ID=ea6ef86)
Error: unsupported processor. Only Intel(R) processors are supported (Atom(R) and microarchitecture codename Nehalem/Nehalem-EP, Atom(tm), Westmere/Clarkdale, Sandy Bridge, Westmere-EP, Sandy Bridge-EP/Jaketown, Nehalem-EX, Westmere-EX, Ivy Bridge, Haswell, Broadwell, Ivy Bridge-EP/EN/EX/Ivytown, Haswell-EP/EN/EX, Broadwell-EP/EX, Broadwell-DE, Knights Landing, Skylake). CPU model number: 158 Brand: "Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz"
Access to Processor Counter Monitor has denied (no MSR or PCI CFG space access).
While trying to build MSR driver from the master
branch using DDK 10.0.17763 and Visual Studio 2017 15.9.2, I get following errors:
....\pcm\WinMSRDriver\Win7\MSR.inf(13-13): error 1209: Section [destinationdirs] is defined multiple times.
....\pcm\WinMSRDriver\Win7\MSR.inf(28-28): error 1209: Section [sourcedisksfiles] is defined multiple times.
Tried DDK 10.0.15063.0 also. Same issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.