WMI硬盘性能 [英] WMI HDD performance

查看:241
本文介绍了WMI硬盘性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要监控每天在硬盘上写入的数据量。我遇到了; Win32_PerfFormattedData_PerfDisk_PhysicalDisk 类,并尝试使用它,但它返回不同的值,其中包括0.

我的问题是:



- 为什么这些值会不断变化?

- 我从这个类中得到了两个实例,我不知道属性Name的含义,在每个实例中具有不同的值:第一个是 C:D:,第二个值是 _Total 。我应该使用哪个实例来获得硬盘的性能?

解决方案

好的,如果你想知道每天在硬盘上写了多少数据,我认为你需要改变你的逻辑。您需要在一天开始时检查硬盘容量和可用空间,然后在一天结束时检查可用空间。它将返回保存在HDD上的数据的增长(增量)。



有关详细信息,请参阅:

WMI任务:磁盘和文件系统 [ ^ ]

WMI任务:性能监控 [ ^ ]

WMI C ++应用程序示例 [ ^ ]

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 ?

解决方案

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[^]


这篇关于WMI硬盘性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆