CPU usage in percent

  • Hi to all.

    How I can get the CPU usage in percent by T-SQL query?

    Thank you for help.

  • 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 Plans
    SQL 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