On Sep 17, 2014, at 9:33 AM, Tom H <tomh0...@gmail.com> wrote:

> On Wed, Sep 17, 2014 at 6:40 AM, Balint Szigeti <balint.s...@gmail.com> wrote:
>> 
>> Well, I have definitely a problem:
>> 
>> [root@szigeti-6560b ~]# vi /etc/systemd/journald.conf
>> [root@szigeti-6560b ~]# grep none $_
>> Storage=none
>> [root@szigeti-6560b ~]# systemctl restart systemd-journald.service
>> [root@szigeti-6560b ~]# logger foo
>> [root@szigeti-6560b ~]# grep foo /var/log/messages
>> [root@szigeti-6560b ~]# journalctl -n 100 |grep foo
>> [root@szigeti-6560b ~]#
>> [root@szigeti-6560b ~]# vi /etc/systemd/journald.conf
>> [root@szigeti-6560b ~]# systemctl restart systemd-journald.service
>> [root@szigeti-6560b ~]# grep Storage /etc/systemd/journald.conf
>> #Storage=none
>> #Storage=auto
>> [root@szigeti-6560b ~]# logger AAAAAAAAAAA
>> [root@szigeti-6560b ~]# grep AAAAAA /var/log/messages
>> Sep 17 11:38:14 SZIGETI-6560B bszigeti: AAAAAAAAAAA
>> [root@szigeti-6560b ~]# journalctl -n 100 |grep AAAA
>> Sep 17 11:38:14 szigeti-6560b bszigeti[28839]: AAAAAAAAAAA
> 
> AIUI, imjournal needs a file for rsyslog to read journald logs so it
> won't work with "Storage=none".
> 
> To forward to rsyslog you have to:
> 
> - use "Storage=volatile" (if you don't want to use auto/persistent) in
> "/etc/systemd/journald.conf" so journald will log to
> "/run/systemd/journal/" and imjournal will pick up logs from there
> 
> or
> 
> - use "$AddUnixListenSocket /run/systemd/journal/syslog" in
> "/etc/rsyslog.d/sd-socket.conf" so journald will log to
> "/run/systemd/journal/syslog" and imuxsocket will pick up logs from
> there (untested)

Take this with a grain of salt, I confuse easily…

My understanding is the current versions (Fedora 19+) of rsyslog and systemd 
"just work" - rsyslog connects to systemd-journald.socket. I only skimmed this 
thread but thought I saw something about a socket being disabled with 
systemctl, and if it was the systemd-journald.socket well then that'd be a 
reason why rsyslog isn't getting messages.

But I'm not sure what all Balint has changed from the Fedora 20 defaults, but 
my test VM is pristine so either Balint has changed something I haven't changed 
and he hasn't changed it back to the default. Or maybe he's run into a bug 
where he changed something, changed it back but it's not taking. Or other…

 My test was strictly two things. The first was:
1. dnf install rsyslog  ###because it's not installed by default
2. edited journald.conf changing Storage=auto to none
3. Reboot
There is no persistence at all in either /run/log/journal or /var/log/journal, 
yet there are entries in both journalctl and /var/log/messages, and the logger 
command inserts whatever I type after it into both.

And the other test following this was:

4. change journald.conf Storage=auto again, i.e. back to default.
5. delete /var/log/journal
6. reboot
And now I get a journal stored in /run/log/journal; from prior testing a while 
ago this is the same behavior I get when Storage=volatile

I didn't extensively test the difference between Storage=none and Storage=auto 
or volatile (with /run/log/journal and /var/log/journal deleted). And I can't 
really tell from the documentation or the resulting logs; but I'm going to 
guess that none means it's using some limited amount of RAM (?) whereas =auto 
or volatile using /run/log/journal is on tmpfs and after it uses up the 
<handwaive> 50% RAM limit it starts to swap to disk. In either case they're 
toast at the next reboot.



Chris Murphy
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to