Menu

Install and use Log File Navigator – lnav in Ubuntu and CentOS

The Log File Navigator, lnav, is an enhanced log file viewer that takes advantage of any semantic information that can be gleaned from the files being viewed, such as timestamps and log levels. 

Using this extra semantic information, lnav can do things like interleaving messages from different files, generate histograms of messages over time, and providing hotkeys for navigating through the file. It is hoped that these features will allow the user to quickly and efficiently zero in on problems.

In this article we will show you how to install and use The Log File Navigator, lnav, on Ubuntu 15.04/15.10/ and CentOS 7.x

lnav – Features
  • Single log view: all log file contents are merged into a single view based on message timestamps. No need to manually correlate timestamps across multiple windows or figure out the order in which to view rotated log files.
  • Automatic format detection for several common log files. It also detects gzip/bzi2 files and decompress them automatically on the fly.
  • Filters: display only lines that match or do not match a set of regular expressions. Filter by error level.
  • Timeline view: shows a histogram of messages over time. The number of warnings and errors are highlighted in the display so that you can easily see where problems have occurred.
  • Query logs using SQL: log files are directly used as the backing for SQLite virtual tables.
  • Automatic data extraction: built-in log message parser can automatically discover and extract interesting data from plainly formatted log messages.
  • Live operation: Search as you type. New log lines are automatically loaded and searched as they are added; filters apply to lines as they are loaded; and, SQL queries are checked for correctness as you type.
  • Syntax highlighting with configurable colourizing
  • Tab completion
  • Sessions
  • Supports Linux and Mac
Install lnav on Ubuntu 15.04/15.10 and Linux Mint 17.x

To install lnav on Ubuntu 15.04/15.10 and Linux Mint 17.x and other Ubuntu based distribution, type following command in your terminal:
$ sudo apt-get install lnav -y
Install lnav on CentOS 7

First, enable epel repository:
$ sudo yum install epel-release -y
Now, install lnav using yum command:
$ sudo yum install lnav -y
Using lnav command
If you want to view logs using lnav you can do using the following command by default it shows syslogs.
$ lnav

If you want to view specific logs provide the path. Example:
$ lnav /var/log/clamav/

How to navigate in lnav


For more information visit official lnav site.

About Author:


I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Next
Newer Post
Previous
Older Post

7 comments:

  1. If some one desires to be updated with hottest technologies therefore he must
    be pay a quick visit this site and be up to date everyday.

    ReplyDelete
  2. Spot on with this write-up, I truly believe that this website needs far more attention. I?ll probably be
    returning to read more, thanks for the information!

    ReplyDelete
  3. First of all, thank you for the info, and your
    perception. I can appreciate this blog page and specifically
    suggestions. At this stage, I feel I fritter away much too enough time via the internet, perusing
    junk, actually. This is a refreshing differ from what I've known. Yet, I think that
    browsing other's thoughts is a valuable investment of at least
    some of my weekly measure of amount of time in my schedule.
    It's much like looking throughout the chaff to get the wheat.
    Or else, whatever illustration is effective for you.
    Still, sitting in front of the home computer is most likely as
    bad for you as tobacco and deep-fried chips.

    ReplyDelete
  4. Hiya, I am really glad I've found this info.
    Nowadays bloggers publish only about gossips and internet and
    this is actually frustrating. A good web site with interesting content, that's what
    I need. Thanks for keeping this website, I'll be visiting it.
    Do you do newsletters? Cant find it.

    ReplyDelete
  5. Currently it appears like Expression Engine is the best blogging platform available
    right now. (from what I've read) Is that what you're using on your blog?

    ReplyDelete
  6. I enjoy your offering this info for folks aiming to get more info on matters like this.
    Your weblog was well written and well researched, that is certainly substantially treasured.
    I am generally looking for new websites to follow and
    read regularly.

    ReplyDelete
  7. whoah this weblog is great i like studying your articles.
    Stay up the good work! You know, many people are searching round for this info, you can aid them greatly.

    ReplyDelete

 
Top