Re: [systemd-devel] Fastest way to dump last X Mo of logs from the journal ?

2024-04-24 Thread Barry Scott
> On 24 Apr 2024, at 19:48, Etienne Champetier > wrote: > > Anyone have other ideas to do fast exports without having all logs in > memory or twice on disk ? Maybe base on time not size? Then you can use the --since option. Barry

[systemd-devel] Fastest way to dump last X Mo of logs from the journal ?

2024-04-24 Thread Etienne Champetier
Hi all, sos report includes the last X Mo of logs, sometimes filtered, sometimes not right now it's doing the equivalent of "journalctl | tail -cXm", which reads / format all logs, which can be extremely slow The fastest way I found so far is: journalctl --reverse | head -c Xm | tac This still ha