1 | .TH TRACERTSTATS "1" "November 2006" "tracertstats (libtrace)" "User Commands" |
---|
2 | .SH NAME |
---|
3 | tracertstats \- perform simple filter based analysis on a trace |
---|
4 | .SH SYNOPSIS |
---|
5 | .B tracertstats |
---|
6 | [ -f | --filter bpf ] |
---|
7 | [ -i | --interval interval ] |
---|
8 | [ -t | --threads max ] |
---|
9 | [ -c | --count count ] |
---|
10 | [ -o | --output-format csv,txt,png,html ] |
---|
11 | [ -m | --merge-inputs ] |
---|
12 | [ -N | --nobuffer ] |
---|
13 | inputuri... |
---|
14 | .P |
---|
15 | .B tracertstats |
---|
16 | -H|--libtrace-help |
---|
17 | .SH DESCRPTION |
---|
18 | tracertstats takes a list of bpf expressions and outputs the number of packets |
---|
19 | and bytes that match that expression every interval seconds, or count packets. |
---|
20 | .TP |
---|
21 | .PD 0 |
---|
22 | .BI \-f " bpf-filter" |
---|
23 | .TP |
---|
24 | .PD |
---|
25 | .BI \-\^\-filter " bpf-filter" |
---|
26 | Add another "bpf filter" |
---|
27 | |
---|
28 | .TP |
---|
29 | .PD 0 |
---|
30 | .BI \-i " interval" |
---|
31 | .TP |
---|
32 | .PD |
---|
33 | .BI \-\^\-interval " interval" |
---|
34 | Output results every \fIinterval\fR seconds. |
---|
35 | |
---|
36 | .TP |
---|
37 | .PD 0 |
---|
38 | .BI \-t " max" |
---|
39 | .TP |
---|
40 | .PD |
---|
41 | .BI \-\^\-threads " max" |
---|
42 | Use \fImax\fR packet processing threads. The default is 4 threads, but adding |
---|
43 | more or less threads may improve performance. |
---|
44 | |
---|
45 | .TP |
---|
46 | .PD 0 |
---|
47 | .BI \-c " count" |
---|
48 | .TP |
---|
49 | .PD |
---|
50 | .BI \-\^\-count " count" |
---|
51 | Stop after processing this amount of packets. Note that this is only a |
---|
52 | lower bound as this is only evaluated once per thread per interval. |
---|
53 | |
---|
54 | .TP |
---|
55 | .PD 0 |
---|
56 | .BI \-m |
---|
57 | .TP |
---|
58 | .PD |
---|
59 | .BI \-\^\-merge-inputs |
---|
60 | Treats all inputs as a single input, resulting a single unified output rather |
---|
61 | than an output for each input. Works best with traces that are consecutive to |
---|
62 | create a single CSV, for instance. |
---|
63 | |
---|
64 | .TP |
---|
65 | .PD 0 |
---|
66 | .BI \-N |
---|
67 | .TP |
---|
68 | .PD |
---|
69 | .BI \-\^\-nobuffer |
---|
70 | Disable internal packet buffering in libtrace. If the packet rate is very low |
---|
71 | (i.e. < 10 packets per interval), set this to ensure that tracertstats is more |
---|
72 | likely to print results in time with the interval rather than producing bursts |
---|
73 | of output for multiple intervals at a time. |
---|
74 | |
---|
75 | .TP |
---|
76 | .PD 0 |
---|
77 | .BI \-o " format" |
---|
78 | .TP |
---|
79 | .PD |
---|
80 | .BI \-\^\-output\-format " format" |
---|
81 | Selects the output format. |
---|
82 | |
---|
83 | .RS |
---|
84 | .TP |
---|
85 | txt |
---|
86 | Human readable text. This is the default output format which provides output |
---|
87 | easily understood by a human. This format has the disadvantage that it takes |
---|
88 | up quite a bit of horizontal space. |
---|
89 | |
---|
90 | .TP |
---|
91 | csv |
---|
92 | Comma Seperated Values. This is suitable for further analysis in a spreadsheet, |
---|
93 | or other program. |
---|
94 | |
---|
95 | .TP |
---|
96 | png |
---|
97 | PNG Graphic. Produces a fairly incomprehensible png graph. This relies on |
---|
98 | gdc being available at compile time. |
---|
99 | |
---|
100 | .TP |
---|
101 | html |
---|
102 | This produces output suitable for display to a human in a webbrowser. |
---|
103 | |
---|
104 | .SH EXAMPLES |
---|
105 | .nf |
---|
106 | tracertstats \-\^\-filter 'host sundown' \\ |
---|
107 | \-\^\-filter 'port http' \\ |
---|
108 | \-\^\-filter 'port ftp or ftp-data' \\ |
---|
109 | \-\^\-filter 'port smtp' \\ |
---|
110 | \-\^\-filter 'tcp[tcpflags] & tcp-syn!=0' \\ |
---|
111 | \-\^\-filter 'not ip' \\ |
---|
112 | \-\^\-filter 'ether[0] & 1 == 1' \\ |
---|
113 | \-\^\-filter 'icmp[icmptype] == icmp-unreach' \\ |
---|
114 | \-\^\-output\-format html |
---|
115 | erf:/traces/trace1.gz \\ |
---|
116 | erf:/traces/trace2.gz |
---|
117 | .fi |
---|
118 | |
---|
119 | .SH LINKS |
---|
120 | More details about tracertstats (and libtrace) can be found at |
---|
121 | http://www.wand.net.nz/trac/libtrace/wiki/UserDocumentation |
---|
122 | |
---|
123 | .SH SEE ALSO |
---|
124 | libtrace(3), tracemerge(1), tracesplit(1), tracesplit_dir(1), tracefilter(1), |
---|
125 | traceconvert(1), tracereport(1), tracepktdump(1), traceanon(1), tracesummary(1), |
---|
126 | traceconvert(1), tracereplay(1), tracediff(1), traceends(1), tracetopends(1) |
---|
127 | |
---|
128 | .SH AUTHORS |
---|
129 | Perry Lorier <perry@cs.waikato.ac.nz> |
---|