Comments
1 comment
-
Hi @mOhAmAdreZa0011,
Redgate Monitor collects this query from the WMI performance counter class Win32_PerfRawData_PerfProc_Process, looking at the various SQL Server processes and getting the PercentProcessorTime property for that specific metric.
The counter is a cumulative counter, and so the presented data is calculated from the sampled data by dx(PercentProcessorTime)/dt(SampleTime).
The sample is stored in the repository as a point in time value of the cumulative counter with the sample time in ticks.
It's a more complicated query than WMI can handle, I think, to get the value that is displayed, so you would need to do something like:SELECT PercentProcessorTime FROMÂ Win32_PerfRawData_PerfProc_Process WHERE Name = 'sqlservr'
And then run it again 15 seconds later and then calculate taking the difference of (second sample - first sample) / (second sample time - first sample time).
And/or you can look at the equivalent perfmon counter and at the value every 15 seconds from when the Base Monitor service started to see if it matches up.
Kind regards,
Alex
Add comment
Please sign in to leave a comment.
Thanks in advance!