Linux - multitail(다중 tail) 설치및 사용

Posted 02 18, 2014 18:41, Filed under: System/UNIX

# multitail(다중 tail)

# multitail 설치
yum install multitail

# yum 설치시 패키지를 찾지 못하는 메시지 발생할 경우, rpmforge 를 설치후 재시도
No package multitail available.
> 참고 :

# 화면 가로 분리
multitail --follow-all /var/log/dmesg /var/log/maillog /var/log/messages
사용자 삽입 이미지

# 화면 세로 분리

multitail -s 3 --follow-all /var/log/dmesg /var/log/maillog /var/log/messages
사용자 삽입 이미지

# 다중 ping 테스트

multitail -l "ping" -l "ping localhost"
사용자 삽입 이미지

# multitail 옵션 기타
[root@sunshiny /]# man multitail
MULTITAIL(1)                                                      MULTITAIL(1)

       MultiTail - browse through several files at once

       MultiTail [options]

       options: [-cs|-Cs|-c-] [-s] [-i] inputfile [-i anotherinputfile] [...]

       The program MultiTail lets you view one or multiple files like the original tail program. The differ-
       ence is that it creates multiple windows on your console (with ncurses). It can  also  monitor  wild-
       cards:  if  another file matching the wildcard has a more recent modification date, it will automati-
       cally switch to that file. That way you can, for example, monitor  a  complete  directory  of  files.
       Merging  of 2 or even more logfiles is possible. It can also use colors while displaying the logfiles
       (through regular expressions), for faster recognition of what is important and what not. It can  also
       filter  lines  (again  with  regular expressions). It has interactive menus for editing given regular
       expressions and deleting and adding windows. One can also have  windows  with  the  output  of  shell
       scripts  and  other  software.  When viewing the output of external software, MultiTail can mimic the
       functionality of tools like ’watch’ and such. When new mail arrives for the current  user,  the  sta-
       tuslines  will become green. To reset this "mail has arrived"-state, press ’ ’ (a space). For help at
       any time, press F1.

       -i file
              Select a file to monitor. You can have multiple -i file parameters.  You only need to  add  -i
              file in front of a filename if the filename starts with a dash (’-’).

       -I file
              Same as -i file but add the output to the previous window (so the output is merged).

       -iw file interval
              -Iw  file interval Like ’-i’/’-I’ but expects the parameter to be a wildcard and the second(!)
              an interval.  Initially MultiTail will start monitoring the first file with  the  most  recent
              modification  time.  Every  interval it will check if any new files were created (or modified)
              and start tailing that one. *Don’t forget* to put quotation marks around the filename as  oth-
              erwhise the shell will try to substite them!

       -l command
              Command  to  execute  in  a  window. Parameter is the command. Do not forget to use "’s if the
              external command needs parameter! (e.g. -l "ping host").

       -L command
              Same as -l but add the output to the previous window (so the output is merged).

       -j     Read from stdin (can be used only once as there is only 1 stdin).

       -J     Same as -j but add the output to the previous window (so the output is merged).

              Merge all of the following files into the same window (see ’--no-mergeall’).

              Stop merging all files into one window (see ’--mergeall’);

              When the same line is repeated, it will be suppressed while printing a "Last message  repeated
              x times" message.

       --mark-interval x
              Print every ’x’ seconds a mark-line when nothing else was printed.

       -q i path
              Check  path  for  new  files  with  interval ’i’, all in new windows. One can enter paths here
              understood by the shell. E.g. "/tmp/*". Note: do not forget to add quotes around the  pathname
              to prevent the shell from parsing it!

       -Q i path
              Like -q: but merge them all in one window.

              For -q/-Q: only create windows for files created after MultiTail was started.

       --closeidle x
              Close windows when more then ’x’ seconds no new data was processed.

       -a x   Write the output also to file ’x’ (like ’tee’) AFTER it was filtered by MultiTail.

       -A x   Write the output also to file ’x’ (like ’tee’) BEFORE it was filtered by MultiTail.

       -g x   Send the output also to command ’x’ AFTER it was filtered by MultiTail.

       -G x   Send the output also to command ’x’ BEFORE it was filtered by MultiTail.

       -S     Prepend merged output with subwindow-number.

       -t title
              With  this  switch, "title" is displayed in the statusline instead of the filename or command-

       -n number_of_lines
              Number of lines to tail initially. The default depends on the size of the terminal-window.

       -N number_of_lines
              Like -n but this parameter will be used for all files/commands you tail after this  parameter.

       -r interval
              Restart  the  command  (started with -l/-L) after it has exited. With interval you can set how
              long to sleep before restarting.

       -R interval
              Restarts a command like -r only this one shows the difference in output compared to the previ-
              ous run.

       -rc / -Rc interval
              Like -r / -R but clears the window before each iteration.

       -h     The help.

       -f     Follow the following filename, not the descriptor.

              For all files after this switch: follow the following filename, not the descriptor.

       -fr filter
              Use the predefined filter(s) from the configfile.

       -e     Use the next regular expression on the following file.

       -ex    Use regular expression on the following file and execute the command when it matches. The com-
              mand gets as commandline parameter the whole matching line.

       -eX    Like ’-ex’ but only give the matching substring as parameter. This requires a regular  expres-
              sion with ’(’ and ’)’.

       -ec    Use regular expression on the following file and display the matches.

       -eC    Use  regular  expression  on the following file but display everything and display the matches

       -E     Use the next regular expression on the following files.

       -v     Negate the next regular expression.

       -s x   Splits the screen vertically in ’x’ columns.

       -sw x  At what position to split the screen. e.g. ’-sw 20,40,,10’ (=4 columns)

       -sn x  How many windows per column for vertical split (use with -s or -sw). e.g. ’-sn 3,,2’.

       -wh x  Sets the height of a window (advisory: if it won’t fit, the height is adjusted).

       -cS scheme
              Show the next given file using the colorscheme selected with ’scheme’ (as  defined  in  multi-

       -CS scheme
              Show  all  following  files using the colorscheme selected with ’scheme’ (as defined in multi-

       -csn   Extra switch for the following switches; do not use reverse (inverted) colors.

       -cs    Show the next given file in colors (syslog).

       -c     Show the next given file in colors.

       -Cs    Show all following files in color (through syslog-scheme).

       -C     Show all following files in color.

       -Cf field_index delimiter
              Show all following files in color depending on field selected  with  field_index.  Fields  are
              delimited by the defined delimiter.

       -cf field_index delimiter
              Show the next file in color depending on field selected with field_index. Fields are delimited
              by the defined delimiter.

       -ci color
              Use a specific color. Usefull when merging multiple outputs.

       -cT terminalmode
              Interpret terminal codes. Only ANSI supported at this time.

       -c-    Do NOT colorize the following file.

       -C-    Do NOT colorize the following files.

       -ts    Add a timestamp to each line (format is configurable in multitail.conf).

       -Z color
              Specify the color-attributes for the markerline.

       -T     A timestamp will be placed in the markerline.

       -d     Do NOT update statusline.

       -D     Do not display a statusline at all.

       -du    Put the statusline above the data window.

       -z     Do not display "window closed" windows.

       -u     Set screen updateinterval (for slow links).

       -m nlines
              Set buffersize Set nlines to 0 (zero) if you want no limits on the buffering.

       -mb x  Set scrollback buffer size (in bytes, use xKB/MB/GB).

       -M nlines
              Set the buffersize on ALL following files.

       -p x [y]
              Set linewrap: a = print everything including linewrap. l = just show  everything  starting  at
              the  left  until the rightside of the window is reached. r = show everything starting from the
              right of the line. s = show everything starting with the  processname.  S  =  show  everything
              starting after the processname. o = show everything starting at offset ’y’.

       -P x [y]
              Like -p but for all following windows.

       -ke x  Strip parts of the input using regular expression ’x’.

       -kr x y
              Strip parts of the input starting at offset x and ending (not including!) offset y.

       -kc x y
              Strip parts of the input: strip column ’y’ with delimiter ’x’.

       -ks x  Use editscheme ’x’ from configfile.

       -w     Do not use colors.

       -b n   Sets the TAB-width.

       --config filename
              Load the configuration from given filename.

       -x     Set xterm-title: %f will be replaced with the last changed file, %h with the hostname, %l with
              the load of the system, %m with "New mail!" when the current user has new mail,  %u  with  the
              current effective user, %t timestamp of last changed file, %% with a %

       -o configfile-item
              Proces  a  configurationfile item via the commandline in case you cannot edit the default con-

       --cont Reconnect lines with a ’´ at the end.

       --mark-interval interval
              When nothing comes in, print a ’---mark---’ line every ’interval’ seconds.

              When multiple files are merged an multitail switches between two windows, print  a  markerline
              with the filename.

              Do NOT print the markerline when the file changes (overrides the configfile).

       --label text
              Put "text" in front of each line. Usefull when merging multiple files and/or commands.

              Keep trying to open the following file if it is inaccessible.

              Like --retry but for all following files.

       -cv x  Use conversion scheme ’x’ (see multitail.conf).

              Only display the filename (and not the path) in the statusline.

       -F file
              Use ’file’ as configfile (instead of default configfile).

              Do NOT load the global configfile.

       --beep-interval x
              Let  the  terminal  beep  for every x-th line processed. Press ’i’ in the main menu to see how
              many times it beeped.

       --bi x Like ’--beep-interval’ but only for current (sub-)window. Statistics on the  number  of  beeps
              can be found in the statistics for this (sub-)window. Press ’t’ in the main menu.

       -H     Show heartbeat (to keep your sessions alive).

       -V     Show the version and exit.

       You  can press a couple of keys while the program runs.  To see a list of them, press F1 (or ^h). You
       can press F1 (or ^h) at any time: it gives you context related information.  Press ’q’  to  exit  the

       See for more and other examples.

       multitail /var/log/apache/access_log logfile -i -filestartingwithdatsh
              This  creates three windows. One with the contents of /var/log/apache/access_log, one with the
              contents of logfile and so on.

       multitail -R 2 -l "netstat -t"
              This runs netstat every 2 seconds and then shows what has changed since the previous run. That
              way one can see new connections being made and closed connections fading away.

       multitail logfile -l "ping"
              This  creates two windows. One with the contents of logfile, one with with the output of ’ping

       multitail /var/log/apache/access_log -I /var/log/apache/error_log
              This creates one window with the contents of /var/log/apache/access_log merged with  the  con-
              tents of /var/log/apache/error_log.

       multitail -M 0 /var/log/apache/access_log -I /var/log/apache/error_log
              Same  as  previous example. This example will store all logged entries in a buffer so that you
              can later on browse through them (by pressing ’ b

       As this program grew larger and larger over the time with new functionality sometimes  added  ad-hoc,
       some bugs may have been introduced. Please notify if you find any.

       Well,  except  for  the  resizing  of  your  terminal window. The program might crash when doing such
       things. Upgrading the ncurses library to at least version 5.3 might help in that case.


       This page describes MultiTail as found in the multitail-4.3.1  package;  other  versions  may  differ
       slightly.   Mail  corrections and additions to  Report bugs in the program to

MultiTail                           2007-02                       MULTITAIL(1)

※ 위 내용은, 여러 자료를 참고하거나 제가 주관적으로 정리한 것입니다.
   잘못된 정보나 보완이 필요한 부분을, 댓글 또는 메일로 보내주시면 많은 도움이 되겠습니다.
02 18, 2014 18:41 02 18, 2014 18:41

Trackback URL :

Leave a comment
오픈아이디로만 댓글을 남길 수 있습니다

« Previous : 1 : ... 46 : 47 : 48 : 49 : 50 : 51 : 52 : 53 : 54 : ... 648 : Next »

Recent Posts

  1. HDFS - Python Encoding 오류 처리
  2. HP - Vertica ROS Container 관련 오류...
  3. HDFS - Hive 실행시 System Time 오류
  4. HP - Vertica 사용자 쿼리 이력 테이블...
  5. Client에서 HDFS 환경의 데이터 처리시...

Recent Comments

  1. 안녕하세요^^ 배그핵
  2. 안녕하세요^^ 도움이 되셨다니, 저... sunshiny
  3. 정말 큰 도움이 되었습니다.. 감사합... 사랑은
  4. 네, 안녕하세요. 댓글 남겨 주셔서... sunshiny
  5. 감사합니다 많은 도움 되었습니다!ㅎㅎ 프리시퀸스

Recent Trackbacks

  1. Roku App Development Roku App Development 3 07
  2. safety goggles safety goggles 2 07
  3. custom wheelchair for dogs custom wheelchair for dogs 30 06
  4. phoenix digital marketing agency phoenix digital marketing agency 29 06
  5. streaming tv channels streaming tv channels 28 06


«   07 2020   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  


  1. 위키피디아
  2. MysqlKorea
  3. 오라클 클럽
  4. API - Java
  5. Apache Hadoop API
  6. Apache Software Foundation
  7. HDFS 생태계 솔루션
  8. DNSBL - Spam Database Lookup
  9. Ready System
  10. Solaris Freeware
  11. Linux-Site
  12. 윈디하나의 솔라나라

Site Stats

TOTAL 2998814 HIT