Hi every body, I have a Nagios plugin which is calucalating "Average latch wait time(ms)",But some of the reasons we found that this pluin giving Nagative values. Queries running by plugin, SELECT cntr_value FROM master.dbo.sysperfinfo WHERE counter_name = 'Average Latch Wait Time (ms)' AND object_name = 'SQLServer:Latches' SELECT cntr_value FROM master.dbo.sysperfinfo WHERE counter_name = 'Average Latch Wait Time Base' AND object_name = 'SQLServer:Latches' By taking above two values plugin is doing some other calucalation and giving out put(most of time nagatives) I want to know how to calucalate "Average latch wait time(ms)" at any poing of time, Please some provide me Script which can calucalate Average latch wait time(ms) at any point of time. Thanks in advance
Hi Luis Martin, thanks for reply..... At this point I did not checked with performance monitor,erlier to this plugin deplyment I checked with Perfmon,I never get the nagative values. Thanks in advance
Thanks Luis Martin, We are taking out that plugin any way,could you please explan how perfmon calucalating 'Average Latch Wait Time (ms)' or If you give script also helpful for me.
Performance Monitor---> SQL Server:Latches---> Average Latch Time (ms). Adding this counter you can see Average, Minimum and Maximum values. Also you can Generate Data Collector Set with Performance Monitor and export to CSV and import with Excel. Check BOL for those options.