IFSTAT(1)
β¨ IFSTAT β Report InterFace STATistics β¨
okay bestie, gather round π this is ifstat, from the System Utilities corner of your manual pages, and it's genuinely one of the most useful little gremlins in your toolbox. it's a little tool that reports interface activity β like, the network-interface kind of activity. think of it as the iostat/vmstat treatment but for your network interfaces instead of your disks and CPU. same energy, different victim. slay π
πΈ NAME πΈ
ifstat β Report InterFace STATistics. that's it, that's the name, it does what it says on the tin π
π¦ SYNOPSIS π¦
ifstat [-a] [-l] [-z] [-n] [-v] [-h] [-t] [-i if0,if1,...] [-d
drv[:opt]] [-s [comm@][#]host[/nn]] [-T] [-A] [-w] [-W] [-S] [-b] [-q]
[delay[/delay] [count]]
yeah it's a lot of little flags, don't panic, we're gonna go through every single one together, no cap π«Ά
π DESCRIPTION π
ifstat is a little tool to report interface activity, just like iostat/vmstat do for other system statistics. periodt. that's the whole concept and it ate π
β¨ OPTIONS β¨
ifstat accepts the following options:
-lβ turns ON monitoring of loopback interfaces, but only the ones where stats are actually available π. by default,ifstatmonitors all non-loopback interfaces that are up. so if you're wondering wherelowent, it's this flag's fault, not yours π-aβ monitors ALL the interfaces found for which statistics are available. all of them. every last one. go off π-zβ hides interfaces whose counters are null, eg interfaces that are up but not used. ghosting the boring ones, iconic π-iβ specifies the list of interfaces to monitor, separated by commas. and listen β if an interface name has a comma in it (chaotic, but okay), it can be escaped with'\'. multiple instances of the option are added together, so you can stack 'em up π-sβ equivalent to-d snmp:[comm@][#]host[/nn]]to poll a remote host through SNMP. details are down below in the drivers section, keep scrolling bestie β¨-hβ displays a short help message. your girl when you forget a flag π«Ά-nβ turns off displaying the header periodically. no more repeated header, just vibes π-tβ adds a timestamp at the beginning of each line. so you know when the numbers happened, not just what they were β-Tβ reports total bandwidth for all monitored interfaces. one number to rule them all π-Aβ disables use of interface indexes. here's the tea: by default, when the polling mechanism is index based (snmp,ifmib),ifstatremembers the indexes of monitored interfaces so it only polls those. BUT if interface indexes change often (new interfaces added, etc), you might lose some stats, hence this flag. note that if you askifstatto monitor a non existent interface, it will poll all interfaces until it finds the requested one (regardless of this flag) so you can poll for an interface that goes up and down. it's giving patient π-wβ uses fixed width columns, instead of enlarging them if needed for interface names to fit. tidy, contained, lowkey satisfying π-Wβ wraps lines that are larger than the terminal width (implies-w). wrapped lines are prefixed with a cycling letter to ease reading. cute little breadcrumbs so you don't get lost π§-Sβ keeps stats updated on the same line if possible (no scrolling nor wrapping). main character energy, never leaves the screen π-bβ reports bandwidth inkbits/secinstead ofkbytes/sec. important distinction, don't get caught out ngl-qβ quiet mode, warnings are not printed. shhh π€«-vβ displays version and the compiled-in drivers. a little selfie of the build πΈ-dβ specifies a driver to use to gather stats, and an eventual option for this driver, separated from the driver name by a colon. if this is not specified,ifstatuses the first driver compiled in, with no options.
the following drivers are available (depending on the operating system and compile-time options, not all of them might be present):
procβ this driver gets statistics from Linux's/proc/net/devfile. an alternate file name to get stats from can be passed as the option.ifmibβ this driver gets statistics from FreeBSD'sifmibsysctl. it doesn't accept any options.kstatβ this driver gets statistics from Solariskstatinterface. it doesn't accept any options.ifdataβ this driver gets statistics usingSIOCGIFDATAioctl under IRIX and OpenBSD (different semantics). it doesn't accept any options.routeβ this driver gets statistics using routing sysctl on BSD based systems. it doesn't accept any options.kvmβ this driver gets statistics by reading the kernel live structures. it accepts an option specifying which files/devices to use in the following format:[execfile][,[corefile][,swapfile]](seekvm_open(3)for details on those fields). if a null string is passed for a parameter, the system default will be used for it.
β οΈ note that for this driver to work,ifstatneeds to have read access to the system memory device. this is usually done by running it as root, or by installing setgidmemorkmem.ifstatwill NOT install setgid by default; It is up to you to decide if you trust it. bestie, read that twice. it's literally your call π
dlpiβ this driver gets statistics using the DLPI streams interface available on HP-UX. an alternate device to query statistics from can be passed as the option (default is/dev/dlpi).win32β this driver gets statistics using theGetIfTableinterface available on Win32 systems. it doesn't accept any options.snmpβ this driver gets statistics through SNMP. the option, in the form[comm@][#]host[/nn]], specifies the host and eventual community to poll. default community ispublic, but can be changed by prepending"comm@"to the hostname. if host starts by a#, interface names are generated from their index asifNN(this is a workaround for some equipments that give all interfaces the same description). default host islocalhost, and this will be used by default ifsnmpis the only available driver.
the driver will try to poll several interfaces at once by grouping requests in SNMP packets. by default interfaces will be polled by group of 8. if this doesn't work well with your equipments, you can lower that number by suffixing the hostname with /nn, where nn is the number of interfaces to poll at once. you can also increase the number if you want to poll a large number of interfaces efficiently and if your server supports it. multitasking queen π
delayβ delay is the delay between updates in seconds, which defaults to1. a decimal number can be specified for intervals shorter than a second. (minimum0.1)
a second delay can also be specified (separated from the first one by a '/'). in that case the first delay will be used for the first poll after start and the second one will be used for all following polls (This can be used to have a "fast" start when running for a long while with a big delay). so you get a cute little sprint at the beginning and then settle into the slow burn πβοΈπ¨
countβ count is the number of updates before stopping. if not specified, it is unlimited. forever girl, no cap β¨
π SEE ALSO π
vmstat(1), iostat(1) β go give them a visit too, they're family π«Ά
π AUTHOR π
GaΓ«l Roualland, <gael.roualland@dial.oleane.com> β thank you for this little legend, we're obsessed π
and that's the whole page, bestie!! this was ifstat version 1.1, dated 2003-11-22 π¦ go forth and monitor those interfaces, you absolute icon ππ
β¨
π¦ where this page comes from
- debian trixie: ifstat 1.1.1-2+b1 Β· GPL-2.0-or-later
- ubuntu noble: ifstat 1.1.1-2build2 Β· GPL-2.0-or-later
- ubuntu questing: ifstat 1.1.1-2build2
- ubuntu resolute: ifstat 1.1.1-2build3 Β· GPL-2.0-or-later
- ubuntu stonking: ifstat 1.1.1-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms