直覺的想法是用排程執行 hdparm -C 把結果印到檔案中
但現在遇到了問題,請教各位前輩是否有類似的經驗
corntab排程執行hdparm時導向符號(>>)不能印出資訊
直接在console
hdparm -C /dev/sda >> test.txt
可以印出append至檔案中
但是同樣的指令加入排程中
* * * * * hdparm -C /dev/sda >> test.txt
卻沒有任何結果
曾經嘗試過將hdparm 寫到一個script中,crontab再去執行script
script大致如下
date >> test.txt
hdparm -C /dev/sda >> test.txt
結果只有 date 的結果印到檔案中
直觀看來是haparm這個程式的問題,不知道問題出在那裡
--
All Comments