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