How to programmatically determine hard drive activity without using performance monitors

Is there a way to programmatically determine how busy a physical disk is in C # without using System.Diagnostics.PerformanceCounter ?

I ask because the documentation for System.Diagnostics.PerformanceCounter states that the user requires elevated privileges and must be an administrator or a member of the user group of performance counters. I do not have any of these as an option, and I must assume that the user is running my process in the user account.

In my opinion, any process running under a user account that does not have administrator rights will have limited access to information about the system, if any ...

+3
source share
1 answer

I do not know an alternative, and if PerformanceCounter requires elevated privileges, I do not understand why there is no possible alternative =)

Is it impossible to create a service that works with elevated privileges, which provides information that you are interested in through its own API?

+4
source

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


All Articles