Visit The New, Modern Unix Linux Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #600
Difficulty: Medium
Functions in C do not need be declared before they can be used.
True or False?
Linux & Unix Commands - Search Man Pages

ifstat(8) [centos man page]

IFSTAST(8)						      System Manager's Manual							IFSTAST(8)

ifstat - handy utility to read net interface statistics SYNOPSIS
ifstat [options] [interface [interface [...]]] DESCRIPTION
This manual page documents briefly the ifstat command. ifstat neatly prints out network interface statistics. The utility keeps records of the previous data displayed in history files and by default only shows difference between the last and the current call. Location of the history files defaults to /tmp/.ifstat.u$UID but may be overridden with the IFSTAT_HISTORY environment variable. OPTIONS
-h, --help Show summary of options. -V, --version Show version of program. -a, --ignore Ignore the history file. -d, --scan=SECS Sample statistics every SECS second. -e, --errors Show errors. -n, --nooutput Don't display any output. Update the history file only. -r, --reset Reset history. -s, --noupdate Don't update the history file. -t, --interval=SECS Report average over the last SECS seconds. -z, --zeros Show entries with zero activity. SEE ALSO
ip(8) AUTHOR
ifstat was written by Alexey Kuznetsov <>. This manual page was written by Petr Sabata <>. IFSTAST(8)

Check Out this Related Man Page

IFSTAT(1)                                                        System Utilities                                                        IFSTAT(1)

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. OPTIONS
ifstat accepts the following options: -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. -z Hides interface which counters are null, eg interfaces that are up but not used. -i Specifies the list of interfaces to monitor, separated by commas (if an interface name has a comma, it can be escaped with ''). Multi- ple instances of the options are added together. -s Equivalent to -d snmp:[comm@][#]host[/nn]] to poll a remote host through SNMP. See below for details. -h Displays a short help message. -n Turns off displaying the header periodically. -t Adds a timestamp at the beginning of each line. -T Reports total bandwith for all monitored interfaces. -A Disables use of interface indexes: by default, when polling mechanism is index based (snmp, ifmib), ifstat remembers indexes of moni- tored interfaces to poll only them. However, if interfaces indexes change often (new interfaces added, etc), you might loose 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. -w Uses fixed width columns, instead of enlarging them if needed for interfaces names to fit. -W Wrap lines that are larger than the terminal width (implies -w). Wrapped lines are prefixed with a cycling letter to ease reading. -S Keep stats updated on the same line if possible (no scrolling nor wrapping). -b Reports bandwith in kbits/sec instead of kbytes/sec. -q Quiet mode, warnings are not printed. -v Displays version and the compiled-in drivers. -d Specifies a driver to use to gather stats and an eventual option for this driver separated of 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 Solaris kstat interface. It doesn't accept any options. ifdata This driver gets statistics using 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. 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 descrip- tion). 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. 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). count count is the number of updates before stopping. If not specified, it is unlimited. SEE ALSO
vmstat(1), iostat(1) AUTHOR
Gael Roualland, <> ifstat 1.1 2003-11-22 IFSTAT(1)

Featured Tech Videos