Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Installing/Using Processor Counter Monitor as a service (Windows)

gveld
Новичок
5 950Просмотр.

I'm currently using the Processor Counter Monitor on Windows. We'd like to monitor these metrics in our monitoring software (Zabbix).
I've read that we can install the Processor Counter Monitor as a service on Windows, which adds the metrics to perfmon. We can then import the metrics from perfmon into Zabbix.

I'm having some issues with installing the Processor Counter Monitor as a service on Windows.
When executing PCM-service.exe we get a popup window which states that the service cannot be started, it needs to be installed with installutil.exe

I couldn't find any documentation on how to install the Processor Counter Monitor as a service. Can someone tell me how to install it as a service?

0 баллов
1 Решение
Thomas_W_Intel
Сотрудник
5 950Просмотр.

github doesn't seem to like rtf files, but if you download the raw file and open it, you can see the content. Here is the part on the PCM-service:

 

Graphical Perfmon front end:

1.            Compile the windows MSR driver (msr.sys) with Windows* DDK Kit (see the sources in the WinMSRDriver directory). For Windows 7 you have to sign the msr.sys driver additionally (http://msdn.microsoft.com/en-us/library/ms537361(VS.85).aspx).

2.            Copy msr.sys into the c:\windows\system32 directory

3.            Build pcm-lib.dll in the PCM-Lib_Win directory using Microsoft* Visual Studio

4.            Build 'PCM-Service.exe' in the PCM-Service_Win directory using Microsoft* Visual Studio

5.            Copy PCM-Service.exe, PCM-Service.exe.config, and pcm-lib.dll files into a single directory

The config file enables support for legacy security policy. Without this configuration switch, you will get an exception like this:

Unhandled Exception: System.NotSupportedException: This method implicitly uses CAS policy, which has been obsoleted by the .NET Framework.
 

6.            With administrator rights execute '"PCM-Service.exe" -Install' from this directory

7.            With administrator rights execute 'net start pcmservice'

8.            Start perfmon and find new PCM* counters

If you do not want or cannot compile the msr.sys driver you might use a third-party open source WinRing0 driver instead. Instructions:

  1. Download the free RealTemp utility package from http://www.techpowerup.com/realtemp/ or any other free utility that uses the open-source WinRing0 driver (like OpenHardwareMonitor http://code.google.com/p/open-hardware-monitor/downloads/list).
  2. Copy WinRing0.dll, WinRing0.sys, WinRing0x64.dll, WinRing0x64.sys files from there into the PCM.exe binary location, into the PCM-Service.exe location and into c:\windows\system32
  3. Run the PCM.exe tool and/or go to step 6 (perfmon utility).

Просмотреть решение в исходном сообщении

4 Ответы
Thomas_W_Intel
Сотрудник
5 950Просмотр.

The WINDOWS_HOWTO.rtf includes a description for setting up the Windows service. However, I have to confess that I have not used it for a while.

gveld
Новичок
5 950Просмотр.

Thomas Willhalm (Intel) wrote:
The WINDOWS_HOWTO.rtf includes a description for setting up the Windows service. However, I have to confess that I have not used it for a while.

Where can I find this file? The one on Github is of no use (https://github.com/opcm/pcm/blob/master/WINDOWS_HOWTO.rtf)

I also found this:
https://github.com/opcm/pcm/tree/master/PCM-Service_Win
"From the command line, run:  PMU Service.exe -Install"

Problem is there is no such executable "PMU Service.exe"..
PCM-service.exe doesn't accept the -install command either..

Thomas_W_Intel
Сотрудник
5 951Просмотр.

github doesn't seem to like rtf files, but if you download the raw file and open it, you can see the content. Here is the part on the PCM-service:

 

Graphical Perfmon front end:

1.            Compile the windows MSR driver (msr.sys) with Windows* DDK Kit (see the sources in the WinMSRDriver directory). For Windows 7 you have to sign the msr.sys driver additionally (http://msdn.microsoft.com/en-us/library/ms537361(VS.85).aspx).

2.            Copy msr.sys into the c:\windows\system32 directory

3.            Build pcm-lib.dll in the PCM-Lib_Win directory using Microsoft* Visual Studio

4.            Build 'PCM-Service.exe' in the PCM-Service_Win directory using Microsoft* Visual Studio

5.            Copy PCM-Service.exe, PCM-Service.exe.config, and pcm-lib.dll files into a single directory

The config file enables support for legacy security policy. Without this configuration switch, you will get an exception like this:

Unhandled Exception: System.NotSupportedException: This method implicitly uses CAS policy, which has been obsoleted by the .NET Framework.
 

6.            With administrator rights execute '"PCM-Service.exe" -Install' from this directory

7.            With administrator rights execute 'net start pcmservice'

8.            Start perfmon and find new PCM* counters

If you do not want or cannot compile the msr.sys driver you might use a third-party open source WinRing0 driver instead. Instructions:

  1. Download the free RealTemp utility package from http://www.techpowerup.com/realtemp/ or any other free utility that uses the open-source WinRing0 driver (like OpenHardwareMonitor http://code.google.com/p/open-hardware-monitor/downloads/list).
  2. Copy WinRing0.dll, WinRing0.sys, WinRing0x64.dll, WinRing0x64.sys files from there into the PCM.exe binary location, into the PCM-Service.exe location and into c:\windows\system32
  3. Run the PCM.exe tool and/or go to step 6 (perfmon utility).
gveld
Новичок
5 950Просмотр.

Thanks, that actually works. It's up and running now.
Good to know that github messes up the .rtf files.

Ответить