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
Once reserved exclusively for European public institutions, it is now one of the most commonly registered domains worldwide! For several years .eu domain has been experiencing dynamic growth not only in its popularity but also in the number of technologies implemented to ensure security and efficiency. Check out why you should already consider buying a…
- Read more
When you buy a hosting or a server from us, we will give you a technical domain, which may turn out to be a perfect testing ground for you. Wondering if you should use a technical domain? What is a technical domain anyway and what are its advantages and disadvantages? Let’s start from the beginning,…
- 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,…