New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Sensor / Method to Track CPU of SQL instance / process

Votes:

0

Your Vote:

Up

Down

Support:

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?

thanks,

Todd

cpu-load sql sql-instance

Created on Dec 17, 2018 3:43:31 PM by  tknower (10) 1



1 Reply

Votes:

0

Your Vote:

Up

Down

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.

Regards

Florian Rossmark

www.it-admins.com

Created on Dec 18, 2018 2:56:35 PM by  Florian Rossmark (4,186) 3 2



Please log in or register to enter your reply.


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.