Excellent Utilities: lnav – the log file navigator

Other Features

In no particular order, the software also offers the following:

  • Headless mode – use lnav’s log processing features in your own scripts.
  • Supports tab-completion for almost all operations.
  • Built-in log message parser can automatically discover and extract interesting data from plainly formatted log messages.
  • Add comments and tags to log lines.
  • Mark lines with ‘m’ and then press ‘c’ to copy the marked lines to the clipboard.
  • Pretty-print view reformats structured data, like XML or JSON, so that it’s easier to read.
  • Dynamic log line table – log formats that lack message structure, lnav can parse the log message and attempt to extract any data fields that it finds.
  • Carefully considered keyboard shortcuts.
  • Mouse support – use the mouse to mark lines of text and move the view with the scrollbar.
  • Papertrail integration.
  • Cross-platform support – runs under Linux and Mac OS X.

lnav supports a wide range of log message formats.

Log Formats built into lnav
Common Access LogDefault web access log format for servers like Apache
Amazon ALB logLog format for Amazon Application Load Balancers
VMware vSphere Auto Deploy log formatLog format for the VMware Auto Deploy service
Generic BlockGeneric format for logs, like cron, that have a date at the start of a bloc
Candlepin log formatLog format used by Candlepin registration system
Yum choose_repo LogLog format for the yum choose_repo tool
CUPS log formatLog format used by the Common Unix Printing System
Dpkg LogDebian dpkg log
Amazon ELB logLog format for Amazon Elastic Load Balancers
engine logLog format for the engine.log files from RHEV/oVirt
Common Error LogDefault web error log format for servers like Apache
Fsck_hfs LogLog for the fsck_hfs tool on Mac OS X
GlogGoogle glog format
Java log formatLog format used by log4j and other Java software
journalctl JSON log formatLogger format as created by systemd journalctl -o json
Katello log formatLog format used by Katello and Foreman
OpenAM LogOpenAM identity provider
OpenAM Debug LogDebug logs for the OpenAM identity provider
OpenStack log formatLog format for the OpenStack log files
CUPS Page LogCUPS server log of printed pages
Papertrail ServiceLog format for the papertrail log management service
SnapLogic Server LogSnapLogic server log format
SSSD log formatLog format used by the System Security Services Daemon
Stracestrace output format
sudosudo privilege management tool
Syslogsystem logger format found on most POSIX systems
TCF LogTarget Communication Framework log
TCSH Historytcsh history file format
Uwsgi Loguwsgi log format
Vdsm LogsVdsm log format
VMKernel LogsVMKernel’s log format
VMware LogsVMware’s ESXi and vCenter log format
RHN server XMLRPC log formatGenerated by Satellite’s XMLRPC component

Compressed files (gz and bzip2) are automatically detected and decompressed on-the-fly.

The software helps filter out the noise.

Next page: Page 4 – Summary

Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Other Features
Page 4 – Summary

Complete list of articles in this series:

Excellent Utilities
tmuxA terminal multiplexer that offers a massive boost to your workflow
lnavAdvanced log file viewer for the small-scale; great for troubleshooting
PaperworkDesigned to simplify the management of your paperwork
AbricotineMarkdown editor with inline preview functionality
mdlessFormatted and highlighted view of Markdown files
fkillKill processes quick and easy
TuskAn unofficial Evernote client with bags of potential
UlauncherSublime application launcher
McFlyNavigate through your bash shell history
LanguageToolStyle and grammar checker for 30+ languages
pecoSimple interactive filtering tool that's remarkably useful
Liquid PromptAdaptive prompt for Bash & Zsh
AnanicyShell daemon created to manage processes’ IO and CPU priorities
cheat.shCommunity driven unified cheat sheet
ripgrepRecursively search directories for a regex pattern
exaA turbo-charged alternative to the venerable ls command
OCRmyPDFAdd OCR text layer to scanned PDFs
WatsonTrack the time spent on projects
fontpreviewQuickly search and preview fonts
fdWonderful alternative to the venerable find
scrcpyDisplay and control Android devices
dufDisk usage utility with more polished presentation than the classic df
tldrSimplified and community-driven man pages
lsdLike exa, lsd is a turbo-charged alternative to ls
brootNext gen tree explorer and customizable launcher
DeskreenLive streaming your desktop to a web browser
Share this article

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.