Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

CPU usage in percent Expand / Collapse
Author
Message
Posted Wednesday, April 30, 2014 1:52 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, April 30, 2014 5:45 AM
Points: 1, Visits: 7
Hi to all.
How I can get the CPU usage in percent by T-SQL query?
Thank you for help.
Post #1566253
Posted Wednesday, April 30, 2014 2:36 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 6:38 AM
Points: 13,755, Visits: 28,147
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
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1566265
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse