← 返回命令列表

Linux command

smartd 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start smartd

smartd -d

Start with a specific configuration file

smartd -c [/etc/smartd.conf]

Check configuration file syntax

smartd -q onecheck

Run once and exit

smartd -q onecheck -d

Set polling interval

smartd -i [1800]

说明

smartd is a daemon that monitors SMART (Self-Monitoring, Analysis and Reporting Technology) data from ATA/SATA and SCSI/SAS hard drives and SSDs. It detects degraded drives and predicts failures before data loss occurs. The daemon polls devices at configurable intervals (default 30 minutes), logging changes to SMART attributes via syslog. It can send email alerts, run custom scripts, or execute tests when problems are detected. Configuration is stored in /etc/smartd.conf, listing devices to monitor with their options. Without a config file, smartd scans and monitors all SMART-capable devices.

参数

-d
Run in foreground (debug mode); do not fork into background
-c _file_
Use specified configuration file instead of /etc/smartd.conf
-i _N_
Set interval between disk checks in seconds (default: 1800)
-l _facility_
Use specified syslog facility for logging
-p _file_
Write PID to specified file
-q _option_
Quiet mode options: errors, nodev, nodev0, never, onecheck, showtests
-r _type_
Report ATA errors as type (ioctl, bpt)

FAQ

What is the smartd command used for?

smartd is a daemon that monitors SMART (Self-Monitoring, Analysis and Reporting Technology) data from ATA/SATA and SCSI/SAS hard drives and SSDs. It detects degraded drives and predicts failures before data loss occurs. The daemon polls devices at configurable intervals (default 30 minutes), logging changes to SMART attributes via syslog. It can send email alerts, run custom scripts, or execute tests when problems are detected. Configuration is stored in /etc/smartd.conf, listing devices to monitor with their options. Without a config file, smartd scans and monitors all SMART-capable devices.

How do I run a basic smartd example?

Run `smartd -d` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -d do in smartd?

Run in foreground (debug mode); do not fork into background