Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SkaTeMasTer/cd4b801976f9f7cdf325cea062802fe8 to your computer and use it in GitHub Desktop.
Save SkaTeMasTer/cd4b801976f9f7cdf325cea062802fe8 to your computer and use it in GitHub Desktop.
How to remove the user slice messages on my raspberry pi. (every five mins it writes to log)
1) Filter them out by creating /etc/rsyslog.d/ignore-systemd-session-slice.conf with the following contents:
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 "Removed Slice" or $msg contains "Stopping user-") then stop
and restart rsyslogd with systemctl restart rsyslog
-OR-
2) set the systemd logging level a bit higher by editing /etc/systemd/system.conf:
LogLevel=notice
References: https://access.redhat.com/solutions/1564823
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment