Henrik /KaarPoSoft | 26 Sep 23:51 2012
Picon

Feature suggestion: journalctrl -b <n>

Dear all,

"journalctrl -b" shows messages from the current boot.

However, I often find it useful to look at messages from the previous boot.

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?

PS:
It might also be useful to have an option to show all boot-ID's in the 
journal,
maybe showing first and last timestamp of the log, and number of entries.
And maybe having an option like "journalctrl -b <boot-ID>"

/Henrik
Colin Guthrie | 27 Sep 13:49 2012
Picon

Re: Feature suggestion: journalctrl -b <n>

'Twas brillig, and Henrik /KaarPoSoft at 26/09/12 22:51 did gyre and gimble:
> Dear all,
> 
> "journalctrl -b" shows messages from the current boot.
> 
> However, I often find it useful to look at messages from the previous boot.
> 
> 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?
> 
> PS:
> It might also be useful to have an option to show all boot-ID's in the
> journal,
> maybe showing first and last timestamp of the log, and number of entries.
> And maybe having an option like "journalctrl -b <boot-ID>"
> 
> /Henrik

Sounds like a pretty useful feature to me.

Col

--

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
(Continue reading)

David Strauss | 29 Sep 11:11 2012
Picon

Re: Feature suggestion: journalctrl -b <n>

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
Lennart Poettering | 2 Oct 17:07 2012
Picon

Re: Feature suggestion: journalctrl -b <n>

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
(Continue reading)

Lennart Poettering | 2 Oct 17:06 2012
Picon

Re: Feature suggestion: journalctrl -b <n>

On Wed, 26.09.12 23:51, Henrik /KaarPoSoft (henrik <at> kaarposoft.dk) wrote:

> Dear all,
> 
> "journalctrl -b" shows messages from the current boot.
> 
> However, I often find it useful to look at messages from the previous boot.
> 
> 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?

Sounds like a good idea. Added this to the TODO list.

> PS:
> It might also be useful to have an option to show all boot-ID's in
> the journal,
> maybe showing first and last timestamp of the log, and number of entries.
> And maybe having an option like "journalctrl -b <boot-ID>"

Yes, it is actually our plan to implement work-alikes for "last",
"lastlog" and suchlike to systemd that simply take the data out of the
journal for that. A similar tool could be one that inspects boot IDs
like you suggest. To make this work nicely we need a minor update of the
journal indexing logic however (which is already there in the format,
but not implemented)

(Continue reading)

Henrik /KaarPoSoft | 2 Oct 21:08 2012
Picon

Re: Feature suggestion: journalctrl -b <n>

On 10/02/12 17:06, Lennart Poettering wrote:
> On Wed, 26.09.12 23:51, Henrik /KaarPoSoft (henrik <at> kaarposoft.dk) wrote:
>
>> Dear all,
>>
>> "journalctrl -b" shows messages from the current boot.
>>
>> However, I often find it useful to look at messages from the previous boot.
>>
>> 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?
> Sounds like a good idea. Added this to the TODO list.
Great! Thank you.
>> PS:
>> It might also be useful to have an option to show all boot-ID's in
>> the journal,
>> maybe showing first and last timestamp of the log, and number of entries.
>> And maybe having an option like "journalctrl -b <boot-ID>"
> Yes, it is actually our plan to implement work-alikes for "last",
> "lastlog" and suchlike to systemd that simply take the data out of the
> journal for that. A similar tool could be one that inspects boot IDs
> like you suggest. To make this work nicely we need a minor update of the
> journal indexing logic however (which is already there in the format,
> but not implemented)
>
> Lennart
(Continue reading)


Gmane