看板 Python 關於我們 聯絡資訊
上網找了很久都找不到有辦法可以用python取得disk的已經使用時間(power on hours) S.M.A.R.T crystaldiskinfo等工具都可以取得 有人知道怎麼用Python取得嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.250.205.229 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1516935834.A.320.html
uranusjr: Python 有一堆 SMART 函式庫啊自己去 Google 好嗎 01/26 11:14
小弟真心找不到 找到也都是linux環境的函式庫 大大如果知道的話提示一下吧 ※ 編輯: terryone (60.250.205.229), 01/26/2018 11:47:00
s860134: "It works under Linux and Windows" 01/26 13:11
s860134: 看來不太行QQ 我再找找 01/26 13:39
謝謝上面的朋友幫忙找 我決定直接用C++寫lib 在用python call了QQ ※ 編輯: terryone (60.250.205.229), 01/26/2018 14:10:45
s860134: crystaldiskinfo 有提供 command 方式 01/26 14:21
s860134: subprocess "DiskInfo32S.exe /Exit" 01/26 14:22
s860134: 會產生CrystalDiskInfo\Smart\[disksn]\PowerOnHours.csv 01/26 14:23
s860134: 直接去爬 csv 一行 code 都不用寫 前提是要有裝 crystal 01/26 14:24
s860134: 如果要寫 C ,crystaldiskinfo 也有原始碼,可以爬看看 01/26 14:25
s860134: C++ 01/26 14:25
好的了解 我直接用C++完成這功能了 ※ 編輯: terryone (60.250.205.229), 01/26/2018 15:33:17