How to Install MultiTail in Linux

MultiTail- Monitor Multiple Files Simultaneously in a Single Linux Terminal

Multitail is used to display multiple log files for standard output. It supports for filtering of lines, merging, monitoring, adding and deleting windows. The installation process and features will be discussed in this article.

Features

  • Line filtering.
  • Parts of the line can be highlighted
  • Windows can be swapped and closed
  • Display logfiles
  • MultiTail can act like a syslog server
  • Idle windows can automatically be closed.
  • Multiple input sources.
  • Interactive Menus for deleting and adding shells.
  • Using Regular Expression it will displaying important information’ s in Color.

To install Multitail

In Debian/Linux Mint/Ubuntu


$ sudo apt-get update
$ sudo apt-get install multitail

In CentOS/Fedora/RHEL

[root@linuxhelp ~]# yum install multitail -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.webwerks.com
 * epel: mirror.pregi.net
 * extras: centos.webwerks.com
 * updates: centos.excellmedia.net
Resolving Dependencies
-->  Running transaction check
--->  Package multitail.x86_64 0:6.4.2-1.el7 will be installed
.
.
.
Installed:
  multitail.x86_64 0:6.4.2-1.el7                                                

Complete!

By default, multitail will do as same as " tail -f" . To monitor two different files in single window.

To View 2 Files in Single Window

[root@linuxhelp ~]# multitail /var/log/http/error_log /var/log/Xorg.9.log

To scroll the files, hit " b" and choose the file that you need from the list.


After you select the file, it shows you last 100 lines, to scroll that use cursor keys. You may also use " gg" /" G" to move to the bottom/top of the scroll window. If you need to view more lines, just click " q" to quit and click " m" to enter new value for number of lines to view.

To View 2 Files in 2 Columns

Execute the following command, to display two different files in 2 columns.

[root@linuxhelp ~]# multitail &ndash s 2 /var/log/http/error_log /var/log/Xorg.9.log

To View Multiple Log files in Multiple Columns

To display 3 files in three columns, run the following command.

[root@linuxhelp ~]# multitail &ndash s 3 /var/log/messages /var/log/http/error_log /var/log/Xorg.0.log

To View/Merge Multiple Log files in Multiple Columns

Here it displays 5 log files while merging 2 files in one column and has 2 files in two columns and has only one in the left column.

[root@linuxhelp ~]# multitail &ndash s 2 &ndash sn 1,3 /var/log/maillog &ndash I /var/log/cron /var/log/Xorg.9.log /var/log/httpd/error_log

To View File and Execute Command

Option " -l" allows the below command to execute in a window and it shows 1 file.

[root@linuxhelp ~]# multitail /var/log/cron &ndash l “ ping www.linuxhelp.com” 

To View/Merge Two log files in Different Color

Execute the below command, to View/Merge Two log files in Different Color.

[root@linuxhelp ~]# multitail &ndash ci green /var/log/cron &ndash ci blue &ndash I /var/log/messages

Tag : MultiTail
FAQ
Q
What are the major options used in Multitail?
A
Popular Options used in MultiTail are

1) -s x: Splits the screen vertically in ‘x’ columns.

2) -V: Shows the version

3) -i: Input file, select a file to monitor. You can have multiple -i file parameters.

4) -I : Same as -i but it merges this log file into the previous window.

5) -n: initial number of lines to tail

6) -c: Show the next given file in colors.

7) -r: redraws the screen.

8) -h: help
Q
How To install multitail on OpenSUSE?
A
For SUSE Linux use the following steps to install multitail

#zypper addrepo http://download.opensuse.org/repositories/server:monitoring/SLE_12/server:monitoring.repo

#zypper refresh

#zypper install multitail
Q
while I install multitail, it shows no package available in centos. How to solve this error?
A
To overcome this error, you have to install epel repo using following command

#yum install epel-release

and then install multitail
Q
what are the commands to view log files in Linux?
A
use the following commands to view the log files
#tail -f "log filename" or
#less +f "log filename" or
#Retrace "log filename" or
#vim "log filename" or
#Emacs "log filename" or
Q
how to check the version of multitail?
A
Following command is used to check the version of multitail

#multitail -v