MultiTail – preview of system logs in many windows
Many Linux users know the Tail tool, which prints the number of last lines of text or stream. It is used as a diagnostic tool for checking changes in files. In today’s article we will present a much improved version of this tool – MultiTail.
The application allows you to preview one or more files, although its strength lies in the ability to divide the screen into multiple windows for each file separately. The tool is able to color the syntax, which makes it easy to preview system logs and filter lines with regular expressions. The application has an interactive menu for editing regular expressions, as well as creating and removing windows.
Combines 2 log files in one window:
multitail /var/log/apache/access.log -I /var/log/apache/error.log
Shows 3 log files in two columns:
multitail -s 2 /var/log/apache/access.log /var/log/messages /var/log/mail.log
It shows 5 log files, two of which have been merged and everything is shown in two columns, one of which is shown in a separate column on the left:
multitail -s 2 -sn 1,3 /var/log/apache/access.log -I /var/log/apache/error.log /var/log/messages /var/log/mail.log /var/log/syslog
Combines the outputs of two ping commands and removes text: 64 bytes received from only one of them:
multitail -l "ping 192.168.0.1" -ke "64 bytes from" -L "ping 192.168.0.2"
Shows the current output of the ping command and, if the timeout is printed, sends a message to all currently logged in users:
multitail -ex timeout "echo timeout | wall" -l "ping 192.168.0.1"
One window will show all TCP connections and their status changes using the netstat command. In the second window you will see connected log files: access.log and error.log from Apache:
multitail -R 2 -l "netstat -t" /var/log/apache/access.log -I /var/log/apache/error.log
Command, as above, only that you have added copying the output to the netstat.log file:
multitail -a netstat.log -R 2 -l "netstat -t tcp" /var/log/apache/access.log -I /var/log/apache/error.log
Shows two linked log files in one window, but each of them will receive different colors, allowing you to easily distinguish between lines:
multitail -ci green /var/log/apache/access.log -ci red -I /var/log/apache/error.log
Check other blog postsSee all blog posts
- Read more
Many clients of hosting companies are mistakenly convinced that a hosting provider will solve their problems and take care of their crucial issues, while maintaining their website hosted on their servers. (Un)fortunately, that doesn’t work that way. What are the things your hosting won’t do for you? It won’t do the dishes, design a website,…
- Read more
My mind’s made up. You’ve had enough of the silly hosting or cosmic costs of its maintenance and finally you decide to move the site you’ve placed on WordPress. How to move WordPress to another server? What do you need to remember and how should you prepare for it? Migration of WordPress to another server…
- Read more
Google Workspace is probably the best business mail for your work. Great anti-spam filters, full control over your data, the fact you can choose a country where your data are stores, a calendar, Google Meets… these are only a fraction of what G Suite offers. Take a look at why you should consider switching to Google…