12

I am getting "Created slice user-0.slice." and "Starting Session 2025 of user root." in /var/log/messages in CentOS 7.  Can someone explain what they are?

[root@bew /]# tail -f /var/log/messages
May 26 21:20:01 bew systemd: Created slice user-0.slice.
May 26 21:20:01 bew systemd: Starting Session 2025 of user root.
May 26 21:20:01 bew systemd: Started Session 2025 of user root.
May 26 22:22:33 bew systemd: Stopping System Logging Service...
May 26 22:22:33 bew systemd: Starting System Logging Service...
May 26 22:22:33 bew systemd: Started System Logging Service.
May 26 22:30:01 bew systemd: Created slice user-0.slice.
May 26 22:30:01 bew systemd: Starting Session 2026 of user root.
May 26 22:30:01 bew systemd: Started Session 2026 of user root.
1
  • especially given that it times-out on debian shutdown
    – user289814
    Commented Jul 29, 2015 at 14:44

2 Answers 2

5

These are low priority "info"-level messages related to session and resource management. You can avoid them via

# systemd-analyze set-log-level notice
1
  • Do these message mean that there was a successful login for user root?
    – qwertzguy
    Commented Feb 25, 2018 at 20:32
2

According to Red Hat,

These messages are normal and expected -- they will be seen any time a user logs in.

If you don’t want to see these messages, Red Hat propose an alternate solution to prevent them from being logged while still keeping other info-level messages from the systemd service:

  1. Modify rsyslog to create a discard filter by running 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
    
  2. Restart the rsyslog service:

    systemctl restart rsyslog
    
1
  • Had to change if statement to if $programname contains "systemd" because program name is called systemd-logind
    – Aidas
    Commented Jan 15, 2019 at 10:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .