Catalogue
CentOS 7 的 /var/log/messages 系統紀錄內會大量出現 slice User 的訊息如下:
1 | Aug 18 08:34:49 ct-squid systemd: Removed slice User Slice of root. |
主要的原因是和 systemd 服務有關, 可以透過紀錄篩選規則設定, 來隱藏這些 slice User 訊息, 設定方式如下:
1 | echo 'if $programname == "systemd" and ($msg contains "Starting Session" or $msg contains "Started Session" or $msg contains "Created slice" or $msg contains "Starting user-" or $msg contains "Starting User Slice of" or $msg contains "Removed session" or $msg contains "Removed slice User Slice of" or $msg contains "Stopping User Slice of") then stop' >/etc/rsyslog.d/ignore-systemd-session-slice.conf |