WMI query to calculate disk latency

  • curious_sqldba

    SSC-Dedicated

    Points: 36303

    I am wondering if any has used WMI query to calculate disk latency. I have this 3rd part cloud monitoring tool which apparently does not capture disk latency by default ( what !!!!!), so i have to create a custom alert to capture drive latency.

    I am open for other ideas also. My goal is to capture drive latency .

     

    Get-WmiObject -Query "select ( $_AvgDisksecPerRead / $_AvgDisksecPerRead_Base) from Win32_PerfRawData_PerfDisk_LogicalDisk where Name='E:' "

  • Sue_H

    SSC Guru

    Points: 90673

    I've used that but I tend to use sys.dm_io_virtual_file_stats more often. Which way you go can depend on your work environment - as in some may not trust what SQL Server reports for whatever reasons and prefer to monitor the values from windows. But the two usually end up being pretty similar depending on if the server is a dedicated SQL Server or whatever else it may be used for.

    Sue

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply