Quickly Check SQL Server CPU Pressure

Following query results how many threads are waiting to be executed on the server, if there are more than two threads waiting to be executed on a server, then that server can be assumed to have a CPU bottleneck and this is a first sign that you need to start troubleshooting the issue in this area.

 

IF OBJECT_ID(‘tempdb..#CPUTemp’) IS NOT NULL
Drop Table #CPUTemp

Create Table #CPUTemp (States varchar(300), TValue varchar(30))
insert into #CPUTemp(States, TValue)
EXEC(‘dbcc sqlperf(umsstats)’)

select * from #CPUTemp where States like ‘%num runnable’ and TValue > ‘2’

 

 

 

Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (12 votes, average: 5.00 out of 5)
Loading...

3 thoughts on “Quickly Check SQL Server CPU Pressure

Add Comment