Logs coming with systemd messages: Created slice & Starting Session
Wednesday, March 1, 2017
Logs coming with systemd messages: Created slice & Starting Session :-
Normally thiss issue is come Centos/Linux/RHEL7 newely installed system. when i check following in /var/log/messages all the time show.Aug 23 06:40:20 example.com systemd: Created test user-0.test.
Aug 23 06:40:20 example.com systemd: Starting Session 150 of user root.
Aug 23 06:40:20 example.com systemd: Started Session 150 of user root.
Aug 23 06:40:20 example.com systemd: Created test user-0.test.
Aug 23 06:40:21 example.com systemd: Starting Session 151 of user root.
Aug 23 06:40:22 example.com systemd: Started Session 151 of user root.
Solution :-
These messages are normal and expected -- they will be seen any time a user logs in
To suppress these log entries in /var/log/messages, create a discard filter with rsyslog, e.g., run the following command:
echo 'if $programname == "systemd" and ($msg contains "Starting Session" or $msg contains "Started Session" or $msg contains "Created slice" or $msg contains "Starting user-") then stop' >/etc/rsyslog.d/ignore-systemd-session-slice.conf
Then restart the rsyslog service
systemctl restart rsyslog
0 comments:
Post a Comment