question

SqlAdv avatar image
SqlAdv asked

sys.dm_os_performance_counters

When you want to execute the Batch requests/sec via sys.dm_os_performance_counters every couple of minutes, how do you get the max and min value (meaningful values) by manipulating cntr_value. Any idea? Please help. Thanks.
dmv
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
To make those values have meaning beyond the immediate use, you would have to capture them somewhere over time. Then you can simply capture a min and max value from the table/file/whatever where you've captured the data.
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

SqlAdv avatar image SqlAdv commented ·
Hi Grant. It is always an honor to get your response. I am confused on how to interpret the values as the cntr_value is incrementing while the cntr_time is changing every ten mins. The table has 2 columns:- the cntr_time and cntr_value cntr_time cntr_value 2011-05-18 09:20:00.203 207446617 2011-05-18 09:30:00.750 207488732 2011-05-18 09:40:01.407 207531059 2011-05-18 09:50:00.383 207572979 Could you please expalain a little bit as the min and max value will be the first entry and the last entry. Is this the expected behavior?
0 Likes 0 ·
Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
Despite the definition that the value is supposed to be a counter of per second batches, it seems to be a cumulative value. It might not be helpful for you unless you then did the math to determine the differences between the times you sample.
0 Likes 0 ·
SqlAdv avatar image SqlAdv commented ·
Thank you Sir.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.