FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 10-10-2012, 08:54 AM
"Richard W.M. Jones"
 
Default replacing rsyslogd in minimal with journald

On Wed, Oct 10, 2012 at 09:50:43AM +0200, Björn Persson wrote:
> Lennart Poettering wrote:
> > On Tue, 09.10.12 09:09, Chris Adams (cmadams@hiwaay.net) wrote:
> > > How do you read this log when the system is not running (e.g.
> > > mounting filesystems of a drive on another system, running from a
> > > rescue image, etc.)?
> >
> > journalctl -D <pathtothejournalfiles>
>
> So the rescue system (which might not always be Fedora) must have
> journalctl installed. Is the file format stable, or can it break if the
> rescue system has a different version of journalctl? Is the format
> perchance even documented so that other tools for reading logs could be
> written?

This would be essential for libguestfs tools to parse logs out of
guests (we do it now by reading /var/log/messages etc which has all of
the properties you state).

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-10-2012, 09:12 AM
"Richard W.M. Jones"
 
Default replacing rsyslogd in minimal with journald

On Wed, Oct 10, 2012 at 09:54:28AM +0100, Richard W.M. Jones wrote:
> On Wed, Oct 10, 2012 at 09:50:43AM +0200, Björn Persson wrote:
> > Lennart Poettering wrote:
> > > On Tue, 09.10.12 09:09, Chris Adams (cmadams@hiwaay.net) wrote:
> > > > How do you read this log when the system is not running (e.g.
> > > > mounting filesystems of a drive on another system, running from a
> > > > rescue image, etc.)?
> > >
> > > journalctl -D <pathtothejournalfiles>
> >
> > So the rescue system (which might not always be Fedora) must have
> > journalctl installed. Is the file format stable, or can it break if the
> > rescue system has a different version of journalctl? Is the format
> > perchance even documented so that other tools for reading logs could be
> > written?
>
> This would be essential for libguestfs tools to parse logs out of
> guests (we do it now by reading /var/log/messages etc which has all of
> the properties you state).

I checked out the code, and it does seem as if the format is intended
to be backwards compatible. It uses a set of filesystem-like
"compatible" and "incompatible" flags, so presumably a sufficiently
recent journalctl would be able to read any previous version of the
binary file format.

It would be nice to have this confirmed, and indeed enshrined in the
policy of the journal, because it is IMHO essential that the binary
log files will always be readable.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-10-2012, 10:00 AM
Björn Persson
 
Default replacing rsyslogd in minimal with journald

Richard W.M. Jones wrote:
> I checked out the code, and it does seem as if the format is intended
> to be backwards compatible. It uses a set of filesystem-like
> "compatible" and "incompatible" flags, so presumably a sufficiently
> recent journalctl would be able to read any previous version of the
> binary file format.

So if my Fedora box won't boot, and I take the disk out and mount it in
a CentOS box, I might not be able to read the log because journalctl in
CentOS might be too old? Not fun.

Björn Persson

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-10-2012, 10:08 AM
"Daniel P. Berrange"
 
Default replacing rsyslogd in minimal with journald

On Wed, Oct 10, 2012 at 12:00:41PM +0200, Björn Persson wrote:
> Richard W.M. Jones wrote:
> > I checked out the code, and it does seem as if the format is intended
> > to be backwards compatible. It uses a set of filesystem-like
> > "compatible" and "incompatible" flags, so presumably a sufficiently
> > recent journalctl would be able to read any previous version of the
> > binary file format.
>
> So if my Fedora box won't boot, and I take the disk out and mount it in
> a CentOS box, I might not be able to read the log because journalctl in
> CentOS might be too old? Not fun.

You can easily just boot the current Fedora Live CD on your other box
instead of CentOS. Or boot the Fedora Live CD inside a KVM guest and
mount the broken disk to your guest instead of the host.

Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-10-2012, 10:49 AM
"Richard W.M. Jones"
 
Default replacing rsyslogd in minimal with journald

On Wed, Oct 10, 2012 at 10:11:03AM +0000, "Jóhann B. Guðmundsson" wrote:
> On 10/10/2012 08:54 AM, Richard W.M. Jones wrote:
> >This would be essential for libguestfs tools to parse logs out of
> >guests (we do it now by reading /var/log/messages etc which has all of
> >the properties you state).
>
> I'm not sure how you are doing this currently but for shutdown guest
> I assume you would mount then run something like
>
> journalctl -D /path/to/journal/files | the script you use to parse the logs

The question is whether this works with different versions of journal
on the host and in the guest. A typical case we have to deal with is
someone running a stable RHEL host, and Fedora guests
(ie. host version < guest version).

For RHEL 6 I guess this will involve backporting. This is why stable,
well-documented formats like plain text are better. That's not to say
however that the journal isn't possible to handle -- the format looks
like someone thought about this case to some extent, and we already
have to deal with undocumented binary formats like the Windows
registry and Windows event log.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-10-2012, 11:21 AM
Björn Persson
 
Default replacing rsyslogd in minimal with journald

Daniel P. Berrange wrote:
> On Wed, Oct 10, 2012 at 12:00:41PM +0200, Björn Persson wrote:
> > So if my Fedora box won't boot, and I take the disk out and mount it
> > in a CentOS box, I might not be able to read the log because
> > journalctl in CentOS might be too old? Not fun.
>
> You can easily just boot the current Fedora Live CD on your other box
> instead of CentOS. Or boot the Fedora Live CD inside a KVM guest and
> mount the broken disk to your guest instead of the host.

Downloading a CD image, setting up a virtual machine and figuring out how
to mount a disk on it might not be a very hard problem, but it does take
more time and effort than typing "less /mnt/var/log/messages".

Björn Persson

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-10-2012, 12:03 PM
Lennart Poettering
 
Default replacing rsyslogd in minimal with journald

On Wed, 10.10.12 09:50, Björn Persson (bjorn@rombobjörn.se) wrote:

> Lennart Poettering wrote:
> > On Tue, 09.10.12 09:09, Chris Adams (cmadams@hiwaay.net) wrote:
> > > How do you read this log when the system is not running (e.g.
> > > mounting filesystems of a drive on another system, running from a
> > > rescue image, etc.)?
> >
> > journalctl -D <pathtothejournalfiles>
>
> So the rescue system (which might not always be Fedora) must have
> journalctl installed. Is the file format stable, or can it break if the
> rescue system has a different version of journalctl? Is the format
> perchance even documented so that other tools for reading logs could be
> written?

Yes, they need journalctl installed. Yes, the format is stable, we
haven't broken it since we first came up with it, and we are happy with
it so it is unlikely that we will break it any time soon. The format is
designed to be extensible while staying compatible and there are two bit
flag fields in the header that encode feature flags that allow us to
evolve the format as needed while still clarifying the level of
compatibility. That means the newest journalctl should always be capable
to read all old files, and to a lesser degree even old journalctls
decode newer files.

Since we are quite confident that the design of the file format is
pretty OK I actually intend to document it in the systemd wiki
soon. Maybe this will happen already by the time F18 is released, but
most likely around F19 the latest.

Lennart

--
Lennart Poettering - Red Hat, Inc.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-10-2012, 12:48 PM
Matthew Miller
 
Default replacing rsyslogd in minimal with journald

On Wed, Oct 10, 2012 at 12:12:26PM +0530, Rahul Sundaram wrote:
> >>About time :-)
> >Awesome.
> >And I want to take a moment to thank everyone for listening to these
> >concerns. I'm optimistic that we can make this all work very nicely.
> Is this documented in the relevant man pages as well?

In fact, I think it's big enough that it should go in the release notes.


--
Matthew Miller ☁☁☁ Fedora Cloud Architect ☁☁☁ <mattdm@fedoraproject.org>
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-10-2012, 12:54 PM
drago01
 
Default replacing rsyslogd in minimal with journald

On Wed, Oct 10, 2012 at 12:49 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
> On Wed, Oct 10, 2012 at 10:11:03AM +0000, "Jóhann B. Guðmundsson" wrote:
>> On 10/10/2012 08:54 AM, Richard W.M. Jones wrote:
>> >This would be essential for libguestfs tools to parse logs out of
>> >guests (we do it now by reading /var/log/messages etc which has all of
>> >the properties you state).
>>
>> I'm not sure how you are doing this currently but for shutdown guest
>> I assume you would mount then run something like
>>
>> journalctl -D /path/to/journal/files | the script you use to parse the logs
>
> The question is whether this works with different versions of journal
> on the host and in the guest. A typical case we have to deal with is
> someone running a stable RHEL host, and Fedora guests
> (ie. host version < guest version).

Can't you run the journal from the guest? Or does this open another
can of worms?
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-10-2012, 12:54 PM
drago01
 
Default replacing rsyslogd in minimal with journald

On Wed, Oct 10, 2012 at 2:54 PM, drago01 <drago01@gmail.com> wrote:
> On Wed, Oct 10, 2012 at 12:49 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
>> On Wed, Oct 10, 2012 at 10:11:03AM +0000, "Jóhann B. Guðmundsson" wrote:
>>> On 10/10/2012 08:54 AM, Richard W.M. Jones wrote:
>>> >This would be essential for libguestfs tools to parse logs out of
>>> >guests (we do it now by reading /var/log/messages etc which has all of
>>> >the properties you state).
>>>
>>> I'm not sure how you are doing this currently but for shutdown guest
>>> I assume you would mount then run something like
>>>
>>> journalctl -D /path/to/journal/files | the script you use to parse the logs
>>
>> The question is whether this works with different versions of journal
>> on the host and in the guest. A typical case we have to deal with is
>> someone running a stable RHEL host, and Fedora guests
>> (ie. host version < guest version).
>
> Can't you run the journal from the guest? Or does this open another
> can of worms?

s/journal/journalctl/
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 03:28 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org