[clug] lnav - Log file navigation
paulway at mabula.net
Tue Mar 31 04:17:49 MDT 2015
-----BEGIN PGP SIGNED MESSAGE-----
I've just discovered a tool I've been wishing for for years - a text-based
log file navigation tool called 'lnav'. But it's much more than 'less':
* it recognises the format of most log files and does syntax highlighting.
* it recognises date formats and can merge a directory of logs together in
time order, across different files and formats.
* it recognises error and warning lines and highlights them.
* it deals with multiple growing files like 'tail -f' and automatically
scrolls down when viewing the bottom of the files.
* it transparently decompresses compressed log files into memory for viewing.
* you can navigate around by time - e.g. move forward ten minutes, or move
to the last minute '50' in the log.
* you can see a 'histogram' of lines by time, and then zoom in on the times
that have few or many log lines.
* you can search for lines and it will move to those words and syntax
highlight them in real time.
* it can filter lines out, or only show lines, based on a regular
expression, even on growing log files.
* you can define your own log formats with regular expressions in an easy to
use JSON format.
* all regular expressions are Perl-compatible for maximum power and flexibility.
* you can search on fields found in the log lines using SQL (lnav provides a
virtual SQLite backend)
* it's really fast
* it's quite compact, at only a megabyte in size.
There's a bunch of other stuff I haven't played with yet, but it's amazingly
powerful. Find it in your local distro - Korora has it via Fedora, for example.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-----END PGP SIGNATURE-----
More information about the linux