You are not logged in.

#1 2013-08-07 14:18:50

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

[solved] journalctl: filtering output for critical errors

Hello,

In `journalctl` is there a way to filter for critical errors only? I am referring to the lines which are highlighted in red colour when viewed in journalctl.

Thanks

Last edited by orschiro (2013-08-07 14:22:43)

Offline

#2 2013-08-07 14:22:14

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: [solved] journalctl: filtering output for critical errors

pass to journalctl -p, --priority=, see the man page.


This silver ladybug at line 28...

Offline

#3 2013-10-16 06:25:26

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] journalctl: filtering output for critical errors

I have to come back to my initial question. I can use `journalctl --priority X` to filter for errors with priority X, ranging from 0 to 7. But the man page also says the following:

Takes   either a single numeric or textual log level (i.e. between 0/emerg
           and 7/debug), or a range of numeric/text log levels in the form
           FROM..TO.

How can I exactly specify FROM...TO range to filter for all errors from 0 to 7?

Offline

#4 2013-10-16 06:37:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [solved] journalctl: filtering output for critical errors

What have you tried? It took me 3 attempts to find out, and I am probably slower than most...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2013-10-16 07:39:03

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] journalctl: filtering output for critical errors

orschiro wrote:

How can I exactly specify FROM...TO range to filter for all errors from 0 to 7?

Have you tried exactly as it says e.g. 'journalctl --priority 2..3'?

Offline

#6 2013-10-16 09:03:14

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] journalctl: filtering output for critical errors

karol wrote:
orschiro wrote:

How can I exactly specify FROM...TO range to filter for all errors from 0 to 7?

Have you tried exactly as it says e.g. 'journalctl --priority 2..3'?

Thanks guys! What I tried was 2-3 because that sounded much more logical to me to indicate a range.

But the X..Y range works.

Offline

Board footer

Powered by FluxBB