I am using this query in different servers to pull the CPU usage and its showing accurate results,
only in one server it shows always 0.00000% sql CPU usage
any suggestions how can i resolve this issue
create proc CpuTimeInPercentageForNigeos as begin DECLARE @CPU_BUSY int , @IDLE int SELECT @CPU_BUSY = @@CPU_BUSY , @IDLE = @@IDLE WAITFOR DELAY '000:00:01' SELECT (@@CPU_BUSY - @CPU_BUSY)/((@@IDLE - @IDLE + @@CPU_BUSY - @CPU_BUSY) * 1.00) *100 AS CPUBusyPct end go
k