MultiTail: See two, three and more logs in real time at the same time

Those of us who manage servers or any user who needs to be aware of certain system logs, these users know what the tail command is. For example, if I have the log of Apache/Nginx of our website, the webmail log (webmail.desdelinux.net e.g.) our made with iRedMail, or another from some web application or sites like www.GmailInicioSesion.info u others that use an API, when you have so many
logs and we want to review some specific command tail it is without a doubt an excellent option.

Tail and CCZE

The command tail allows you to see a log, next to the parameter -f It shows us the log in real time, that is, the change that the log receives will appear on the screen, without having to reload the log, that is:

tail -f /var/log/auth.log

In addition, added to ccze (we already talked about it) we can add colors to the logs:

tail -f /var/log/auth.log | ccze

[note] You must install the ccze package for the colors to work [/ note]

This will show us a log in real time, but, What to do if I want to see two logs in real time at the same time?

I would then need to open two terminals, align them horizontally one above the other, in order to execute the tailf -f on each one, and thus be able to see two logs at the same time.

Well, with multitail we no longer need to complicate ourselves.

multi-tail

MultiTail is a package (and command) that allows us to tell it the logs we want to see and it shows us all of them on the screen, separated, arranged, organized.

For example:

multitail /var/log/auth.log /var/log/kernel.log

This will show us these two logs on the screen:

multitail

As you can see, one is below and the other is above, in the same terminal we have two logs.

I say two logs but ... there could be more, for example suppose I also want to see the ulogd.log log:

multitail /var/log/auth.log /var/log/kernel.log /var/log/ulogd.log

Here the screenshot:

multitail-3

If you want to divide the terminal vertically and not horizontally, you must add -s 2… where 2 is the number of total vertical panels. For example:

multitail -s 2 /var/log/auth.log /var/log/kernel.log

Here the screenshot:

multitail -v

If ... also, you want to show three logs and not two as in the example, but you do not want to divide the terminal into three equal vertical spaces, but rather to divide the right area into two horizontal squares, leave the 2 of the previous command and simply add another log at the end:

multitail -s 2 /var/log/auth.log /var/log/kernel.log /var/log/ulogd.log

And here the screenshot:

multitail-v-3

MultiTail Installation

To install it is simple, find and install the package multitail which is in your repository.

If you use Debian, Ubuntu or derivative:

sudo apt-get install multitail

If you use ArchLinux or another distro that uses pacman:

sudo pacman -S multitail

End

There are many more options, command execution, etc, multitail It is undoubtedly an excellent option to view several of our logs at the same time.

I hope you have found it interesting.

regards


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   rawBasic said

    It is very useful to me, thanks for sharing. I did not know him. 🙂

  2.   NauTiluS said

    It looks a lot like a command that was thrown in the terminal and with this show different ways of working.

    Here is a screenshot of what I say.
    http://i.imgur.com/YsSLgGI.png

    But as always, it's the great thing about Linux, there are many alternatives for all colors.

    Greetings.

    1.    NauTiluS said

      Terra Terminal, that's the name of the program in the screenshot.

    2.    eliotime3000 said

      Interesting. I will no longer have to push the RatPoison interface to Debian.

  3.   pipolandi said

    A very useful tool that I did not know. Thanks for the info!. Cheers!.