We do run lot of programs on multiple machines and often we want to see the log files in a single terminal to monitor the whole logging. We can do it pretty simple using a tool call multitail in ubuntu.
First install multitail by issuing sudo apt-get install multitail
. The create a shell script like multitail -l "ssh -i username@SERVER-1 tail -f " -l "ssh -i @SERVER-2 tail -f "
. Now make sure you change the file permission to
sudo chmod -R 745 xxx.sh
to make sure it is runnable.
Now you can monitor many log files at your desktop.