What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags

View all Tags

Sensor / Method to Track CPU of SQL instance / process




Is there a sensor / method of tracking the amount of CPU consumed by a particular Microsoft SQL instance. Currently, I've got my SQL instances configured to use all CPUs. I've also got a couple SQL instance configured to use specific CPUs. Is there a way to find out what part of a CPU utilization is being consumed by a particular Microsoft SQL instance?



cpu-load sql sql-instance

Created on Dec 17, 2018 3:43:31 PM

1 Reply



This sounds like a physical SQL server environment :-) in any case - yes you can - but you need to overcome some hurdles.

Please understand first that a SQL server will run as a service - eventually as a process. Each process gets assigned a process ID - respective PID - this PID is nothing else then a counter that will change increase with each executed process (in theory).

Conclusion: Every time your service starts you will have a different PID - making it hard to identity the specific SQL instance you are looking for while automating the identification.

PID or ProcessId is what you look for.

What you would engage is WMI - with those queries

  • SELECT * FROM Win32_Service
    • will list you all services and their ProcessId
    • to identify the SQL instances you might need to filter the executable path of the specific SQL service with the column PathName - assuming the Service Name or Display Name is not unique enough
  • SELECT * FROM Win32_PerfFormattedData_PerfProc_Process
    • will give you more detailed data about the CPU usage (performance data)
    • once you have the ProcessID / PID - you can filter here for the process and hopefully get what you want

If WMI does not help you - PowerShell might

In the end - you will need to script this - but you can accomplish it.

Personally I like the PowerShell approach a bit better cause it is more versatile and future proof. But I did not write such a script yet as for what you are looking for. Could be interesting, though.


Florian Rossmark


Created on Dec 18, 2018 2:56:35 PM

Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.