IFTOP(8) IFTOP(8) NAME iftop - display bandwidth usage on an interface by host SYNOPSIS iftop -h | [-dpb] [-i interface] [-f filter code] [-n net/mask] DESCRIPTION iftop listens to network traffic on a named interface, or eth0 if none is specified, and displays a table of current bandwidth usage by pairs of hosts. iftop must be run with sufficient permissions to monitor all network traffic on the interface; see pcap(3) for more information, but on most systems this means that it must be run as root. By default, iftop will look up the hostnames associated with addresses it finds in packets. This can cause substantial traffic of itself, and may result in a confusing display. You may wish to suppress display of DNS traffic by using filter code such as not port domain, or switch it off entirely, by using the -d option or by pressing R when the program is running. By default, iftop counts all IP packets that pass through the filter, and the direction of the packet is determined according to the direc- tion the packet is moving across the interface. Using the -n option it is possible to get iftop to show packets entering and leaving a given network. For example, iftop -n 10.0.0.0/255.0.0.0 will analyse packets flowing in and out of the 10.* network. Some other filter ideas: not ether host ff:ff:ff:ff:ff:ff Ignore ethernet broadcast packets. port http and not host webcache.example.com Count web traffic only, unless it is being directed through a local web cache. icmp How much bandwith are users wasting trying to figure out why the network is slow? OPTIONS -h Print a summary of usage. -d Don't do hostname lookups. This setting may be altered at run time. -p Run in promiscuous mode, so that traffic which does not pass directly through the specified interface is also counted. -b Don't display bar graphs of traffic. This setting may be altered at run time. -i interface Listen to packets on interface. -f filter code Use filter code to select the packets to count. Only IP packets are ever counted, so the specified code is evaluated as (filter code) and ip. -n net/mask Specifies a network for traffic analysis. If specified, iftop will only include packets flowing in to or out of the given net- work, and packet direction is determined relative to the network boundary, rather than to the interface. You may specify mask as a dotted quad, such as /255.255.255.0, or as a single number specifying the number of bits set in the netmask, such as /24. DISPLAY When running, iftop uses the whole screen to display network usage. At the top of the display is a reminder of keys which control iftop in operation. Below that is a logarithmic scale for the bar graph which gives a visual indication of traffic. The main part of the display lists, for each pair of hosts, the rate at which data has been sent and received over the preceding 2, 10 and 40 second intervals. The direction of data flow is indicated by arrows, <= and =>. For instance, foo.example.com => bar.example.com 1K 500b 100b <= 2M 2M 2M shows, on the first line, traffic from foo.example.com to bar.exam- ple.com; in the preceding 2 seconds, this averaged 1Kbit/s, around half that amount over the preceding 10s, and a fifth of that over the whole of the last 40s. During each of those intervals, the data sent in the other direction was about 2Mbit/s. On the actual display, part of each line is inverted to give a visual indication of the 10s average of traffic. You might expect to see something like this where host foo is making repeated HTTP requests to bar, which is sending data back which saturates a 2Mbit/s link. All rates are displayed in bits per second and multiples thereof. The pairs of hosts responsible for the most traffic are displayed at the top of the list. At the bottom of the display, various totals are shown, for instance: total: 3.1K TX: 0.3M peaks: 64b totals: 64b 30b 10b peak: 4.5K RX: 8M 4.5K 4.5K 0.1M 5K The first column of numbers shows the total rate of received plus transmitted traffic over the last 2s, and its peak value over the past 40s. The next column shows the total amount of traffic observed during this session, in bytes, not bits. The next column shows the peaks in received and transmitted traffic, and the remaining colums show the 2, 10 and 40 second averages. As with the per-host displays, the top line shows transmitted and the bottom line received traffic. SOURCE / DEST AGGREGATION By pressing s or d while iftop is running, all traffic for each source or destination will be aggregated together. This is most useful when iftop is run in promiscuous mode, or is run on a gateway machine. SEE ALSO tcpdump(8), pcap(3), driftnet(1). AUTHOR Paul Warren VERSION $Id: iftop.8,v 1.16 2002/04/03 21:48:52 pdw Exp $ COPYING This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. IFTOP(8)