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:

  1. 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 two parts, each displaying the content of the individual log files.

  1. If we want to scroll through the two files which are open, just press B, and a menu will pop up, as follows. From this list, we can select the file we want to monitor in detail:

In the new window that opens up, press gg/G to move to the top or bottom of the scroll window. To exit from the scroll window, press Q.

  1. If we want to view three log files in 2 columns, we can use the following command:
    multitail -s 2 /var/log/boot.log /var/log/syslog /var/log/auth.log

The preceding screenshot shows the three log files in two columns.

  1. MultiTail allows us to customize the color for individual log files as we open them while merging both of them in the same window. This can be done by using the following command:
    multitail -ci yellow /var/log/auth.log -ci blue -I /var/log/boot.log 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.103.202