Sujet : Re: More systemdCrap
De : robin_listas (at) *nospam* es.invalid (Carlos E.R.)
Groupes : comp.os.linux.miscDate : 19. Mar 2025, 01:29:09
Autres entêtes
Message-ID : <lnfpalxad6.ln2@Telcontar.valinor>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla Thunderbird
On 2025-03-18 23:06, Lawrence D'Oliveiro wrote:
On Tue, 18 Mar 2025 22:51:36 +0100, Carlos E.R. wrote:
On 2025-03-18 22:20, Lawrence D'Oliveiro wrote:
>
On Tue, 18 Mar 2025 20:03:34 +0100, Carlos E.R. wrote:
>
There is no mail in the /var/log/messages file at all, since ever.
>
Then why did you include “mail” in your list of facilities?
>
Because I copypasted the wrong line.
Anyway, to answer the question of how to extract the same information on
an older version of systemd, it could be done by exporting the journal in
JSON format, and filtering it through a tool like jq.
Yes, someone kindly created a script doing just that for me, but unfortunately it doesn't process well multiline log entries. And some lines with multiple spaces are shortened to a single space.
By the way, the ability for journalctl to do the filtering by facility
itself was added in version 245, which came out five years ago. So I’m not
sure why you’re still stuck with an older version.
I'm stuck with whatever version my distribution carries, which is 254. You see, not that old.
This version can do filtering using facilities, but the problem is that there are a bunch of entries in the journal with no facility assigned. So when filtering by facilities, with the exact line I posted before by error, there are megabytes of missing information from the output.
This is the line I am using:
journalctl --boot=cdf...\
--facility=kern,user,daemon,auth,syslog,lpr,uucp,cron,authpriv,ftp,\
12,13,14,15,local0,local1,local2,local3,local4,local5,local6,\
local7 > journal_purged
-- Cheers, Carlos.