Monitoring logs using MultiTail
For any system administrator, monitoring the log files is a very tedious task, and if we have to refer more than one log file at the same time to troubleshoot any issue, it becomes even more difficult to keep switching between logs.
For such situations, we can use the MultiTail tool, which we can use to display multiple log files in a single window or shell, and it will show us the last few lines of the log file in real-time.
Getting ready
To use MultiTail, we don't have to set up anything in particular on our Linux system. Only the MultiTail package needs to be installed. This can be done using the following command:
apt-get install multitail
How to do it...
Once the MultiTail tool has been installed, we can start using it as per our requirements using the following commands in this recipe:
- If we want to view two log files using
multitail
, we will run the following command:
multitail /var/log/syslog /var/log/boot.log
We can see that the screen has been split into...