[systemd-devel] How to completely clear journal?

Manuel Reimer manuel.spam at nurfuerspam.de
Tue Oct 1 23:48:24 PDT 2013


Hello,

I'm using systemd on a small embedded board. As I have to run journalctl
anyway, my plan is to try to use it to collect logs, so I can transmit them
to a server once a day.

My plan is to do the following settings:

Storage=volatile
RuntimeMaxUse=2M

I only have 64MB and I don't want to waste too much of it for syslog. I also
don't want journald to log to the flash memory.

Then, once a day, I want to read the current log via "journalctl", pipe it
through gzip and then send it to one of my servers. As soon as this
succeeded, I don't want to have the logs any longer on the embedded machine.

So long story short: How to tell journald to just forget all previously
logged stuff? Can I safely delete anything below /run/log/journal? Will this
really clear the log (journalctl no longer returns anything after that)?

Thank you very much in advance.

Greetings,

Manuel



More information about the systemd-devel mailing list