First, the problem description:
Usually we need to check the log files to locate the problem when troubleshooting, some programs may be associated with multiple programs, so you need to open multiple Windows to view the log using TAILF or Tail-f way
But need to constantly switch the window to see the different log output, more trouble, especially want to at the same time to view the different log files, hand speed can not switch over. So the protagonist of this article Multitail tool to solve this problem.
Second, Multitail tool installation
1. System environment
cat /etc/redhat-6.5uname -2.6. -431.11. el6.ucloud.x86_64 #1:2016 x86_64 x86_64 x86_64 gnu/linux
2. Get Multitail RPM Package and install
wget FTP://ftp.is.co.za/mirror/ftp.rpmforge.net/redhat/el6/en/x86_64/dag/rpms/ multitail-5.2.9-1.el6.rf.x86_64.rpmyum localinstall-y multitail-5.2. 9-1. el6.rf.x86_64.rpm
3. Test (view multiple nginx log files)
" Zabbix " pxy.m.acc.log pxy.data.acc.log pxy.img.acc.log pxy.tx.acc.log # Filter keywords for first file
Above command effect style:
Other usage not scrutiny, can man Multitail
Linux system multitail simultaneous tracking of multiple log files