Not Really a Blog

July 23, 2007

Multitail

Filed under: Programming, System Administration — Tags: — jesus @ 13:24

Some time ago I discovered Multitail, a tool for displaying in a tail-like fashion any kind of information. I works by splitting the console multitail window in many parts and displaying the info you want on each of those screens, whether it is tailing a file or the output of a command via a ssh session. It also has coloring support (which you can extend using regular expressions) to tailor your needs.

I found it really handy when I have to monitor many servers. Just by using some bash power, you can get very nice outputs just by using something like this:

#!/bin/bash
rest=$*
if [[ -z $rest ]] ;then
  echo "You need to specify at least one server"
  exit 1
fi
command="multitail -s 2 "
for server in $rest
do
  command="$command -CS vmstat -t $server -l  \"ssh $server vmstat 1 \" "
done
eval $command

The Shocking Blue Green Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 2,877 other followers