politruk
Grasshopper
Points: 13
More actions
April 30, 2014 at 1:52 am
#307098
Hi to all.
How I can get the CPU usage in percent by T-SQL query?
Thank you for help.
Grant Fritchey
SSC Guru
Points: 398679
April 30, 2014 at 2:36 am
#1709733
Assuming you don't have throttling enabled and just have the default group, you can get it from here:
SELECT * FROM sys.dm_os_performance_counters AS dopc
WHERE dopc.counter_name = 'cpu usage %'
AND dopc.instance_name = 'internal'
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"- Theodore Roosevelt
Author of:SQL Server Execution PlansSQL Server Query Performance Tuning
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply