IFSTAT(1)

πŸ“¦ version 1.1, in nixos 26.05, nixpkgs unstable

πŸ’… ifstat(1) β€” Report InterFace STATistics πŸ’…

okay so this is the ifstat page from the System Utilities shelf, and it is literally here to report interface activity. bestie, it's giving network-statistics main character energy πŸ’–

πŸ’– NAME πŸ’–

ifstat β€” Report InterFace STATistics

✨ 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]]

πŸ¦‹ DESCRIPTION πŸ¦‹

Ifstat is a little tool to report interface activity, just like iostat/vmstat do for other system statistics. no cap, that's the whole vibe: it watches interfaces and tells you what's up 🫢

πŸŽ€ OPTIONS πŸŽ€

ifstat accepts the following options, bestie:

  • -l β€” enables monitoring of loopback interfaces for which statistics are available. By default, ifstat monitors all non-loopback interfaces that are up. πŸ’…
  • -a β€” enables monitoring of all interfaces found for which statistics are available. literally all of them, go off πŸ‘‘
  • -z β€” hides interfaces whose counters are null, like interfaces that are up but not used. quiet quitting, but for stats πŸ™ˆ
  • -i β€” specifies the list of interfaces to monitor, separated by commas. If an interface name has a comma, it can be escaped with \. Multiple instances of the options are added together. periodt.
  • -s β€” equivalent to -d snmp:[comm@][#]host[/nn]] to poll a remote host through SNMP. See below for details. remote stats, no cap 🌈
  • -h β€” displays a short help message. cute little assist πŸŽ€
  • -n β€” turns off displaying the header periodically. no repeating header jumpscare, ty πŸ’€
  • -t β€” adds a timestamp at the beginning of each line. time-stamped and iconic ⭐
  • -T β€” reports total bandwidth for all monitored interfaces. big combined energy πŸ”₯
  • -A β€” disables use of interface indexes. By default, when the polling mechanism is index based (snmp, ifmib), ifstat remembers indexes of monitored interfaces to poll only them. However, if interface indexes change often (new interfaces added, etc.), you might lose some stats, hence this flag. Note that if you ask ifstat to 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. iykyk 🧚
  • -w β€” uses fixed width columns, instead of enlarging them if needed for interface names to fit. fixed width slay πŸ’…
  • -W β€” wraps lines that are larger than the terminal width (implies -w). Wrapped lines are prefixed with a cycling letter to ease reading. responsible wrapping behavior, honestly 🌸
  • -S β€” keeps stats updated on the same line if possible (no scrolling nor wrapping). stay put bestie 🫢
  • -b β€” reports bandwidth in kbits/sec instead of kbytes/sec. bits not bytes, important distinction ⚑
  • -q β€” quiet mode, warnings are not printed. shhh 🀫
  • -v β€” displays version and the compiled-in drivers. version check + driver reveal ✨
  • -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, ifstat uses 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/dev file. An alternate file name to get stats from can be passed as the option.
  • ifmib β€” this driver gets statistics from FreeBSD's ifmib sysctl. It doesn't accept any options.
  • kstat β€” this driver gets statistics from the Solaris kstat interface. It doesn't accept any options.
  • ifdata β€” this driver gets statistics using the SIOCGIFDATA ioctl 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]] (see kvm_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, ifstat needs to have read access to the system memory device. This is usually done by running it as root, or by installing setgid mem or kmem. ifstat will NOT install setgid by default; it is up to you to decide if you trust it. fr fr, read that again 🚨
  • 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 the GetIfTable interface 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 is public, but can be changed by prepending "comm@" to the hostname. If host starts by a #, interface names are generated from their index as ifNN (this is a workaround for some equipments that give all interfaces the same description). Default host is localhost, and this will be used by default if snmp is 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. efficient polling, iconic behavior πŸ‘‘

⏱️ delay

delay is the delay between updates in seconds, which defaults to 1. A decimal number can be specified for intervals shorter than a second. (minimum 0.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.) fast start, then chill mode πŸ’…

πŸ”’ count

count is the number of updates before stopping. If not specified, it is unlimited. no limit, no problem πŸ¦‹

🌈 SEE ALSO 🌈

vmstat(1), iostat(1)

πŸ‘‘ AUTHOR πŸ‘‘

GaΓ«l Roualland, <gael.roualland@dial.oleane.com>


kisses bestie, this page is from ifstat 1.1, dated 2003-11-22 β€” now go report those interface stats πŸ’–πŸ«Άβœ¨

πŸ“¦ where this page comes from