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

David Strauss david at davidstrauss.net
Sat Sep 29 02:11:19 PDT 2012

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.

David Strauss
   | david at davidstrauss.net

More information about the systemd-devel mailing list