Mailinglist Archive: opensuse (769 mails)

< Previous Next >
Re: [opensuse] problem with journalctl
On Tue, May 3, 2016 at 1:53 AM, jdd <jdd@xxxxxxxxx> wrote:
Hello,

I have a crash problem with a particular application, so I wanted to look at
the kernel logs.

then I noticed journalctl do not works as expected.

LANG=US ; journalctl

(wait then press end and wait again) stops at Feb 5:

Feb 05 14:11:07 linux-us26 sddm[1114]: Auth: sddm-helper crashed (exit code
15)

no idea if the fact it's a crash have a relation with the present problem.

LANG=US ; journalctl -b 0

gives May 3, present boot logs.

but

LANG=US ; journalctl -b -1

gives:

Feb 05 00:17:50 linux-us26 systemd-journal[445]: Journal stopped

again Feb 5, but not same hour.

How can I reset my journal?

This is probably a journalctl parsing bug, I've run into a similar
problem. [1] What's supposed to happen is any corrupt entries in the
journal are ignored but intact entries can still be read OK. What
actually happens for some reason is the journal playback gets
confused. There may be more than one upstream partial fix for this so
it's probably worth filing a bug and asking if it's useful to attach
an example journal that manifests the problem.

As far as I'm aware there's no way to fix the journal itself, the
problem is in reading the journal. In my case it was always a time
based filter such as -b or --since, so as long as I didn't use those,
the journal readback was reliable. That means filtering some other way
like piping it to grep or whatever you're familiar with.

An alternative is to do something like 'journalctl > journal_all.log'
to effectively export everything to a text file, and then blow away
everything in /var/log/journal/<machineid>/ and restart journald or
just reboot. Variations with journalctl output are possible depending
on what you want to keep. If you just want something human readable
the default is good. There are other output options with -o that might
be useful for more sophisticated searches and backup needs.



[1]
https://bugzilla.redhat.com/show_bug.cgi?id=1294002

--
Chris Murphy
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References