I am trying to build a tool which is something similar to Task Manager. I was able to get the CPU and Memory of each processes, but I couldn't figure out the Disk statistics. I was able to get the I/O Read, Write bytes, but it includes all file, disk and network. How could I get only the Disk Utilized by each processes??
Otherwise is it possible to segregate the disk statistics from those I/O bytes? If yes, how could I do it?
Asked
Active
Viewed 1,853 times
4

HariDev
- 508
- 10
- 28
-
3Have you tried to find answer in the source codes of Process Hacker ( http://processhacker.sourceforge.net/downloads.php ) or any other open source project with this functionality? – Ilya Oct 05 '15 at 12:29
-
3Possible duplicate of [Programmatically getting per-process disk io statistics on Windows?](http://stackoverflow.com/questions/1639903/programmatically-getting-per-process-disk-io-statistics-on-windows) – Simon Kraemer Oct 05 '15 at 13:07
-
@SimonKraemer You're correct, but the answer of that one is not acceptable. Because it just gives all the data like disk, file, network, etc as mentioned above. It does not give only the disk usage. – HariDev Oct 05 '15 at 17:04
-
@Ilya Those binaries were amazing. I'd go through the source and check whether it could help to translate into c++. Thanks. – HariDev Oct 05 '15 at 17:11
-
@WinAppy `\ProcessHacker\procprv.c` - `VOID PhProcessProviderUpdate` Enjoy debugging. – Blacktempel Oct 06 '15 at 07:31
-
@HariDev Did you figure it out? Is there a way to get disk only statistics? – Anirudh Jayakumar Dec 15 '16 at 18:26
-
@AnirudhJayakumar Nope :( – HariDev Dec 16 '16 at 03:56
-
Process Hacker only gives you total IO utilization. If you look in procprv.c around line 2236 - you can see there's no separation between network and disk IO - it just takes the total IO – Malcolm Swaine Mar 17 '19 at 19:58
-
You could possibly use this total IO and subtract it from the Network IO (see this answer I posted a while back https://stackoverflow.com/questions/44689482/how-to-monitor-process-network-usage-under-windows/55085910#55085910 ) to get the disk portion – Malcolm Swaine Mar 17 '19 at 20:01