SMART(Self-Monitoring, Analysis, and Reporting Technology)是一種普及度比較高的磁盤分析檢測工具,磁盤運行過程當中,該工具蒐集磁盤的狀態參數,如型號、容量、溫度、密度、扇區、尋道時間、傳輸、誤碼率等。能夠作到動態檢測磁盤狀態,當某些參數達到閾值時,會警示磁盤故障。html
SMART包括2個工具,守護進程smartd和應用程序smartctl。守護進程用來檢測、監控、分析、上報磁盤信息,有對應的配置維護。smartctl用以檢查磁盤的運行狀態信息。工具
下面簡單列舉smartctrl的經常使用用法:.net
smartctl -a
smartctl -s on
smartctl -H
smartctl -A
smartctl -t long
smartctl -t short
smartctl -C -t
smartctl -X
smartctl -l selftest
smartctl -l error
通常會在守護進程smartd中配置一些高級功能,好比,定時檢測、分析彙總、上報等。能夠編輯smartd.conf進行配置。經常使用的配置項:htm
/dev/sde -d hpt,1/1 -a -s S/../.././01 #天天1:00-2:00 am,進行短自檢
/dev/sde -d hpt,1/2 -a -s S/../.././02 #天天2:00-3:00 am,進行短自檢
/dev/sde -d hpt,1/3 -a -s S/../.././03 #天天3:00-4:00 am,進行短自檢
/dev/sde -d hpt,1/4/1 -a -s L/../../7/00 #每週日00:00-01:00 am,進行長自檢
/dev/sde -d hpt,1/4/2 -a -s L/../../7/02 #每週日02+00-03:00 am,進行長自檢
【參考】http://smartmontools.sourceforge.net/man/smartd.conf.5.html進程