id = "iftop"
name = "iftop"
homepage = "https://pdw.ex-parrot.com/iftop/"
description = "Display an interface's bandwidth usage."
executables = ["iftop"]
[dotfiles]
paths = ["~/.iftoprc"]
secret = []
[commands]
format = 1
label = "Watch network bandwidth"
description = "Live per-connection bandwidth on one interface, or a one-shot text dump. Needs root. Packet filters, config files and sorting options are not in this form."
quality = "ai-draft"
parser = { end_of_options = "", interleave = "permute", long_equals = false, short_attached = false, short_bundles = true }
[[commands.source]]
id = "man"
kind = "manual"
url = "https://manpages.debian.org/bookworm/iftop/iftop.8.en.html"
revision = "bookworm"
evidence = """
-n
Don't do hostname lookups.
-N
Do not resolve port number to service names
-p
Run in promiscuous mode, so that traffic which does not pass directly
-P
Turn on port display.
-B
Display bandwidth rates in bytes/sec rather than bits/sec.
-i interface
Listen to packets on interface.
-f filter
Use filter code to select the packets to count.
-t text output
Use text interface without ncurses and print the output to STDOUT.
"""
[[commands.field]]
id = "interface"
label = "Interface"
type = "string"
option = ["-i"]
sources = ["man"]
[[commands.field]]
id = "no_dns"
label = "No hostname lookups"
type = "boolean"
option = ["-n"]
sources = ["man"]
[[commands.field]]
id = "no_service"
label = "No port-to-service names"
type = "boolean"
option = ["-N"]
sources = ["man"]
[[commands.field]]
id = "show_ports"
label = "Show ports"
type = "boolean"
option = ["-P"]
sources = ["man"]
[[commands.field]]
id = "bytes"
label = "Bytes per second"
type = "boolean"
option = ["-B"]
sources = ["man"]
[[commands.field]]
id = "promisc"
label = "Promiscuous mode"
type = "boolean"
option = ["-p"]
sources = ["man"]
[[commands.field]]
id = "text"
label = "Text output (no ncurses)"
type = "boolean"
option = ["-t"]
sources = ["man"]
[[commands.task]]
id = "watch"
label = "Watch an interface"
set = { no_dns = [true], show_ports = [true] }
fields = ["interface", "no_dns", "no_service", "show_ports", "bytes"]
required = []
[[commands.task]]
id = "dump"
label = "Text dump"
set = { text = [true], no_dns = [true] }
lock = ["text"]
fields = ["interface", "text", "no_dns", "bytes"]
required = []
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["interface", "no_dns", "show_ports", "bytes", "text"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["no_service", "promisc"]