Monitoring disk activity programmatically (Windows)

In Windows 2008R2, in the "Resource Monitor" section of the "Disk Activity" section, I can see the number of bytes read / written to files. How can I do this programmatically, preferably using C # (or the Win32 API)? I looked at WMI and various performance counters, however I cannot figure out if there is something that fits my needs.

+3
source share
1 answer

Counters related to file I / O are in objects LogicalDiskand PhysicalDisk. Take a look at Perfmon to see which counters are available.

PerformanceCounter # PDH API C/++. WMI, .

+2

Source: https://habr.com/ru/post/1740840/


All Articles