ring: use xzmalloc_aligned
[netsniff-ng.git] / ifpps.8
blobb60e7b8c0ea8e54c94504a901e81bf7bf3165a90
1 .\" netsniff-ng - the packet sniffing beast
2 .\" Copyright 2013 Daniel Borkmann.
3 .\" Subject to the GPL, version 2.
4 .TH IFPPS 8 "03 March 2013" "Linux" "netsniff-ng toolkit"
5 .SH NAME
6 ifpps \- top-like networking and system statistics
7 .PP
8 .SH SYNOPSIS
9 .PP
10 \fBifpps\fR { [\fIoptions\fR] | [\fIdevice\fR] }
11 .PP
12 .SH DESCRIPTION
13 .PP
14 ifpps is a small utility which periodically provides top-like networking
15 and system statistics from the kernel. ifpps gathers its data directly
16 from procfs files and does not make use of any user space monitoring
17 libraries which would falsify statistics under high load.
18 .PP
19 For instance, consider the following scenario: two directly connected
20 Linux machines with Intel Core 2 Quad Q6600 2.40GHz CPUs, 4 GB RAM, and
21 an Intel 82566DC-2 Gigabit Ethernet NIC are used for performance evaluation.
22 One machine generates 64 byte network packets by using the kernel space
23 packet generator pktgen with a maximum possible packet rate. The other
24 machine displays statistics about incoming network packets by using i)
25 iptraf(8) and ii) ifpps.
26 .PP
27 iptraf which incorporates pcap(3) shows an average packet rate of
28 246,000 pps while on the other hand ifpps shows an average packet rate
29 of 1,378,000 pps. Hence, due to packet copies and deferring statistics
30 creation into user space, a measurement error of approximately 460 percent
31 occurs. Tools like iptraf might display much more information such as
32 TCP per flow statistics (hence the use of the pcap library). This is not
33 possible with ifpps, because overall networking statistics are its focus;
34 statistics, which are also fairly reliable under high packet load.
35 .PP
36 ifpps also periodically displays CPU load, interrupt, software interrupt
37 data per sample interval as well as total interrupts, all per CPU. In case
38 the number of CPUs exceeds 5 or the number specified by the user with the
39 \[lq]\-n\[rq] command line option, ifpps will only display this number top
40 heavy hitters. The topmost heavy hitter CPU will be marked with \[lq]+\[rq].
41 The least heavy hitter will always be displayed and is marked with
42 \[lq]-\[rq]. In addition, the average for all the above per-CPU data is
43 shown. Optionally the median values can be displayed using the \[lq]\-m\[rq]
44 command line option.
45 .PP
46 ifpps also supports directly the gnuplot(1) data sample format. This
47 facilitates creation of gnuplot figures from ifpps time series.
48 .PP
49 .SH OPTIONS
50 .PP
51 .SS -d <netdev>, --dev <netdev>
52 Networking device to fetch statistics from, for example eth0, wlan0.
53 .PP
54 .SS -n, --num-cpus
55 Set maximum number of top hitter CPUs (in terms of time spent in system/user
56 mode) to display in ncurses mode, default is 10.
57 .PP
58 .SS -t <time>, --interval <time>
59 Statistics refresh interval in milliseconds, default is 1000ms.
60 .PP
61 .SS -c, --csv
62 Output (once) the ncurses data to the terminal as gnuplot(1)-ready data.
63 .PP
64 .SS -l, --loop
65 Continuously output the terminal data after a refresh interval. This option
66 is only available if option \[lq]\-c\[rq] is given. For \[lq]\-l\[rq] it is
67 usually recommended to redirect the output into a file that is to be processed
68 later with gnuplot(1).
69 .PP
70 .SS -m, --median
71 Show median values across all CPUs for CPU load, interrupts (per interval and
72 absolute) and software interrupts.
73 .PP
74 .SS -o, --omit-header
75 Omit printing the CSV header. This option is only available if \[lq]\-c\[rq] is given.
76 .PP
77 .SS -p, --promisc
78 Turn on promiscuous mode for the given networking device.
79 .PP
80 .SS -P, --percentage
81 Show percentage of current throughput in relation to theoretical line rate.
82 .PP
83 .SS -W, --no-warn
84 Suppress possible warnings in the ncurses output, e.g. about a too low sampling
85 interval that could cause performance regression.
86 .PP
87 .SS -v, --version
88 Show version information.
89 .PP
90 .SS -h, --help
91 Show user help.
92 .PP
93 .SH USAGE EXAMPLE
94 .PP
95 .SS ifpps eth0
96 Default ncurses output for the eth0 device.
97 .PP
98 .SS ifpps -pd eth0
99 Ncurses output for the eth0 device in promiscuous mode.
101 .SS ifpps -lpcd wlan0 > plot.dat
102 Continuous terminal output for the wlan0 device in promiscuous mode.
104 .SH NOTE
105 On 10Gbit/s cards or higher, receive and transmit statistics are usually
106 accumulated at a higher duration interval than 1 second. Thus, it might
107 be advisable to alter the timing to a higher accumulation interval for such cards.
109 .SH LEGAL
110 ifpps is licensed under the GNU GPL version 2.0.
112 .SH HISTORY
113 .B ifpps
114 was originally written for the netsniff-ng toolkit by Daniel Borkmann. It
115 is currently maintained by Tobias Klauser <tklauser@distanz.ch> and Daniel
116 Borkmann <dborkma@tik.ee.ethz.ch>.
118 .SH SEE ALSO
119 .BR netsniff-ng (8),
120 .BR trafgen (8),
121 .BR mausezahn (8),
122 .BR bpfc (8),
123 .BR flowtop (8),
124 .BR astraceroute (8),
125 .BR curvetun (8)
127 .SH AUTHOR
128 Manpage was written by Daniel Borkmann.
130 .SH COLOPHON
131 This page is part of the Linux netsniff-ng toolkit project. A description of the project,
132 and information about reporting bugs, can be found at http://netsniff-ng.org/.