Bug 988100

Summary: RFE: journal reader in guestfish
Product: [Community] Virtualization Tools Reporter: Matthew Miller <mattdm>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Miller 2013-07-24 18:01:32 UTC
It would be cool if I could mount an image with systemd journal logs and easily view those logs in guestfish -- basically, a built-in journalctl.

Comment 1 Richard W.M. Jones 2013-07-24 18:30:51 UTC
Yeah, I briefly talked to Lennart about how to do this.  Luckily
the journal format is backwards compatible (and semi-forwards
compatible too), and there's a sane library for reading it:

http://www.freedesktop.org/software/systemd/man/sd_journal_open_files.html

One option is to add this API to the libguestfs API (rather
like how hivex is done now).

Another is to have some guestfish command to download the journal
files into a temporary directory and run journalctl -D on it,
although this would be rather slow.

Simple matter of programming :-)

Comment 2 Richard W.M. Jones 2013-07-29 09:17:38 UTC
Some support has been added to the API now:

https://github.com/libguestfs/libguestfs/commit/5cb7f294f6a5a8b4a68e940c30ca9af0fe0741d5
(in libguestfs >= 1.23.11)

It would be nice to enhance guestfish further to add a journalctl-like
command for browsing the logs, so I'll leave this bug open for now.