[systemd-devel] Feature suggestion: journalctrl -b <n>

Lennart Poettering lennart at poettering.net
Tue Oct 2 08:07:44 PDT 2012


On Sat, 29.09.12 02:11, David Strauss (david at davidstrauss.net) wrote:

> 
> On Wed, Sep 26, 2012 at 2:51 PM, Henrik /KaarPoSoft
> <henrik at kaarposoft.dk> wrote:
> > Hence I would like to propose a new feature:
> > "journalctrl -b <n>"
> > should show messages from the n'th previous boot,
> > default being n=0, i.e. current boot.
> >
> > What do you think about this?
> 
> Rather than add a special case for boots, I'd prefer moving to a
> mechanism more like git or Bazaar has for specifying revision ranges.
> There would be various specification approaches, all of which
> translate into (if they aren't intrinsically) a cursor position. Then,
> it's modular for specifying the range by date, boot number, or any
> other monotonic property of the journal entries.
> 
> --since=boot:-1 --until=date:2012-09-29
> 
> --since=date:2012-09-29 --until=<some-entry-id>
> 
> I'll look into how hard this would be to add. Any other monotonic
> features we could use as a range for journal entries? The monotonic
> feature is important so it's possible to discover the first or last
> qualifying item in an efficient way like a binary search.

I recently added support for --cursor= to journalctl, but this is not
complete yet. It is my intention to add some kind of time based seeking
as well.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list