LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 03-25-2015, 04:14 AM   #16
Flang3r
LQ Newbie
 
Registered: Oct 2011
Distribution: Fedora, CentOS
Posts: 14

Rep: Reputation: Disabled

Quote:
Originally Posted by w_hairst View Post
No answer, or even reply, on the users forum so far. Found another possible option - the command
systemd-analyze set-log-level warn

Running this as root, I got:
Failed to issue method call: Access denied

Strangely, I can run it with 'notice' instead of 'warn', and it silently
completes - probably meaning it's already set to notice.

Why does this produce an 'access denied' message even when run as root?
The above message you get is because argument syntax is invalid. Try "systemd-analyze set-log-level warning" instead of warn.

Quote:
systemd-analyze set-log-level LEVEL changes the current log level of the systemd daemon to LEVEL (accepts the same values as --log-level= described in systemd(1))
Quote:
--log-level=
Set log level. As argument this accepts a numerical log level or the well-known syslog(3) symbolic names (lowercase): emerg, alert, crit, err, warning, notice, info, debug.
P.S. It is plaguing my Fedora 21 logs too.
 
Old 03-30-2015, 07:30 PM   #17
w_hairst
LQ Newbie
 
Registered: Feb 2015
Posts: 19

Original Poster
Rep: Reputation: 0
Sure enough, the syntax was wrong. (Why 'access denied' instead of 'bad syntax'?) Changing this all the way to emerg didn't do anything, either using the command line set-log-level, or putting it into /etc/systemd/system.conf. I did notice this line in /var/log/messages during reboot:
systemd[1]: [/etc/systemd/system.conf:11] Invalid log level'warn': Operation not permitted
Odd thing is, /etc/systemd/system.conf contains LogLevel=emerg, not warn! (Anymore)
 
Old 05-20-2015, 02:02 PM   #18
dairiki
LQ Newbie
 
Registered: May 2015
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by w_hairst View Post
I have a fairly freshly installed copy of Fedora 21, running on an old laptop. (So no graphical interface.) Installed logwatch today, and got:

session opened for user root by (uid=0): 25 Time(s)

Looks like something is running once an hour-through cron? I haven't personally set up any scheduled tasks, but it's possible something I installed may have. crontab contains no entries; cron.hourly contains 0anacron and mcelog.cron

I'm seeing massive amounts of entries in the /var/log/messages file from systemd; this is the sequence I'm seeing once an hour (so probably related):

Feb 21 19:01:01 localhost systemd: Starting Paths.
[...]
Feb 21 19:01:02 localhost systemd: Received SIGRTMIN+24 from PID 1400 (kill).

1. What is systemd, what is it doing, and should I be concerned?
2. How do I get it to stop flooding the messages log?
3. If everything is working as designed, how do I eliminate or hide the 'for user root' messages for this job, but not for anything else? (I don't want to hide *all* root sessions!)

Thank you!
I experienced this too (Debian Jessie). I think I've figured out what's going on.

Systemd is running a per-user systemd for root whenever a session is started, e.g. to run a cron job. Then when root’s last session is closed, the per-user systemd is killed. The spew of log messages has to do with the the spawning and killing of that per-user systemd.

One way to avoid these log messages is to make root’s per-user systemd persistent, so that it is created at system boot and never killed (until system shutdown.) To do this you can run

Code:
# loginctl enable-linger root
This only needs to be run once. (Loginctl creates a note-to-self in /var/lib/systemd/linger/.)


Reference: https://wiki.archlinux.org/index.php/Systemd/User
 
1 members found this post helpful.
Old 06-29-2015, 02:43 AM   #19
Psy-Q
Member
 
Registered: Jun 2015
Distribution: Debian
Posts: 37

Rep: Reputation: 4
I'm seeing the same thing in Debian jessie. I don't think it makes any sense to just ignore this with logcheck, it's logging hundreds of kilobytes. Can't the verbosity be reduced, just for these per-user systemds in particular, if that's what's causing this?

Edit: "loginctl enable-linger root" does not change anything.

Edit 2: Ignore that, it does work. I had another user with cronjobs and didn't pay proper attention to the actual lines.

Last edited by Psy-Q; 06-29-2015 at 05:29 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "systemd: Started Session ### of user root" in /var/log/messages thealmightyos Linux - Security 4 03-22-2017 05:29 PM
cron:session flood my auth.log guarapo Debian 3 12-03-2010 02:47 PM
User session opened and closed msg in /var/log/messages andiramesh Linux - Newbie 9 09-05-2008 06:47 AM
(pam_unix) session opened for user root by (uid=0) frenchn00b Debian 1 01-01-2008 08:18 AM
session opened for user nobody r.stiltskin Debian 4 03-13-2006 02:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 07:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration