1MULTITAIL(1) General Commands Manual MULTITAIL(1)
2
3
4
6 multitail - browse through several files at once
7
9 multitail [options]
10
11 options: [-cs|-Cs|-c-] [-s] [-i] inputfile [-i anotherinputfile] [...]
12
13
15 The program multitail lets you view one or multiple files like the
16 original tail program. The difference is that it creates multiple win‐
17 dows on your console (with ncurses). Merging of 2 or even more logfiles
18 is possible. It can also use colors while displaying the logfiles
19 (through regular expressions), for faster recognition of what is impor‐
20 tant and what not. It can also filter lines (again with regular expres‐
21 sions). It has interactive menus for editing given regular expressions
22 and deleting and adding windows. One can also have windows with the
23 output of shell scripts and other software. When viewing the output of
24 external software, MultiTail can mimic the functionality of tools like
25 'watch' and such. When new mail arrives for the current user, the sta‐
26 tuslines will become green. To reset this "mail has arrived"-state,
27 press ' ' (a space). For help at any time, press F1.
28
29
31 -i Input file. You can have multiple -i file parameters. You only
32 need to add -i file in front of a filename if the filename
33 starts with a dash ('-').
34
35 -I Same as -i but add the output to the previous window (so the
36 output is merged).
37
38 -iw -Iw Same as -i and -I but expects the parameter to be a wildcard
39 and the second(!) an interval. Initially MultiTail will start
40 monitoring the first file with the most recent modification
41 time. Every interval it will check if any new files were created
42 (or modified) and start tailing that one. *Don't forget* to put
43 quotation marks around the filename as otherwhise the shell will
44 try to substite them!
45
46 -l Command to execute in a window. Parameter is the command. Do not
47 forget to use "'s if the external command needs parameter! (e.g.
48 -l "ping host").
49
50 -L Same as -l but add the output to the previous window (so the
51 output is merged).
52
53 -j Read from stdin (can be used only once as there is only 1
54 stdin).
55
56 -J Same as -j but add the output to the previous window (so the
57 output is merged).
58
59 --mergeall
60 Merge all of the following files into the same window (see
61 '--no-mergeall').
62
63 --no-mergeall
64 Stop merging all files into one window (see '--mergeall');
65
66 --no-repeat
67 When the same line is repeated, it will be suppressed while
68 printing a "Last message repeated x times" message.
69
70 --mark-interval x
71 Print every 'x' seconds a mark-line when nothing else was
72 printed.
73
74 -q i path
75 Check path for new files with interval 'i', all in new windows.
76 One can enter paths here understood by the shell. E.g. "/tmp/*".
77 Note: do not forget to add quotes around the pathname to prevent
78 the shell from parsing it!
79
80 -Q i path
81 Like -q: but merge them all in one window.
82
83 --new-only
84 For -q/-Q: only create windows for files created after multitail
85 was started.
86
87 --closeidle x
88 Close windows when more then 'x' seconds no new data was pro‐
89 cessed.
90
91 -a x Write the output also to file 'x' (like 'tee') AFTER it was fil‐
92 tered by MultiTail.
93
94 -A x Write the output also to file 'x' (like 'tee') BEFORE it was
95 filtered by MultiTail.
96
97 -g x Send the output also to command 'x' AFTER it was filtered by
98 MultiTail.
99
100 -G x Send the output also to command 'x' BEFORE it was filtered by
101 MultiTail.
102
103 -S Prepend merged output with subwindow-number.
104
105 -t title
106 With this switch, "title" is displayed in the statusline instead
107 of the filename or commandline.
108
109 -n number_of_lines
110 Number of lines to tail initially. The default depends on the
111 size of the terminal-window.
112
113 -r interval
114 Restart the command (started with -l/-L) after it has exited.
115 With interval you can set how long to sleep before restarting.
116
117 -R interval
118 Same as -r, only with this one only the difference is displayed.
119
120 -rc / -Rc interval
121 Like -r / -R but clears the window before each iteration.
122
123 -h The help.
124
125 -f Follow the following filename, not the descriptor.
126
127 -fr filter
128 Use the predefined filter(s) from the configfile.
129
130 -e Use the next regular expression on the following file.
131
132 -ex Use regular expression on the following file and execute the
133 command when it matches.
134
135 -ec Use regular expression on the following file and display the
136 matches.
137
138 -eC Use regular expression on the following file but display every‐
139 thing and display the matches inverted.
140
141 -E Use the next regular expression on the following files.
142
143 -v Negate the next regular expression.
144
145 -s x Splits the screen vertically in 'x' columns.
146
147 -sw x At what position to split the screen. e.g. '-sw 20,40,,10' (=4
148 columns)
149
150 -sn x How many windows per column for vertical split (use with -s or
151 -sw). e.g. '-sn 3,,2'.
152
153 -wh x Sets the height of a window (advisory: if it won't fit, the
154 height is adjusted).
155
156 -cS scheme
157 Show the next given file using the colorscheme selected with
158 'scheme' (as defined in multitail.conf).
159
160 -CS scheme
161 Show all following files using the colorscheme selected with
162 'scheme' (as defined in multitail.conf).
163
164 -csn Extra switch for the following switches; do not use reverse
165 (inverted) colors.
166
167 -cs Show the next given file in colors (syslog).
168
169 -c Show the next given file in colors.
170
171 -Cs Show all following files in color (through syslog-scheme).
172
173 -C Show all following files in color.
174
175 -Cf field_index delimiter
176 Show all following files in color depending on field selected
177 with field_index. Fields are delimited by the defined delimiter.
178
179 -cf field_index delimiter
180 Show the next file in color depending on field selected with
181 field_index. Fields are delimited by the defined delimiter.
182
183 -ci color
184 Use a specific color. Usefull when merging multiple outputs.
185
186 -cT terminalmode
187 Interpret terminal codes. Only ANSI supported at this time.
188
189 -c- Do NOT colorize the following file.
190
191 -C- Do NOT colorize the following files.
192
193 -ts Add a timestamp to each line (format is configurable in multi‐
194 tail.conf).
195
196 -Z color
197 Specify the color-attributes for the markerline.
198
199 -T A timestamp will be placed in the markerline.
200
201 -d Do NOT update statusline.
202
203 -D Do not display a statusline at all.
204
205 -z Do not display "window closed" windows.
206
207 -u Set screen updateinterval (for slow links).
208
209 -m nlines
210 Set buffersize Set nlines to 0 (zero) if you want no limits on
211 the buffering.
212
213 -mb x Set scrollback buffer size (in bytes, use xKB/MB/GB).
214
215 -M nlines
216 Set the buffersize on ALL following files.
217
218 -p x [y]
219 Set linewrap: a = print everything including linewrap. l = just
220 show everything starting at the left until the rightside of the
221 window is reached. r = show everything starting from the right
222 of the line. s = show everything starting with the processname.
223 S = show everything starting after the processname. o = show
224 everything starting at offset 'y'.
225
226 -P x [y]
227 Like -p but for all following windows.
228
229 -ke x Strip parts of the input using regular expression 'x'.
230
231 -kr x y
232 Strip parts of the input starting at offset x and ending (not
233 including!) offset y.
234
235 -kc x y
236 Strip parts of the input: strip column 'y' with delimiter 'x'.
237
238 -w Do not use colors.
239
240 -b n Sets the TAB-width.
241
242 --config filename
243 Load the configuration from given filename.
244
245 -x Set xterm-title: %f will be replaced with the last changed file,
246 %h with the hostname, %l with the load of the system, %m with
247 "New mail!" when the current user has new mail, %u with the cur‐
248 rent effective user, %t timestamp of last changed file, %% with
249 a %
250
251 -o configfile-item
252 Proces a configurationfile item via the commandline in case you
253 cannot edit the default configfile.
254
255 -V Show the version and exit.
256
257
259 You can press a couple of keys while the program runs. To see a list
260 of them, press F1 (or ^h). You can press F1 (or ^h) at any time: it
261 gives you context related information. Press 'Q' to exit the program.
262
263
265 multitail /var/log/apache/access_log logfile -i -filestartingwithdatsh
266 This creates three windows. One with the contents of
267 /var/log/apache/access_log, one with the contents of logfile and
268 so on.
269
270 multitail -R 2 -l "netstat -t"
271 This runs netstat every 2 seconds and then shows what has
272 changed since the previous run. That way one can see new connec‐
273 tions being made and closed connections fading away.
274
275 multitail logfile -l "ping 192.168.1.3"
276 This creates two windows. One with the contents of logfile, one
277 with with the output of 'ping 192.168.1.3'.
278
279 multitail /var/log/apache/access_log -I /var/log/apache/error_log
280 This creates one window with the contents of
281 /var/log/apache/access_log merged with the contents of
282 /var/log/apache/error_log.
283
284 multitail -M 0 /var/log/apache/access_log -I /var/log/apache/error_log
285 Same as previous example. This example will store all logged
286 entries in a buffer so that you can later on browse through them
287 (by pressing ' b
288 ').
289
290
292 None. This program is totally bug-free.
293
294 Well, except for the resizing of your terminal window. The program
295 might crash when doing such things. Upgrading the ncurses library to at
296 least version 5.3 might help in that case.
297
298
300 http://www.vanheusden.com/multitail/
301
302
304 This page describes multitail as found in the multitail-3.9.10 package;
305 other versions may differ slightly. Mail corrections and additions to
306 folkert@vanheusden.com. Report bugs in the program to folkert@vanheus‐
307 den.com.
308
309
310
311MultiTail 2003-04 MULTITAIL(1)