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
Too much website traffic can be as disastrous as no traffic at all. A traffic disaster results in server overload. In such a situation, no one is able to use e.g. your online store’s offer, and you do not earn. Learn how to optimally prepare your website for increased traffic.
- Read more
Do you have a bank account? Use the internet with your smartphone? Congratulations! Then you are on the brighter side of the power, where digital exclusion does not reach. But can you take care of the security of your data as effectively as you invite your friend for a beer via instant messenger?
- Read more
SPAM is any message that is unsolicited. By design, such messages do not reach the recipient. They can be blocked at several stages, between sending and delivery. However, the email system does not work perfectly. Some valuable mail ends up in SPAM, while unwanted offers arrive in the inbox. Can something be done about this?