File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / iftop / iftop.8
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Oct 18 14:04:50 2016 UTC (7 years, 8 months ago) by misho
Branches: iftop, MAIN
CVS tags: v1_0rc4, HEAD
iftop 1.0pre4

    1: .TH IFTOP 8
    2: .\"
    3: .\" iftop.8:
    4: .\" Manual page for iftop.
    5: .\"
    6: .\" $Id: iftop.8,v 1.1.1.2 2016/10/18 14:04:50 misho Exp $
    7: .\"
    8: 
    9: .SH NAME
   10: iftop - display bandwidth usage on an interface by host
   11: 
   12: .SH SYNOPSIS
   13: \fBiftop\fP \fB-h\fP |
   14: [\fB-nNpblBP\fP] [\fB-i\fP \fIinterface\fP] [\fB-f\fP \fIfilter code\fP] [\fB-F\fP \fInet\fP/\fImask\fP]
   15: [\fB-G\fP \fInet6\fP/\fImask6\fP]
   16: .SH DESCRIPTION
   17: \fBiftop\fP listens to network traffic on a named \fIinterface\fP, or on the
   18: first interface it can find which looks like an external interface if none is
   19: specified, and displays a table of current bandwidth usage by pairs of hosts.
   20: \fBiftop\fP must be run with sufficient permissions to monitor all network
   21: traffic on the \fIinterface\fP; see \fBpcap\fP(3) for more information, but on
   22: most systems this means that it must be run as root.
   23: 
   24: By default, \fBiftop\fP will look up the hostnames associated with addresses it
   25: finds in packets. This can cause substantial traffic of itself, and may result
   26: in a confusing display. You may wish to suppress display of DNS traffic by
   27: using filter code such as \fBnot port domain\fP, or switch it off entirely,
   28: by using the \fB-n\fP option or by pressing \fBr\fP when the program is running.
   29: 
   30: By default, \fBiftop\fP counts all IP packets that pass through the filter, and
   31: the direction of the packet is determined according to the direction the packet
   32: is moving across the interface.  Using the \fB-F\fP option it is possible to
   33: get \fBiftop\fP to show packets entering and leaving a given network.  For
   34: example, \fBiftop \-F 10.0.0.0/255.0.0.0\fP will analyse packets flowing in and
   35: out of the 10.* network.
   36: 
   37: Some other filter ideas:
   38: .TP
   39: \fBnot ether host ff:ff:ff:ff:ff:ff\fP
   40: Ignore ethernet broadcast packets.
   41: .TP
   42: \fBport http and not host \fP\fIwebcache.example.com\fP
   43: Count web traffic only, unless it is being directed through a local web cache.
   44: .TP
   45: \fBicmp\fP
   46: How much bandwidth are users wasting trying to figure out why the network is
   47: slow?
   48: 
   49: .SH OPTIONS
   50: 
   51: .TP
   52: \fB-h\fP
   53: Print a summary of usage.
   54: .TP
   55: \fB-n\fP
   56: Don't do hostname lookups. 
   57: .TP
   58: \fB-N\fP
   59: Do not resolve port number to service names
   60: .TP
   61: \fB-p\fP
   62: Run in promiscuous mode, so that traffic which does not pass directly through
   63: the specified interface is also counted.
   64: .TP
   65: \fB-P\fP
   66: Turn on port display.
   67: .TP
   68: \fB-l\fP
   69: Display and count datagrams addressed to or from link-local IPv6 addresses.
   70: The default is not to display that address category.
   71: .TP
   72: \fB-b\fP
   73: Don't display bar graphs of traffic. 
   74: .TP
   75: \fB-m\fP \fIlimit\fP
   76: Set the upper limit for the bandwidth scale.  Specified as a number with a 'K', 'M' or 'G' suffix.
   77: .TP
   78: \fB-B\fP
   79: Display bandwidth rates in bytes/sec rather than bits/sec.
   80: .TP
   81: \fB-i\fP \fIinterface\fP
   82: Listen to packets on \fIinterface\fP.
   83: .TP
   84: \fB-f\fP \fIfilter code\fP
   85: Use \fIfilter code\fP to select the packets to count. Only IP packets are ever
   86: counted, so the specified code is evaluated as \fB(\fP\fIfilter code\fP\fB) and ip\fP.
   87: .TP
   88: \fB-F\fP \fInet\fP/\fImask\fP
   89: Specifies an IPv4 network for traffic analysis.  If specified, iftop will only
   90: include packets flowing in to or out of the given network, and packet direction
   91: is determined relative to the network boundary, rather than to the interface.
   92: You may specify \fImask\fP as a dotted quad, such as /255.255.255.0, or as a
   93: single number specifying the number of bits set in the netmask, such as /24.
   94: .TP
   95: \fB-G\fP \fInet6\fP/\fImask6\fP
   96: Specifies an IPv6 network for traffic analysis. The value of \fImask6\fP can be
   97: given as a prefix length or as a numerical address string for more compound
   98: bitmasking.
   99: .TP
  100: \fB-c\fP \fIconfig file\fP
  101: Specifies an alternate config file.  If not specified, iftop will use
  102: \fB~/.iftoprc\fP if it exists.  See below for a description of config files
  103: .TP
  104: \fB-t\fP \fItext output mode\fP
  105: Use text interface without ncurses and print the output to STDOUT.
  106: 
  107: 
  108: .SH DISPLAY
  109: 
  110: When running, \fBiftop\fP uses the whole screen to display network usage. At
  111: the top of the display is a logarithmic scale for the bar graph which gives a
  112: visual indication of traffic.
  113: 
  114: The main part of the display lists, for each pair of hosts, the rate at which
  115: data has been sent and received over the preceding 2, 10 and 40 second
  116: intervals. The direction of data flow is indicated by arrows, <= and =>. For
  117: instance,
  118: .nf
  119: 
  120: foo.example.com  =>  bar.example.com      1Kb  500b   100b
  121:                  <=                       2Mb    2Mb    2Mb
  122: 
  123: .fi
  124: shows, on the first line, traffic from \fBfoo.example.com\fP to
  125: \fBbar.example.com\fP; in the preceding 2 seconds, this averaged 1Kbit/s,
  126: around half that amount over the preceding 10s, and a fifth of that over the
  127: whole of the last 40s. During each of those intervals, the data sent in the
  128: other direction was about 2Mbit/s. On the actual display, part of each line
  129: is inverted to give a visual indication of the 10s average of traffic.
  130: You might expect to see something like this where host \fBfoo\fP is making
  131: repeated HTTP requests to \fBbar\fP, which is sending data back which saturates
  132: a 2Mbit/s link.
  133: 
  134: By default, the pairs of hosts responsible for the most traffic (10 second
  135: average) are displayed at the top of the list.
  136: 
  137: At the bottom of the display, various totals are shown, including peak traffic
  138: over the last 40s, total traffic transferred (after filtering), and total
  139: transfer rates averaged over 2s, 10s and 40s.
  140: 
  141: .SH SOURCE / DEST AGGREGATION
  142: 
  143: By pressing \fBs\fP or \fBd\fP while \fBiftop\fP is running, all traffic
  144: for each source or destination will be aggregated together.  This is most
  145: useful when \fBiftop\fP is run in promiscuous mode, or is run on a gateway
  146: machine.
  147: 
  148: .SH PORT DISPLAY
  149: 
  150: \fBS\fP or \fBD\fP toggle the display of source and destination ports
  151: respectively. \fBp\fP will toggle port display on/off.
  152: 
  153: .SH DISPLAY TYPE
  154: 
  155: \fBt\fP cycles through the four line display modes; the default 2-line display,
  156: with sent and received traffic on separate lines, and 3 1-line displays, with
  157: sent, received, or total traffic shown.
  158: 
  159: .SH DISPLAY ORDER
  160: 
  161: By default, the display is ordered according to the 10s average (2nd column).
  162: By pressing \fB1\fP, \fB2\fP or \fB3\fP it is possible to sort by the 1st, 2nd
  163: or 3rd column.   By pressing \fB<\fP or \fB>\fP the display will be sorted by
  164: source or destination hostname respectively.
  165: 
  166: .SH DISPLAY FILTERING
  167: 
  168: \fBl\fP allows you to enter a POSIX extended regular expression that will be
  169: used to filter hostnames shown in the display.  This is a good way to quickly
  170: limit what is shown on the display.  Note that this happens at a much later
  171: stage than filter code, and does not affect what is actually captured.  Display
  172: filters DO NOT affect the totals at the bottom of the screen.
  173: 
  174: .SH PAUSE DISPLAY / FREEZE ORDER
  175: 
  176: \fBP\fP will pause the current display.
  177: 
  178: \fBo\fP will freeze the current screen order.  This has the side effect that
  179: traffic between hosts not shown on the screen at the time will not be shown at
  180: all, although it will be included in the totals at the bottom of the screen.
  181: 
  182: .SH SCROLL DISPLAY
  183: 
  184: \fBj\fP and \fBk\fP will scroll the display of hosts.  This feature is most
  185: useful when the display order is frozen (see above).
  186: 
  187: .SH FILTER CODE
  188: 
  189: \fBf\fP allows you to edit the filter code whilst iftop running.  This
  190: can lead to some unexpected behaviour.
  191: 
  192: .SH CONFIG FILE
  193: 
  194: iftop can read its configuration from a config file.  If the \fB-c\fP option is
  195: not specified, iftop will attempt to read its configuration from
  196: \fB~/.iftoprc\fP, if it exists.  Any command line options specified will
  197: override settings in the config file.
  198: 
  199: The config file consists of one configuration directive per line.  Each
  200: directive is a name value pair, for example:
  201: .nf
  202: 
  203: interface: eth0
  204: 
  205: .fi
  206: sets the network interface.  The following config directives are supported:
  207: 
  208: .TP
  209: \fBinterface:\fP \fIif\fP
  210: Sets the network interface to \fIif\fP.
  211: .TP
  212: \fBdns-resolution:\fP \fI(yes|no)\fP
  213: Controls reverse lookup of IP addresses.
  214: .TP
  215: \fBport-resolution:\fP \fI(yes|no)\fP
  216: Controls conversion of port numbers to service names.
  217: .TP
  218: \fBfilter-code:\fP \fIbpf\fP
  219: Sets the filter code to \fIbpf\fP.
  220: .TP
  221: \fBshow-bars:\fP \fI(yes|no)\fP
  222: Controls display of bar graphs.
  223: .TP
  224: \fBpromiscuous:\fP \fI(yes|no)\fP
  225: Puts the interface into promiscuous mode.
  226: .TP
  227: \fBport-display:\fP \fI(off|source-only|destination-only|on)\fP
  228: Controls display of port numbers.
  229: .TP
  230: \fBlink-local:\fP \fI(yes|no)\fP
  231: Determines displaying of link-local IPv6 addresses.
  232: .TP
  233: \fBhide-source:\fP \fI(yes|no)\fP
  234: Hides source host names.
  235: .TP
  236: \fBhide-destination:\fP \fI(yes|no)\fP
  237: Hides destination host names.
  238: .TP
  239: \fBuse-bytes:\fP \fI(yes|no)\fP
  240: Use bytes for bandwidth display, rather than bits.
  241: .TP
  242: \fBsort:\fP \fI(2s|10s|40s|source|destination)\fP
  243: Sets which column is used to sort the display.
  244: .TP
  245: \fBline-display:\fP \fI(two-line|one-line-both|one-line-sent|one-line-received)\fP
  246: Controls the appearance of each item in the display.
  247: .TP
  248: \fBshow-totals:\fP \fI(yes|no)\fP
  249: Shows cumulative total for each item.
  250: .TP
  251: \fBlog-scale:\fP \fI(yes|no)\fP
  252: Use a logarithmic scale for bar graphs.
  253: .TP
  254: \fBmax-bandwidth:\fP \fIbw\fP
  255: Fixes the maximum for the bar graph scale to \fIbw\fP, e.g. "10M". Note that the value has to always be in bits, regardless if the option to display in bytes has been chosen.
  256: .TP
  257: \fBnet-filter:\fP \fInet/mask\fP
  258: Defines an IP network boundary for determining packet direction.
  259: .TP
  260: \fBnet-filter6:\fP \fInet6/mask6\fP
  261: Defines an IPv6 network boundary for determining packet direction.
  262: .TP
  263: \fBscreen-filter:\fP \fIregexp\fP
  264: Sets a regular expression to filter screen output.
  265: 
  266: .SH QUIRKS (aka they're features, not bugs)
  267: 
  268: There are some circumstances in which iftop may not do what you expect.  In
  269: most cases what it is doing is logical, and we believe it is correct behaviour,
  270: although I'm happy to hear reasoned arguments for alternative behaviour.
  271: 
  272: \fBTotals don't add up\fP
  273: 
  274: There are several reasons why the totals may not appear to add up.  The
  275: most obvious is having a screen filter in effect, or screen ordering
  276: frozen.  In this case some captured information is not being shown to
  277: you, but is included in the totals.
  278: 
  279: A more subtle explanation comes about when running in promiscuous mode
  280: without specifying a \fB-F\fP option.  In this case there is no easy way
  281: to assign the direction of traffic between two third parties.  For the purposes
  282: of the main display this is done in an arbitrary fashion (by ordering of IP
  283: addresses), but for the sake of totals all traffic between other hosts is
  284: accounted as incoming, because that's what it is from the point of view of your
  285: interface.  The \fB-F\fP option allows you to specify an arbitrary network
  286: boundary, and to show traffic flowing across it.
  287: 
  288: \fBPeak totals don't add up\fP
  289: 
  290: Again, this is a feature.  The peak sent and peak received didn't necessarily
  291: happen at the same time.  The peak total is the maximum of sent plus received
  292: in each captured time division.
  293: 
  294: \fBChanging the filter code doesn't seem to work\fP
  295: 
  296: Give it time.  Changing the filter code affects what is captured from
  297: the time that you entered it, but most of what is on the display is
  298: based on some fraction of the last 40s window of capturing.  After
  299: changing the filter there may be entries on the display that are
  300: disallowed by the current filter for up to 40s.  DISPLAY FILTERING has
  301: immediate effect and does not affect what is captured.
  302: 
  303: .SH FILES
  304: 
  305: .TP
  306: \fB~/.iftoprc\fP
  307: Configuration file for iftop.
  308: 
  309: .SH SEE ALSO
  310: .BR tcpdump (8),
  311: .BR pcap (3),
  312: .BR driftnet (1).
  313: 
  314: .SH AUTHOR
  315: Paul Warren <pdw@ex-parrot.com>
  316: 
  317: .SH VERSION
  318: $Id: iftop.8,v 1.1.1.2 2016/10/18 14:04:50 misho Exp $
  319: 
  320: .SH COPYING
  321: This program is free software; you can redistribute it and/or modify
  322: it under the terms of the GNU General Public License as published by
  323: the Free Software Foundation; either version 2 of the License, or
  324: (at your option) any later version.
  325: 
  326: This program is distributed in the hope that it will be useful,
  327: but WITHOUT ANY WARRANTY; without even the implied warranty of
  328: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  329: GNU General Public License for more details.
  330: 
  331: You should have received a copy of the GNU General Public License along
  332: with this program; if not, write to the Free Software Foundation, Inc.,
  333: 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  334: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>