{
    "content": [
        {
            "type": "text",
            "text": "# iftop(8) (man)\n\n## TLDR\n\n> Show bandwidth usage on an interface by host.\n\n- Show the bandwidth usage:\n  `sudo iftop`\n- Show the bandwidth usage of a given interface:\n  `sudo iftop -i {{interface}}`\n- Show the bandwidth usage with port information:\n  `sudo iftop -P`\n- Do not show bar graphs of traffic:\n  `sudo iftop -b`\n- Do not look up hostnames:\n  `sudo iftop -n`\n- Display help:\n  `<?>`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** iftop - display bandwidth usage on an interface by host\n\n**Synopsis:** iftop -h | [-nNpblBP] [-i interface] [-f filter code] [-F net/mask] [-G net6/mask6]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -h | — | — |  |\n| -n | — | — |  |\n| -N | — | — |  |\n| -p | — | — | specified interface is also counted. |\n| -P | — | — |  |\n| -l | — | — | fault is not to display that address category. |\n| -b | — | — |  |\n| -m | — | — | Set the upper limit for the bandwidth scale. Specified as a number with a 'K', 'M' or 'G' suffix. |\n| -B | — | — |  |\n| -i | — | — | Listen to packets on interface. |\n| -f | — | — | Use filter code to select the packets to count. Only IP packets are ever counted, so the specified code is evaluated as  |\n| -F | — | — | Specifies an IPv4 network for traffic analysis. If specified, iftop will only include packets flowing in to or out of th |\n| -G | — | — | Specifies an IPv6 network for traffic analysis. The value of mask6 can be given as a prefix length or as a numerical add |\n| -c | — | — | Specifies an alternate config file. If not specified, iftop will use ~/.iftoprc if it exists. See below for a descriptio |\n| -t | — | — | Use text interface without ncurses and print the output to STDOUT. |\n\n## See Also\n\n- tcpdump(8)\n- pcap(3)\n- driftnet(1)\n\n## Section Outline\n\n- **NAME** (3 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (19 lines) — 1 subsections\n  - not ether host ff:ff:ff:ff:ff:ff (8 lines)\n- **OPTIONS** (1 lines) — 15 subsections\n  - -h (1 lines)\n  - -n (1 lines)\n  - -N (1 lines)\n  - -p (2 lines)\n  - -P (1 lines)\n  - -l (2 lines)\n  - -b (1 lines)\n  - -m (3 lines)\n  - -B (1 lines)\n  - -i (2 lines)\n  - -f (3 lines)\n  - -F (6 lines)\n  - -G (3 lines)\n  - -c (3 lines)\n  - -t (4 lines)\n- **DISPLAY** (26 lines)\n- **SOURCE / DEST AGGREGATION** (5 lines)\n- **PORT DISPLAY** (4 lines)\n- **DISPLAY TYPE** (5 lines)\n- **DISPLAY ORDER** (5 lines)\n- **DISPLAY FILTERING** (7 lines)\n- **PAUSE DISPLAY / FREEZE ORDER** (7 lines)\n- **SCROLL DISPLAY** (4 lines)\n- **FILTER CODE** (4 lines)\n- **CONFIG FILE** (71 lines) — 6 subsections\n  - QUIRKS (aka they're features, not bugs) (4 lines)\n  - Totals don't add up (5 lines)\n  - -F (3 lines)\n  - -F (2 lines)\n  - Peak totals don't add up (4 lines)\n  - Changing the filter code doesn't seem to work (7 lines)\n- **FILES** (1 lines) — 1 subsections\n  - ~/.iftoprc (3 lines)\n- **SEE ALSO** (3 lines)\n- **AUTHOR** (3 lines)\n- **VERSION** (3 lines)\n- **COPYING** (16 lines)\n\n## Full Content\n\n### NAME\n\niftop - display bandwidth usage on an interface by host\n\n### SYNOPSIS\n\niftop -h | [-nNpblBP] [-i interface] [-f filter code] [-F net/mask] [-G net6/mask6]\n\n### DESCRIPTION\n\niftop  listens to network traffic on a named interface, or on the first interface it can find\nwhich looks like an external interface if none is specified, and displays a table of  current\nbandwidth  usage by pairs of hosts.  iftop must be run with sufficient permissions to monitor\nall network traffic on the interface; see pcap(3) for more information, but on  most  systems\nthis means that it must be run as root.\n\nBy  default,  iftop will look up the hostnames associated with addresses it finds in packets.\nThis can cause substantial traffic of itself, and may result in a confusing display. You  may\nwish  to  suppress  display  of  DNS traffic by using filter code such as not port domain, or\nswitch it off entirely, by using the -n option or by pressing r when the program is running.\n\nBy default, iftop counts all IP packets that pass through the filter, and  the  direction  of\nthe  packet  is  determined according to the direction the packet is moving across the inter‐\nface.  Using the -F option it is possible to get iftop to show packets entering and leaving a\ngiven  network.  For example, iftop -F 10.0.0.0/255.0.0.0 will analyse packets flowing in and\nout of the 10.* network.\n\nSome other filter ideas:\n\n#### not ether host ff:ff:ff:ff:ff:ff\n\nIgnore ethernet broadcast packets.\n\nport http and not host webcache.example.com\nCount web traffic only, unless it is being directed through a local web cache.\n\nicmp   How much bandwidth are users wasting trying to figure out why the network is slow?\n\n### OPTIONS\n\n#### -h\n\n#### -n\n\n#### -N\n\n#### -p\n\nspecified interface is also counted.\n\n#### -P\n\n#### -l\n\nfault is not to display that address category.\n\n#### -b\n\n#### -m\n\nSet the upper limit for the bandwidth scale.  Specified as a number with a 'K', 'M' or\n'G' suffix.\n\n#### -B\n\n#### -i\n\nListen to packets on interface.\n\n#### -f\n\nUse  filter  code to select the packets to count. Only IP packets are ever counted, so\nthe specified code is evaluated as (filter code) and ip.\n\n#### -F\n\nSpecifies an IPv4 network for traffic analysis.  If specified, iftop will only include\npackets  flowing in to or out of the given network, and packet direction is determined\nrelative to the network boundary, rather than to the interface.  You may specify  mask\nas  a dotted quad, such as /255.255.255.0, or as a single number specifying the number\nof bits set in the netmask, such as /24.\n\n#### -G\n\nSpecifies an IPv6 network for traffic analysis. The value of mask6 can be given  as  a\nprefix length or as a numerical address string for more compound bitmasking.\n\n#### -c\n\nSpecifies an alternate config file.  If not specified, iftop will use ~/.iftoprc if it\nexists.  See below for a description of config files\n\n#### -t\n\nUse text interface without ncurses and print the output to STDOUT.\n\n### DISPLAY\n\nWhen running, iftop uses the whole screen to display network usage. At the top of the display\nis a logarithmic scale for the bar graph which gives a visual indication of traffic.\n\nThe  main  part of the display lists, for each pair of hosts, the rate at which data has been\nsent and received over the preceding 2, 10 and 40 second intervals.  The  direction  of  data\nflow is indicated by arrows, <= and =>. For instance,\n\nfoo.example.com  =>  bar.example.com      1Kb  500b   100b\n<=                       2Mb    2Mb    2Mb\n\nshows, on the first line, traffic from foo.example.com to bar.example.com; in the preceding 2\nseconds, this averaged 1Kbit/s, around half that amount over the preceding 10s, and  a  fifth\nof  that over the whole of the last 40s. During each of those intervals, the data sent in the\nother direction was about 2Mbit/s. On the actual display, part of each line  is  inverted  to\ngive  a  visual  indication of the 10s average of traffic.  You might expect to see something\nlike this where host foo is making repeated HTTP requests to bar, which is sending data  back\nwhich saturates a 2Mbit/s link.\n\nBy  default, the pairs of hosts responsible for the most traffic (10 second average) are dis‐\nplayed at the top of the list.\n\nAt the bottom of the display, various totals are shown, including peak traffic over the  last\n40s,  total traffic transferred (after filtering), and total transfer rates averaged over 2s,\n10s and 40s.\n\n### SOURCE / DEST AGGREGATION\n\nBy pressing s or d while iftop is running, all traffic for each source or destination will be\naggregated together.  This is most useful when iftop is run in promiscuous mode, or is run on\na gateway machine.\n\n### PORT DISPLAY\n\nS or D toggle the display of source and destination ports respectively. p  will  toggle  port\ndisplay on/off.\n\n### DISPLAY TYPE\n\nt  cycles  through the four line display modes; the default 2-line display, with sent and re‐\nceived traffic on separate lines, and 3 1-line displays, with sent, received, or total  traf‐\nfic shown.\n\n### DISPLAY ORDER\n\nBy default, the display is ordered according to the 10s average (2nd column).  By pressing 1,\n2 or 3 it is possible to sort by the 1st, 2nd or 3rd column.   By pressing < or > the display\nwill be sorted by source or destination hostname respectively.\n\n### DISPLAY FILTERING\n\nl  allows  you to enter a POSIX extended regular expression that will be used to filter host‐\nnames shown in the display.  This is a good way to quickly limit what is shown  on  the  dis‐\nplay.   Note  that  this  happens at a much later stage than filter code, and does not affect\nwhat is actually captured.  Display filters DO NOT affect the totals at  the  bottom  of  the\nscreen.\n\n### PAUSE DISPLAY / FREEZE ORDER\n\nP will pause the current display.\n\no  will freeze the current screen order.  This has the side effect that traffic between hosts\nnot shown on the screen at the time will not be shown at all, although it will be included in\nthe totals at the bottom of the screen.\n\n### SCROLL DISPLAY\n\nj and k will scroll the display of hosts.  This feature is most useful when the display order\nis frozen (see above).\n\n### FILTER CODE\n\nf allows you to edit the filter code whilst iftop running.  This can lead to some  unexpected\nbehaviour.\n\n### CONFIG FILE\n\niftop  can  read  its  configuration  from a config file.  If the -c option is not specified,\niftop will attempt to read its configuration from ~/.iftoprc, if it exists.  Any command line\noptions specified will override settings in the config file.\n\nThe  config  file consists of one configuration directive per line.  Each directive is a name\nvalue pair, for example:\n\ninterface: eth0\n\nsets the network interface.  The following config directives are supported:\n\n\ninterface: if\nSets the network interface to if.\n\ndns-resolution: (yes|no)\nControls reverse lookup of IP addresses.\n\nport-resolution: (yes|no)\nControls conversion of port numbers to service names.\n\nfilter-code: bpf\nSets the filter code to bpf.\n\nshow-bars: (yes|no)\nControls display of bar graphs.\n\npromiscuous: (yes|no)\nPuts the interface into promiscuous mode.\n\nport-display: (off|source-only|destination-only|on)\nControls display of port numbers.\n\nlink-local: (yes|no)\nDetermines displaying of link-local IPv6 addresses.\n\nhide-source: (yes|no)\nHides source host names.\n\nhide-destination: (yes|no)\nHides destination host names.\n\nuse-bytes: (yes|no)\nUse bytes for bandwidth display, rather than bits.\n\nsort: (2s|10s|40s|source|destination)\nSets which column is used to sort the display.\n\nline-display: (two-line|one-line-both|one-line-sent|one-line-received)\nControls the appearance of each item in the display.\n\nshow-totals: (yes|no)\nShows cumulative total for each item.\n\nlog-scale: (yes|no)\nUse a logarithmic scale for bar graphs.\n\nmax-bandwidth: bw\nFixes the maximum for the bar graph scale to bw, e.g. \"10M\". Note that the  value  has\nto always be in bits, regardless if the option to display in bytes has been chosen.\n\nnet-filter: net/mask\nDefines an IP network boundary for determining packet direction.\n\nnet-filter6: net6/mask6\nDefines an IPv6 network boundary for determining packet direction.\n\nscreen-filter: regexp\nSets a regular expression to filter screen output.\n\n#### QUIRKS (aka they're features, not bugs)\n\nThere  are  some circumstances in which iftop may not do what you expect.  In most cases what\nit is doing is logical, and we believe it is correct behaviour, although I'm  happy  to  hear\nreasoned arguments for alternative behaviour.\n\n#### Totals don't add up\n\nThere  are several reasons why the totals may not appear to add up.  The most obvious is hav‐\ning a screen filter in effect, or screen ordering frozen.  In this case some captured  infor‐\nmation is not being shown to you, but is included in the totals.\n\nA  more  subtle explanation comes about when running in promiscuous mode without specifying a\n\n#### -F\n\nthird parties.  For the purposes of the main display this is done in an arbitrary fashion (by\nordering of IP addresses), but for the sake of totals all traffic between other hosts is  ac‐\ncounted as incoming, because that's what it is from the point of view of your interface.  The\n\n#### -F\n\nacross it.\n\n#### Peak totals don't add up\n\nAgain,  this  is a feature.  The peak sent and peak received didn't necessarily happen at the\nsame time.  The peak total is the maximum of sent plus received in each captured  time  divi‐\nsion.\n\n#### Changing the filter code doesn't seem to work\n\nGive  it  time.  Changing the filter code affects what is captured from the time that you en‐\ntered it, but most of what is on the display is based on some fraction of the last 40s window\nof  capturing.  After changing the filter there may be entries on the display that are disal‐\nlowed by the current filter for up to 40s.  DISPLAY FILTERING has immediate effect  and  does\nnot affect what is captured.\n\n### FILES\n\n#### ~/.iftoprc\n\nConfiguration file for iftop.\n\n### SEE ALSO\n\ntcpdump(8), pcap(3), driftnet(1).\n\n### AUTHOR\n\nPaul Warren <pdw@ex-parrot.com>\n\n### VERSION\n\n$Id: iftop.8,v 1.31 2014/01/05 17:22:39 pdw Exp $\n\n### COPYING\n\nThis  program  is  free software; you can redistribute it and/or modify it under the terms of\nthe GNU General Public License as published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis  program  is  distributed  in the hope that it will be useful, but WITHOUT ANY WARRANTY;\nwithout even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See\nthe GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program; if\nnot, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\n02110-1301 USA.\n\n\n\n\nIFTOP(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "iftop",
        "section": "8",
        "mode": "man",
        "summary": "iftop - display bandwidth usage on an interface by host",
        "synopsis": "iftop -h | [-nNpblBP] [-i interface] [-f filter code] [-F net/mask] [-G net6/mask6]",
        "tldr_summary": "Show bandwidth usage on an interface by host.",
        "tldr_examples": [
            {
                "description": "Show the bandwidth usage",
                "command": "sudo iftop"
            },
            {
                "description": "Show the bandwidth usage of a given interface",
                "command": "sudo iftop -i {{interface}}"
            },
            {
                "description": "Show the bandwidth usage with port information",
                "command": "sudo iftop -P"
            },
            {
                "description": "Do not show bar graphs of traffic",
                "command": "sudo iftop -b"
            },
            {
                "description": "Do not look up hostnames",
                "command": "sudo iftop -n"
            },
            {
                "description": "Display help",
                "command": "<?>"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-N",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": "specified interface is also counted."
            },
            {
                "flag": "-P",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": "fault is not to display that address category."
            },
            {
                "flag": "-b",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-m",
                "long": null,
                "arg": null,
                "description": "Set the upper limit for the bandwidth scale. Specified as a number with a 'K', 'M' or 'G' suffix."
            },
            {
                "flag": "-B",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-i",
                "long": null,
                "arg": null,
                "description": "Listen to packets on interface."
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "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."
            },
            {
                "flag": "-F",
                "long": null,
                "arg": null,
                "description": "Specifies an IPv4 network for traffic analysis. If specified, iftop will only include packets flowing in to or out of the given network, 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."
            },
            {
                "flag": "-G",
                "long": null,
                "arg": null,
                "description": "Specifies an IPv6 network for traffic analysis. The value of mask6 can be given as a prefix length or as a numerical address string for more compound bitmasking."
            },
            {
                "flag": "-c",
                "long": null,
                "arg": null,
                "description": "Specifies an alternate config file. If not specified, iftop will use ~/.iftoprc if it exists. See below for a description of config files"
            },
            {
                "flag": "-t",
                "long": null,
                "arg": null,
                "description": "Use text interface without ncurses and print the output to STDOUT."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "tcpdump",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tcpdump/8/json"
            },
            {
                "name": "pcap",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/pcap/3/json"
            },
            {
                "name": "driftnet",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/driftnet/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 19,
                "subsections": [
                    {
                        "name": "not ether host ff:ff:ff:ff:ff:ff",
                        "lines": 8
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-h",
                        "lines": 1,
                        "flag": "-h"
                    },
                    {
                        "name": "-n",
                        "lines": 1,
                        "flag": "-n"
                    },
                    {
                        "name": "-N",
                        "lines": 1,
                        "flag": "-N"
                    },
                    {
                        "name": "-p",
                        "lines": 2,
                        "flag": "-p"
                    },
                    {
                        "name": "-P",
                        "lines": 1,
                        "flag": "-P"
                    },
                    {
                        "name": "-l",
                        "lines": 2,
                        "flag": "-l"
                    },
                    {
                        "name": "-b",
                        "lines": 1,
                        "flag": "-b"
                    },
                    {
                        "name": "-m",
                        "lines": 3,
                        "flag": "-m"
                    },
                    {
                        "name": "-B",
                        "lines": 1,
                        "flag": "-B"
                    },
                    {
                        "name": "-i",
                        "lines": 2,
                        "flag": "-i"
                    },
                    {
                        "name": "-f",
                        "lines": 3,
                        "flag": "-f"
                    },
                    {
                        "name": "-F",
                        "lines": 6,
                        "flag": "-F"
                    },
                    {
                        "name": "-G",
                        "lines": 3,
                        "flag": "-G"
                    },
                    {
                        "name": "-c",
                        "lines": 3,
                        "flag": "-c"
                    },
                    {
                        "name": "-t",
                        "lines": 4,
                        "flag": "-t"
                    }
                ]
            },
            {
                "name": "DISPLAY",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "SOURCE / DEST AGGREGATION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "PORT DISPLAY",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DISPLAY TYPE",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DISPLAY ORDER",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DISPLAY FILTERING",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "PAUSE DISPLAY / FREEZE ORDER",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SCROLL DISPLAY",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "FILTER CODE",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "CONFIG FILE",
                "lines": 71,
                "subsections": [
                    {
                        "name": "QUIRKS (aka they're features, not bugs)",
                        "lines": 4
                    },
                    {
                        "name": "Totals don't add up",
                        "lines": 5
                    },
                    {
                        "name": "-F",
                        "lines": 3,
                        "flag": "-F"
                    },
                    {
                        "name": "-F",
                        "lines": 2,
                        "flag": "-F"
                    },
                    {
                        "name": "Peak totals don't add up",
                        "lines": 4
                    },
                    {
                        "name": "Changing the filter code doesn't seem to work",
                        "lines": 7
                    }
                ]
            },
            {
                "name": "FILES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "~/.iftoprc",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYING",
                "lines": 16,
                "subsections": []
            }
        ]
    }
}