smartctl 的日志怎么输出到 syslog 里面

4次阅读

共计 607 个字符,预计需要花费 2 分钟才能阅读完成。

想要定时执行 smartctl 的 self-test,并且通过扫描 syslog 的日志在 motd 中展示是否自检通过。

但是执行 smartctl -t short /dev/sda 始终无法将日志输出到 syslog 中,不知道哪里漏配置了还是啥。

大概像下面这样的日志,,曾经不知道输入了啥出现过,后来就再也出不来了,有大佬知道吗

2024-08-06T01:44:51.359610+08:00 debian smartd[2350]: Device: /dev/sda [SAT], self-test in progress, 70% remaining
2024-08-06T02:14:51.595760+08:00 debian smartd[2350]: Device: /dev/sda [SAT], self-test in progress, 30% remaining
2024-08-06T02:44:51.875260+08:00 debian smartd[2350]: Device: /dev/sda [SAT], self-test in progress, 10% remaining
2024-08-06T03:14:51.159457+08:00 debian smartd[2350]: Device: /dev/sda [SAT], previous self-test completed without error

还想问一下,通过 crontab 的方式定时执行自检这种方案合理吗

正文完
 0