systemd Starting Session

General support questions
benhakim2010
Posts: 4
Joined: 2014/07/01 22:56:08

systemd Starting Session

Postby benhakim2010 » 2014/10/02 20:27:45

hi.
i have a lot of logs into my /var/log/messages.
every second and every minute

Oct 2 23:23:01 server systemd: Starting Session 1398 of user root.
Oct 2 23:23:01 server systemd: Started Session 1398 of user root.
Oct 2 23:24:01 server systemd: Starting Session 1399 of user root.
Oct 2 23:24:01 server systemd: Started Session 1399 of user root.
Oct 2 23:25:01 server systemd: Starting Session 1400 of user root.
Oct 2 23:25:01 server systemd: Started Session 1400 of user root.
Oct 2 23:26:01 server systemd: Starting Session 1401 of user root.
Oct 2 23:26:01 server systemd: Started Session 1401 of user root.


how can i disable it?
or just to log errors?

User avatar
jyoung
Posts: 102
Joined: 2014/09/22 13:40:31
Location: Nashville, TN, USA

Re: systemd Starting Session

Postby jyoung » 2014/10/03 23:26:13

Modify /etc/rsyslog.conf so that you have this line:

Code: Select all

*.info;mail.none;authpriv.none;cron.none                /var/log/messages


Depending on what you want to do with the cron messages, you could add something like this:

Code: Select all

# Log cron to its own log
cron.*                                                 /var/log/cron.log


Create the file /etc/logrotate.d/cronlog
/var/log/cronlog {
compress
create 0644 root root
daily
dateext
ifempty
rotate 7
shred
postrotate
/usr/bin/killall -HUP crond 2>/dev/null || true
endscript


Restart rsyslog for your changes to take effect:

Code: Select all

systemctl restart rsyslog
-- Jeremy --

benhakim2010
Posts: 4
Joined: 2014/07/01 22:56:08

Re: systemd Starting Session

Postby benhakim2010 » 2014/10/04 19:16:15

my /etc/rsyslog.conf:

Code: Select all

*.info;mail.none;authpriv.none;cron.none                /var/log/messages


which thing i need to change?

Pascal666
Posts: 12
Joined: 2013/08/29 15:41:00
Location: Chicagoland

Re: systemd Starting Session

Postby Pascal666 » 2014/10/30 16:39:23

Appears to be a common problem. Only fix I have found is to run the command "/usr/bin/systemd-analyze set-log-level notice". You will also need to add it to /etc/rc.local so it takes effect at each boot. If you have not already done so you will also need to enable that file (as specified in the instructions in the top of it) by running "chmod +x /etc/rc.d/rc.local".

durchd8.de
Posts: 6
Joined: 2015/01/09 14:58:55

Re: systemd Starting Session

Postby durchd8.de » 2015/01/13 14:32:45

Code: Select all

vi /etc/systemd/system.conf


change
#LogLevel=info


to

LogLevel=notice


Return to “CentOS 7 - General Support”

Who is online

Users browsing this forum: No registered users and 1 guest