Join 100,000 Subscribers:

 

Monitor Multiple Logs in a Single Shell with MultiTail for Linux

Whether you are responsible for a server or just a programmer doing development, you’ll often have more than one logfile that you want to track at the same time. There’s a nifty little utility for Linux called MultiTail that allows you to monitor multiple logs in a single window, instead of requiring multiple separate shell windows open.

Installation

First you’ll need to download and extract the source code using the following command. (Note that you should adjust these commands for the latest version if necessary)

wget http://www.vanheusden.com/multitail/multitail-5.2.0.tgz

tar xvfz multitail-5.2.0.tgz

Now change into the directory and run “make install” to both compile and install the application. You’ll need to be running as root to install this particular application, or you can just use sudo as shown:

cd multitail-5.2.0

sudo make install

At this point it’s completely installed and can be used by any user. The default installation location is /usr/bin/multitail

Usage

You can merge logfiles into a horizontally split window by using the -i command before each logfile. This is most useful when you don’t have a lot of space or the lines in the file are very long.

multitail -i error_log -i access_log

image

You can even use the -l command to show the output of a command, such as a ping or trace. This would also allow you to use scripts that strip out output that you don’t want… often you only want to see certain lines in a file, such as errors.

multitail -l “ping www.howtogeek.com” -l “ping blogs.howtogeek.com”

image

There are loads of other options, which I will leave as an exercise for the reader. You can change the color schemes, split vertically as well as horizontally, or even view statistics on the logfiles.

You can check out the examples page on the multitail homepage, or just use the –help option to see the giant list of options.

Download MultiTail from vanheusden.com

| More
This article was originally written on 12/19/07 Tagged with: Linux

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:

Comments (1)

  1. Shoaibi

    well on ubuntu you can do:
    apt-get install multitail


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Our Friends
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
mDNSResponder.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
conhost.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2010 HowToGeek.com. All Rights Reserved.