Module monitor smartd
log files to collect HDD/SSD S.M.A.R.T attributes.
Requirements:
smartmontools
It produces following charts for SCSI devices:
-
Read Error Corrected
-
Read Error Uncorrected
-
Write Error Corrected
-
Write Error Uncorrected
-
Verify Error Corrected
-
Verify Error Uncorrected
-
Temperature
For ATA devices:
-
Read Error Rate
-
Seek Error Rate
-
Soft Read Error Rate
-
Write Error Rate
-
SATA Interface Downshift
-
UDMA CRC Error Count
-
Throughput Performance
-
Seek Time Performance
-
Start/Stop Count
-
Power-On Hours Count
-
Power Cycle Count
-
Unexpected Power Loss
-
Spin-Up Time
-
Spin-up Retries
-
Calibration Retries
-
Temperature
-
Reallocated Sectors Count
-
Reserved Block Count
-
Program Fail Count
-
Erase Fail Count
-
Wear Leveller Worst Case Erase Count
-
Unused Reserved NAND Blocks
-
Reallocation Event Count
-
Current Pending Sector Count
-
Offline Uncorrectable Sector Count
-
Percent Lifetime Used
smartd
must be running with -A
option to write smartd attribute information to files.
For this you need to set smartd_opts
(or SMARTD_ARGS
, check smartd.service content) in /etc/default/smartmontools
:
# dump smartd attrs info every 600 seconds
smartd_opts="-A /var/log/smartd/ -i 600"
You may need to create the smartd directory before smartd will write to it:
mkdir -p /var/log/smartd
Otherwise, all the smartd .csv
files may get written to /var/lib/smartmontools
(default location). See also https://linux.die.net/man/8/smartd for more info on the -A --attributelog=PREFIX
command.
smartd
appends logs at every run. It's strongly recommended to use logrotate
for smartd files.
local:
log_path : '/var/log/smartd/'
If no configuration is given, module will attempt to read log files in /var/log/smartd/
directory.