Re: is it the future?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sep 14, 2014, at 8:32 AM, Balint Szigeti <balint.szgt@xxxxxxxxx> wrote:

On Sun, 2014-09-14 at 17:23 +0300, Joonas Sarajärvi wrote:
2014-09-14 17:06 GMT+03:00 Balint Szigeti <balint.szgt@xxxxxxxxx>:
> WTF?*** sorry about inappropriate language. I've just upset a little bit.
> Why does a deamon have a config file if it doesn't read it?
> journalctl is the reader command and the journald is the logger service.
> Still don't get it why the config file is ignored....

The daemon reads the journald.conf config file. At least I use an
option in journald.conf to limit the size of the persistent journal.

If you look at the options in man journald.conf, note that pretty much
all the options specify how and where the log messages get stored.
Since journalctl just reads and displays the stored data but does not
write it, there is little content in journald.conf that could be
applied to journalctl anyway.

The Storage option is one that journalctl could in theory use to
ignore some journal content that has been left lying on a system that
e.g. does not actually maintain a persistent journal. But I guess
journalctl does not currently use even that option. So if the local
admin does not want journalctl to read the persistent journal from
/var/log/journal/, the easiest way to achieve that would be to ensure
that /var/log/journal/ is not present on the system.
As I wrote to the maillist I did it. I reconfigured the journald.conf and deleted the journal logs then restarted the systemd-journald.service. Moreover I rebooted but the logs were preserved.

I just did this:
# rm -rf /var/log/journal
# reboot

And now journald logs are not persistent. They're in /run/log/journal which is not persistent.

# journalctl --list-boots
 0 dc2ede0a042e46089f8a17e06e772d43 Sun 2014-09-14 13:46:19 MDT—Sun 2014-09-14 13:47:17 MDT
# ll /run/log/journal/d743b8f5aad34b57905cebf44bb706ad/
total 8192
-rw-r-----. 1 root systemd-journal 8388608 Sep 14 13:47 system.journal

And yet /var/log/messages is still persistently recording.

# rm -f /var/log/messages
# reboot

I have a new /var/log/messages now, with everything logged for this current boot. And

# journalctl --list-boots
 0 87c6d908d5604a978e69fbca20174659 Sun 2014-09-14 13:54:00 MDT—Sun 2014-09-14 13:55:18 MDT
# ll /run/log/journal/d743b8f5aad34b57905cebf44bb706ad/
total 8192
-rw-r-----. 1 root systemd-journal 8388608 Sep 14 13:55 system.journal

A new system.journal, non-persistent on /run, and only one boot listed because the earlier one was "deleted" since it was on /run.


So, I get what you write and the man page says but the actual daemon doesn't do it. It is a bug or just by design.

I just think you don't understand how it works, which is understandable. Any man page for rsyslog will describe how it works, not systemd-journald, and journald.conf will describe how it works and not anything else. So you need some 3rd party write up to understand that rsyslog actually depends on systemd-journald. But then you also need to state exactly what it is you're trying to achieve. I'm assuming you want things like they were before systemd-journald, in which case the only thing you need to do is delete /var/log/journal; and depending on how your Fedora got to its current state maybe you need to install and enable rsyslog also but that's really it.


Chris Murphy

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
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
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux