[systemd-devel] How to completely clear journal?

Manuel Reimer manuel.spam at nurfuerspam.de
Wed Oct 2 00:58:51 PDT 2013


David Strauss <david <at> davidstrauss.net> writes:
> Do you really need to clear it? Presumably, the system has to meet its
> memory constraints just before you dump the logs. What is the
> advantage of freeing memory that the system has to account for,
> anyway?

Yes, that's right. Maybe I even reduce the value to only 1M just to get sure.

> If it's just to know when the last dump was, you can use the journal's
> cursor data or record a special log entry just before you dump.

And exactly that's the problem. What I need are two easy commands:

- The first has to give me the log contents in plain text form since last
successful log transmission.
- The second has to somehow set the last log data to "invalid" so the next
transmission doesn't catch them again.

Maybe it's even possible to use some DBUS API here? I write all my scripts
in Perl and so direct DBUS interaction would be no problem.

Greetings,

Manuel



More information about the systemd-devel mailing list