diff options
author | Jörg Sommer <joerg@jo-so.de> | 2019-02-12 00:19:13 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-02-27 18:43:31 +0100 |
commit | d9e15cbd188438735f386bc7b50e193094fb79b4 (patch) | |
tree | dc38eaeb6cd1f8a80d188ee4c85be46a2ef37666 /man/journalctl.xml | |
parent | 200fb167a2e5353d0ac6e1f8a5d89bbad3842692 (diff) | |
download | systemd-d9e15cbd188438735f386bc7b50e193094fb79b4.tar.gz |
journalctl: New option --cursor-file
The option cursor-file takes a filename as argument. If the file exists and
contains a valid cursor, this is used to start the output after this position.
At the end, the last cursor gets written to the file.
This allows for an easy implementation of a timer that regularly looks in the
journal for some messages.
journalctl --cursor-file err-cursor -b -p err
journalctl --cursor-file audit-cursor -t audit --grep DENIED
Or you might want to walk the journal in steps of 10 messages:
journalctl --cursor-file ./curs -n10 --since=today -t systemd
Diffstat (limited to 'man/journalctl.xml')
-rw-r--r-- | man/journalctl.xml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/man/journalctl.xml b/man/journalctl.xml index 7ff0a479e0..89878c5408 100644 --- a/man/journalctl.xml +++ b/man/journalctl.xml @@ -619,6 +619,17 @@ </varlistentry> <varlistentry> + <term><option>--cursor-file=<replaceable>FILE</replaceable></option></term> + + <listitem><para>If <replaceable>FILE</replaceable> exists and contains a + cursor, start showing entries <emphasis>after</emphasis> this location. + Otherwise the show entries according the other given options. At the end, + write the cursor of the last entry to <replaceable>FILE</replaceable>. Use + this option to continually read the journal by sequentially calling + <command>journalctl</command>.</para></listitem> + </varlistentry> + + <varlistentry> <term><option>--after-cursor=</option></term> <listitem><para>Start showing entries from the location in the |