-5

How to find CPU usage idle, user, system, IO for Analyses using SQL Query in SQL Server

Christian Barron
  • 2,695
  • 1
  • 14
  • 22
Rakesh
  • 261
  • 1
  • 2
  • 15
  • There's not a lot to this question. What have you even tried? Why is Activity Monitor in SSMS not enough? – Christian Barron Jun 05 '15 at 10:31
  • using exec sp_who2 am not getting idle, user, system, IO. – Rakesh Jun 05 '15 at 10:34
  • If status is sleeping it's idle, Hostname or SPID or Login will give you user, program name will give you system, DiskIO gives you IO, CPUTime will give you CPU usage. What more are you wanting? – Christian Barron Jun 05 '15 at 10:37

1 Answers1

0

The command you are looking for in SQL Server is this:

exec sp_who2

CPU Usage - CPUTime

Idle - Status (Sleeping)

User - Login / Hostname / SPID (Depending on what you mean by user)

System - ProgramName

IO - DiskIO

Christian Barron
  • 2,695
  • 1
  • 14
  • 22