top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

CentOS 7: System log has repeated lines: Started session 123 of user root.

0 votes
799 views

The system log (/var/log/messages) of a CentOS 7.2 system has frequently-repeated message line pairs like:

Jul 18 14:00:01 localhost systemd: Started Session 307 of user root.
Jul 18 14:00:01 localhost systemd: Starting Session 307 of user root.

where the session number increases each time.

Looking around on this, e.g. Red Hat Bugzilla bug 727315, it looks like it's when crond starts a task; it looks like it might be fixed - I would think that would be in CentOS but don't know how to find/compare the Fedora and CentOS systemd versions to know for sure.

I found a post on a workaround - in /etc/systemd/system.conf to change the line:

#LogLevel=info

to:

LogLevel=notice

I did that and rebooted, and it has stopped the messages.

I'm worried though that this may have knocked out something of actual interest from the syslog.

So my question is, is there a better way? A way that info messages could go to some other log, or better yet, a way that those particular "session" messages, and only those, could go to some other log or be filtered out?

posted Jul 19, 2016 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

I recently upgraded my Subversion client from version 1.7.5 to 1.8.3 and from that time on I experience hangs when executing multiple 'svn log' commands in a short amount of time. The "hanging" svn process consumes all CPU cycles it gets but never finishes.

I can reproduce the problem using the following shell script (on Windows using Cygwin):

#!/bin/bash
ROOT="http://example.com/svn/trunk"
for DIR in $(svn ls "${ROOT}" | head -n 4); do
 svn log -v -l 5 "${ROOT}/${DIR}" 2>&1 | head -n 100 > /dev/null
done

In my environment I need at least 4 svn processes to achieve the faulty behavior. The hang only occurs if the output is truncated using the head command (but it can be redirected to a normal file instead of /dev/null which then contains the expected log messages).

+1 vote

I'm trying to figure out a way to insert a timestamp into a log file I'm creating for a cron job:

/usr/bin/rsync -v --min-size=1 -rlpgo -O --inplace /home/myuser/Get*
root@xx.x.xx.xx:/mnt/yyy/zzz/compass 2>&1 >& /tmp/rsync_user.log

I've googled this but all I could find are tips on how to add the time and date to the name of the log file itself, not to the contents of the log.

Any tips or pointers would be great.

+2 votes

Currently svn log will display file changes and svn:externals property changes, but will not display changes made to the file pointed at by the external. For example, if a user commits a change to a file external, svn log will show that the properties reflects a new revision of the file is now being referenced, but will not see commit made to the file, even if it was done from the current WC.

It would be a very useful feature to have svn log include the log of the file external(s) as if it were a formal vile within the WC (even if it required a switch --include-externals) to enable.

0 votes

I've installed CentOS 7 in a KVM powered VM on my CentOS 6 desktop. I'm not getting any sound.
Google seams to have no clue what to do. How about you?

...