为了在某些磁盘上生成指标,我设置了一个systemd.timer + systemd.service
该计时器每 10 秒旋转一次,我希望避免每次生成这个小脚本然后成功时都会向我的日志发送垃圾邮件。
日记像这样写了多行
Jan 04 17:21:31 hostname systemd[1]: personal.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit personal.service has successfully entered the 'dead' state.
此外,每次服务启动都会进行审核
Jan 04 17:22:31 hostname audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=personal comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 04 17:22:31 hostname kernel: audit: type=1131 audit(1578158551.035:11612): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=personal comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'