Multitail – view multiple logfiles windowed on console
Sponsored Link
Install Multitail in Ubuntu
sudo aptitude install multitail
This will complete the installation.
Multitail Examples
No examples of coloring are given as that is configurable via the onfiguration file. Also for mostcommonly used files color schemes have already been designed.
- Merge 2 logfiles in one window:
multitail /var/log/apache2/access.log -I /var/log/apache2/error.log
- Show 3 logfiles in 2 columns:
multitail -s 2 /var/log/apache2/access.log /var/log/messages /var/log/mail.log
- Show 5 logfiles while merging 2 and put them in 2 columns with only one in the left column:
multitail -s 2 -sn 1,3 /var/log/apache2/access.log -I /var/log/apache2/error.log /var/log/messages \ /var/log/mail.log /var/log/syslog
- Merge the output of 2 ping commands while removing "64 bytes received from" from only 1 of them:
multitail -l "ping 192.168.0.1" -ke "64 bytes from" -L "ping 192.168.0.2"
- Show the output of a ping-command and if it displays a timeout, send a message to all users currently logged in
multitail -ex timeout "echo timeout | wall" -l "ping 192.168.0.1"
- In one window show all new TCP connections and their state changes using netstat while in the other window displaying the merged access and error logfiles of apache
multitail -R 2 -l "netstat -t" /var/log/apache2/access.log -I /var/log/apache/error.log
- As the previosu example but also copy the output to the file netstat.log
multitail -a netstat.log -R 2 -l "netstat -t tcp" /var/log/apache2/access.log -I /var/log/apache2/error.log
- Show 2 logfiles merged in one window but give each logfile a different color so that you can easily see what lines are for what logfile:
multitail -ci green /var/log/apache2/access.log -ci red -I /var/log/apache2/error.log
- Show a Squid (proxy server) logfile while converting timestamps to something readable
multitail -cv squid /var/log/squid/access.log
- Display Q-Mail logging while converting the timestamp into human readable format
multitail -cv qmailtimestr /var/log/qmail/qmail.smtpd.log