I am trying to see if it is possible to use PRTG to monitor the memory and CPU usage of a individual service
7 Replies
I have never done this but it looks interesting. Checkout these articles:
http://technet.microsoft.com/en-us/library/ee198925.aspx
http://aspalliance.com/806_CodeSnip_Get_memory_size_usage_using_WMI_and_NET_20
You could use WMI Process sensors
Even better Patrick. Thanks!
This is possible with new Custom Sensor PTF.ProcessResourceXML
This sensor monitors a process and returns a channel for both the CPU and memory usage of the process. The new XML sensors can return multiple channels, so you only need one sensor to monitor both CPU and memory.
Parameters:
-s=process -c=computer [-u=username] [-p=password|passhash] -s= Name of the process. -c= Name or IP-Address of the computer running the process. -u= Optional Domain\Username of a user account hat has access to the computer via WMI service. -p= Optional Password or PassHash of a user account that has access to the computer via WMI service.
Note: This sensor requires PRTG version 8.2
The sensor can be downloaded from this page.
Created on Jan 18, 2011 10:21:23 AM by
PRTG Tools Family [prtgtoolsfamily.com]
(13,413)
●3
●4
With Windows 10 (and maybe earlier), Windows hosts its services under multiple instances of svchost.exe. I've been able to break them out so the service I'm interested in is running by itself under one instance of svchost.exe only differentiated by a command line parameter, but are there any ideas how I might just track the memory usage of a specific svchost.exe instance among the many? I've also checked and the PID is not consistent though I didn't expet it to be.
Hi there,
Unfortunately, the WMI Class "Win32_PerfRawData_PerfProc_Process" doesn't offer a "Commandline"-field which would allow you to filter for the exact svchost. Therefore I am afraid that this might not be possible to monitor via WMI. You could however build a PowerShell Script that runs on the server that sends it's results to PRTG via a HTTP Push Data Sensor:
https://www.paessler.com/manuals/prtg/http_push_data_advanced_sensor
Best regards.
I may have a different approach. I copied svchost.exe to svchost1.exe and modified the service to use it instead.
Please log in or register to enter your reply.
Add comment