Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to monitor how much data is being written on my hard drive each day. I came across the ;Win32_PerfFormattedData_PerfDisk_PhysicalDisk Class, and tried using it, but it returns different values, among them 0.
My questions are:

- Why do these values keep changing?
- I got two instances from this class and I do not know the meaning of the attribute Name, which has different values in each instance: the first one is C: D: and the second value is _Total. Which instance should I use to get the performance of the hard drive ?
Posted
Updated 1-Apr-14 6:22am
v3
Comments
[no name] 1-Apr-14 9:13am    
This question doesn't make sense. This won't tell you how much data was written per day.
"returns different values among them 0 values" - which values are you talking about?
Rage 1-Apr-14 12:18pm    
Here the link to the class description:
http://msdn.microsoft.com/en-us/library/aa394262%28v=vs.85%29.aspx

Can you post your code ?

1 solution

OK, if you want to know how many data were written on the hard drive each day, i think you need to change your logic. You need to check the hdd capacity and free space on the beginning of day, then free space at the end of day. It would return the growth (increment) of the data saved on HDD.

For further information, please see:
WMI Tasks: Disks and File Systems[^]
WMI Tasks: Performance Monitoring[^]
WMI C++ Application Examples[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900