0

I want to find performance of single process, as example "MSSQLSERVER"

Which commands I should write to find out 2 things:

  1. RAM utilized by MSSQLSERVER
  2. CPU utilized by MSSQLSERVER

I have found command to get service, but not able to get CPU & RAM usage.

3
  • Get-Process and Measure-Object are your friends. Commented Jun 11, 2014 at 7:19
  • How about using Performance Monitor to look at Sql Server? Commented Jun 11, 2014 at 7:45
  • Thanks for advise mate, I know that way, actually I want to get performance of another service, SQLServer is taken as example here (mentioned in question) I want to achieve this using power shell only. Commented Jun 12, 2014 at 8:41

2 Answers 2

3
Get-Process -Name sqlservr | Select-Object ProcessName, CPU, PM
Sign up to request clarification or add additional context in comments.

Comments

0

as @vonPryz has suggested you may be interrested to use the performance counters. Here is a starting point :

  1. find all the counterset related to sql Get-Counter -ListSet "*" | ?{ $_.countersetname -match "sql"} | select -Unique countersetname
  2. pick a set from the list above and run get-counter Get-Counter -ListSet "SQLServer:Workload Group Stats" |get-counter -SampleInterval 10 -MaxSamples 3}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.