gpt4 book ai didi

c++ - 获取磁盘转速示例代码

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:17:12 25 4
gpt4 key购买 nike

我不太擅长 VC++,但有没有人有示例代码来获取计算机中磁盘的转速。我一直致力于检测 SSD 驱动器,整天研究的一个解决方案是获取转速,因为 SSD 的转速为 0 rpm,这可能是检测 SSD 驱动器的唯一方法。

最佳答案

来自 google wmi ssd detect

There is an NV cache manager interface used for ReadyDrive which is new to Vista. I think it is testing NV_FEATURE_PARAMETER's NVReadSpeed and NVWrtSpeed values.

Windows 7 detects SSDs by using ATA8-ACS identify word 217: Nominal media rotation rate, with value 0001h as Non-rotating media like solid state devices. But not all SSDs adhere to the ATA8-ACS1 spec section 7.16.7.77, some may need firmware updates.

If you want to lean more about sending ATA commands in Windows, I suggest you to dig aound the Storage Platform ATA forum. This forum is being archived so act quickly.


也很有启发性:

http://blogs.msdn.com/b/e7/archive/2009/05/05/support-and-q-a-for-solid-state-drives-and.aspx

SSD 上的磁盘碎片整理会默认禁用吗?

Yes. The automatic scheduling of defragmentation will exclude partitions on devices that declare themselves as SSDs. Additionally, if the system disk has random read performance characteristics above the threshold of 8 MB/sec, then it too will be excluded. The threshold was determined by internal analysis.

关于c++ - 获取磁盘转速示例代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5814371/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com