作者terryone (???)
看板Python
标题[问题] 在windows下获得disk的已经使用时间
时间Fri Jan 26 11:03:51 2018
上网找了很久都找不到有办法可以用python取得disk的已经使用时间(power on hours)
S.M.A.R.T crystaldiskinfo等工具都可以取得
有人知道怎麽用Python取得吗?
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 60.250.205.229
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1516935834.A.320.html
1F:→ uranusjr: Python 有一堆 SMART 函式库啊自己去 Google 好吗 01/26 11:14
小弟真心找不到 找到也都是linux环境的函式库 大大如果知道的话提示一下吧
※ 编辑: terryone (60.250.205.229), 01/26/2018 11:47:00
3F:→ s860134: "It works under Linux and Windows" 01/26 13:11
4F:→ s860134: 看来不太行QQ 我再找找 01/26 13:39
谢谢上面的朋友帮忙找 我决定直接用C++写lib 在用python call了QQ
※ 编辑: terryone (60.250.205.229), 01/26/2018 14:10:45
5F:→ s860134: crystaldiskinfo 有提供 command 方式 01/26 14:21
6F:→ s860134: subprocess "DiskInfo32S.exe /Exit" 01/26 14:22
7F:→ s860134: 会产生CrystalDiskInfo\Smart\[disksn]\PowerOnHours.csv 01/26 14:23
8F:→ s860134: 直接去爬 csv 一行 code 都不用写 前提是要有装 crystal 01/26 14:24
9F:→ s860134: 如果要写 C ,crystaldiskinfo 也有原始码,可以爬看看 01/26 14:25
10F:→ s860134: C++ 01/26 14:25
好的了解 我直接用C++完成这功能了
※ 编辑: terryone (60.250.205.229), 01/26/2018 15:33:17