1

Is there a way to clear systemd/journal messages manually only keeping high priority messages?

I have a system with very limited storage and would like to keep the journal compact while still keeping track of errors. Messages of priority 0..3 should be kept as long as there is sufficient space, messages of lower priority can be cleared if they are older than a day.

Can the --vacuum-time option of journalctl be combined with any type of filter?

1
  • Could you please update with your journald.conf configuration?
    – thanasisp
    Nov 11, 2020 at 0:17

1 Answer 1

0

Is there a way to clear systemd/journal messages manually only keeping high priority messages?

No.

Can the --vacuum-time option of journalctl be combined with any type of filter?

No.

Your options are:

  • Not logging
  • Logging outside of journald
  • Logging somewhere else if your have a network connection
1
  • Thanks, I'll set up a (daily) cron job to periodically save high priority messages to a separate log and clear the journal. Something like journalctl -p 5..0 --since="24 hours ago" | gzip >> error.log.gz
    – Ladde
    Nov 11, 2020 at 9:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .