GICT knowledge base
Everything about Linux MultiTail
Published
MultiTail (Monitor Multiple Files Simultaneously in a single Linux Terminal) is an open source utility that can be used to display multiple log files to standard output in a single window. The single window shows last few lines of log files which splits the console into more sub windows like a screen command. It also supports color highlighting, filtering, adding and deleting windows etc…
Syntax:
# multitail filename1, filename2
Example:
# multitail /usr/local/cpanel/logs/error_log /usr/local/cpanel/logs/login_log
Output:
00] /usr/local/cpanel/logs/error_log
[2017-11-28 04:43:18 +0000] info [convert_roundcube_mysql2sqlite] There is no quota in place for wwwcuir, so no change needs to be made.
[2017-11-28 04:43:19 +0000] info [transfer_session] Dropping MySQL database “wwwcuir_db2011” for user “wwwcuir” …
[2017-11-28 04:43:53 +0000] info [transfer_session] Dropping MySQL database “wwwcuir_crt16x” for user “wwwcuir” …
00] /usr/local/cpanel/logs/error_log *Press F1/<CTRL>+<H> for help*
[2017-11-28 00:55:11 +0000] info [whostmgrd] 127.0.0.1 – root “POST /json-api/cpanel HTTP/1.1” FAILED LOGIN whostmgrd: login attempt to WHM with bad accesshash or API token
[2017-11-28 00:55:12 +0000] info [whostmgrd] 127.0.0.1 – root “POST /json-api/cpanel HTTP/1.1” FAILED LOGIN whostmgrd: login attempt to WHM with bad accesshash or API token
[2017-11-28 00:55:12 +0000] info [whostmgrd] 127.0.0.1 – root “POST /json-api/cpanel HTTP/1.1” FAILED LOGIN whostmgrd: login attempt to WHM with bad accesshash or API token
00] /usr/local/cpanel/logs/error_log *Press F1/<CTRL>+<H> for help*
Features
1) Display log files using multiple input sources: Multiple log file can be merged into one terminal and also the log files can be displayed in multiple windows in one terminal.
2) Color display using regular expressions.
3) Line filtering: Parts of lines can be filtered using rages, column numbers, and regular expressions.
4) Interactive menus for deleting and adding shells.
5) MultiTail can act as a syslog server.
6) You can truncate a log file from within MultiTail.
7) Idle windows can automatically be closed.
Installation
On RHEL/CentOS/Fedora
# yum install -y multitail
On Debian/Ubuntu/Linux Mint
# sudo apt-get update
# sudo apt-get install multitail
Popular Options
1) -s x: Splits the screen vertically in ‘x’ columns.
Ex: # multitail -s 2 /var/log/mysqld.log /var/log/xferlog
The above command will display two different files in 2 columns.
2) -V: Shows the version
EX: # multitail -V
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.
# multitail -ci green /var/log/yum.log -ci yellow -I /var/log/mysqld.log
7) -r: redraws the screen.
8) -h: help
If you need any further help please do reach our support department.
Related guides
How to Restrict an SSH Key to One Command
Restrict an SSH key to one command with authorized_keys options. Protect the command and check that unwanted shell and forwarding access are denied.
Linux and CommandsSelf-Hosted Video Processing With FFmpeg: A Practical Guide
Learn how to self-host video processing on a VPS using FFmpeg, with practical commands for conversion, compression, thumbnails, and automated workflows.
Linux and CommandsHow to use nohup: Commands in Linux That Survive Terminal Closes
Keep commands running after you close the terminal. nohup examples with wget, Python, rsync, and Docker on any VPS.
Linux and CommandsHow to Fix “Too Many Open Files” Error on Linux Servers
Learn how to fix the "Too Many Open Files" error on Linux servers by understanding file descriptors, adjusting limits, and diagnosing leaks effectively.
