Watch Multiple Logs in a Single Terminal

Have you ever opened 4 terminal windows, SSHed each one into a server, and ran tail on all of them to watch 4 log files?

Have you ever had a terminal window open whose sole purpose was to run "tail my_log" over and over again to look at the output of a file?

It's a pain, isn't it?

Introducing "Watch Me" a simple ruby script that allows you to watch multiple log files simultaneously.

go from this:

 

to this:

 

First, get Watch Me from github.

Then, try out the example by following these instructions:

  1. Open 3 terminal windows in the watch_me directory
  2. In the first terminal, run:
    $ ./examples/rander.rb > rander.1.log
  3. In the second terminal, run:
    $ ./examples/rander.rb > rander.2.log
  4. In the third terminal, run:
    $ ./watch_me.rb rander.1.log rander.2.log

You can customize the behavior with the "r" and "l" flags.

./watch_me.rb -l 60 -r 1 file1 file2

Will use 60 terminal lines and refresh every 1 second. This lets you see even more of your files, and see it in near real-time.

Enjoy.