This results in log messages being generated; two per minute
Aug 6 16:43:01 brains systemd[1]: Started Session 100 of user sweh.
Aug 6 16:43:01 brains systemd[1]: session-100.scope: Succeeded.
Aug 6 16:44:01 brains systemd[1]: Started Session 101 of user sweh.
Aug 6 16:44:01 brains systemd[1]: session-101.scope: Succeeded.
Aug 6 16:45:01 brains systemd[1]: Started Session 102 of user sweh.
Aug 6 16:45:01 brains systemd[1]: session-102.scope: Succeeded.
That’s not too bad. The problem is logwatch doesn’t know how to handle them, so my daily report is full of noise:
Hmm, is this cron outputting the lines, or systemd itself? Typically (at least on CentOS 7) stdout/stderr from an app is tagged with the executable file name. In this case the entry is tagged with systemd[1] which makes me think it’s not the cron process doing the output.
This only occurs if a non-root user has a cron job, so (first guess) pam-systemd talking to the systemd daemon which is then outputting data?
The annoying lines don’t show up if I select the unit journalctl -u crond (although the other log messages do) , which further makes me think it’s not cron that’s generating it, but the systemd process itself.
It also shows up in the systemd section of the logwatch output, and not the cron section. Looking at /usr/share/logwatch/default.conf/services/systemd.conf I see
Title = "Systemd"
# Which logfile group...
LogFile = messages
# Only give lines pertaining to the OMSA service...
*OnlyService = systemd
So it looks like it’s parsing /var/log/messages and not the journal.
CentOS 7 doesn’t log this for crontab entries (my primary VM is C7 based and I have lots of jobs on it; approx 47 per hour), so the occasional login hadn’t bothered me with those Session entries.
I’m guessing this is an upstream cron change in RedHat that now causes cronjobs to be noisy. sigh