mirror of
https://github.com/tstack/lnav
synced 2024-11-01 21:40:34 +00:00
parent
96714db6e5
commit
23b3d195ba
21
README.md
21
README.md
@ -72,6 +72,27 @@ You can view all the syslog messages by running:
|
||||
|
||||
$ lnav /var/log/messages*
|
||||
|
||||
Usage with `systemd-journald`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
On systems running `systemd-journald`, you can use `lnav` as the pager:
|
||||
|
||||
$ journalctl | lnav
|
||||
|
||||
or in follow mode:
|
||||
|
||||
$ journalctl -f | lnav
|
||||
|
||||
Since `journalctl`'s default output format omits the year, if you are
|
||||
viewing logs which span multiple years you will need to change the
|
||||
output format to include the year, otherwise `lnav` gets confused:
|
||||
|
||||
$ journalctl -o short-iso | lnav
|
||||
|
||||
If your system has been running for a long time, for increased
|
||||
efficiency you may want to limit the number of log lines fed into
|
||||
`lnav`, e.g. via `journalctl`'s `-n` or `--since=...` options.
|
||||
|
||||
|
||||
Screenshot
|
||||
----------
|
||||
|
Loading…
Reference in New Issue
Block a user