如何透過 SSH 讀取 S.M.A.R.T 資料?

我剛花了一個小時搜尋論壇、問 Google,還用 ssh 在我的 TS-932PX(跑 qts 5.2.9)上到處探索,只是為了做一個看起來很簡單的事情:

用 ssh/cli 讀取硬碟的 S.M.A.R.T. 資料(我知道 webui 的硬碟&快照區塊裡有個子子視窗可以查看,但沒有出口可以匯出)。

系統裡沒有 smartctl,也沒看到其他明顯的工具(而且 QTS 對於 CLI 工具的文件好像也不怎麼完善……)

那麼,我要怎麼透過 ssh/cli 讀取 S.M.A.R.T. 資料呢??

你可以使用 qcli 來做到這點

qcli -l user=admin pw=adiminpassword saveauthsid=yes

qcli_hdd -m diskID=00000001

如果你想查詢所有內置硬碟的資訊,這裡有一個我的 NAS 示範結果:


AttrID Description                  Value WorstValue Threshold RawValue     Status
5      Retired_Block_Count          100   100        010       0            Good
9      Power-On_Hours               093   093        000       31556        Good
12     Power_Cycle_Count            099   099        000       10           Good
177    Wear_Range_Delta             076   076        000       233          Good
179    Used_Rsvd_Blk_Cnt_Tot        100   100        010       0            Good
181    Program_Fail_Count           100   100        010       0            Good
182    Erase_Fail_Count             100   100        010       0            Good
183    Runtime_Bad_Block            100   100        010       0            Good
187    Reported_Uncorrect_Error     100   100        000       0            Good
190    Airflow_Temperature_Cel      072   052        000       28           Good
195    ECC_On-The-Fly_Error         200   200        000       0            Good
199    SATA_R-Error_Count           100   100        000       0            Good
235    Power_Fail_Backup_Health     099   099        000       4            Good
241    Total_LBA_Written            099   099        000       947979410554 Good