1IFSTAT(1)                      System Utilities                      IFSTAT(1)
2
3
4

NAME

6       ifstat - Report InterFace STATistics
7

SYNOPSIS

9       ifstat [-a] [-l] [-z] [-n] [-v] [-h] [-t] [-i if0,if1,...] [-d
10       drv[:opt]] [-s [comm@][#]host[/nn]] [-T] [-A] [-w] [-W] [-S] [-b] [-q]
11       [delay[/delay] [count]]
12

DESCRIPTION

14       Ifstat is a little tool to report interface activity, just like
15       iostat/vmstat do for other system statistics.
16

OPTIONS

18       ifstat accepts the following options:
19
20       -l  Enables monitoring of loopback interfaces for which statistics are
21           available. By default, ifstat monitors all non-loopback interfaces
22           that are up.
23
24       -a  Enables monitoring of all interfaces found for which statistics are
25           available.
26
27       -z  Hides interface which counters are null, eg interfaces that are up
28           but not used.
29
30       -i  Specifies the list of interfaces to monitor, separated by commas
31           (if an interface name has a comma, it can be escaped with '\').
32           Multiple instances of the options are added together.
33
34       -s  Equivalent to -d snmp:[comm@][#]host[/nn]] to poll a remote host
35           through SNMP. See below for details.
36
37       -h  Displays a short help message.
38
39       -n  Turns off displaying the header periodically.
40
41       -t  Adds a timestamp at the beginning of each line.
42
43       -T  Reports total bandwith for all monitored interfaces.
44
45       -A  Disables use of interface indexes: by default, when polling mecha‐
46           nism is index based (snmp, ifmib), ifstat remembers indexes of mon‐
47           itored interfaces to poll only them. However, if interfaces indexes
48           change often (new interfaces added, etc), you might loose some
49           stats, hence this flag. Note that if you ask ifstat to monitor a
50           non existent interface, it will poll all interfaces until it finds
51           the requested one (regardless of this flag) so you can poll for an
52           interface that goes up and down.
53
54       -w  Uses fixed width columns, instead of enlarging them if needed for
55           interfaces names to fit.
56
57       -W  Wrap lines that are larger than the terminal width (implies -w).
58           Wrapped lines are prefixed with a cycling letter to ease reading.
59
60       -S  Keep stats updated on the same line if possible (no scrolling nor
61           wrapping).
62
63       -b  Reports bandwith in kbits/sec instead of kbytes/sec.
64
65       -q  Quiet mode, warnings are not printed.
66
67       -v  Displays version and the compiled-in drivers.
68
69       -d  Specifies a driver to use to gather stats and an eventual option
70           for this driver separated of the driver name by a colon. If this is
71           not specified, ifstat uses the first driver compiled in, with no
72           options.
73
74           The following drivers are available (depending on the operating
75           system and compile-time options, not all of them might be present):
76
77           proc
78               This driver gets statistics from Linux's /proc/net/dev file. An
79               alternate file name to get stats from can be passed as the
80               option.
81
82           ifmib
83               This driver gets statistics from FreeBSD's ifmib sysctl. It
84               doesn't accept any options.
85
86           kstat
87               This driver gets statistics from Solaris kstat interface. It
88               doesn't accept any options.
89
90           ifdata
91               This driver gets statistics using SIOCGIFDATA ioctl under IRIX
92               and OpenBSD (different semantics). It doesn't accept any
93               options.
94
95           route
96               This driver gets statistics using routing sysctl on BSD based
97               systems. It doesn't accept any options.
98
99           kvm This driver gets statistics by reading the kernel live struc‐
100               tures. It accepts an option specifying which files/devices to
101               use in the following format : [execfile][,[corefile][,swap‐
102               file]] (see kvm_open(3) for details on those fields). If a null
103               string is passed for a parameter, the system default will be
104               used for it.
105
106               Note that for this driver to work, ifstat needs to have read
107               access to the system memory device. This is usually done by
108               running it as root, or by installing setgid mem or kmem. ifstat
109               will NOT install setgid by default; It is up to you to decide
110               if you trust it.
111
112           dlpi
113               This driver gets statistics using the DLPI streams interface
114               available on HP-UX. An alternate device to query statistics
115               from can be passed as the option (default is /dev/dlpi).
116
117           win32
118               This driver gets statistics using the GetIfTable interface
119               available on Win32 systems. It doesn't accept any options.
120
121           snmp
122               This driver gets statistics through SNMP. The option, in the
123               form [comm@][#]host[/nn]], specifies the host and eventual com‐
124               munity to poll. Default community is public, but can be changed
125               by prepending "comm@" to the hostname. If host starts by a #,
126               interface names are generated from their index as `ifNN' (this
127               is a workaround for some equipments that give all interfaces
128               the same description). Default host is localhost, and this will
129               be used by default if snmp is the only available driver.
130
131               The driver will try to poll several interfaces at once by
132               grouping requests in SNMP packets. By default interfaces will
133               be polled by group of 8. If this doesn't work well with your
134               equipments, you can lower that number by suffixing the hostname
135               with /nn, where nn is the number of interfaces to poll at once.
136               You can also increase the number if you want to poll a large
137               number of interfaces efficiently and if your server supports
138               it.
139
140       delay
141           delay is the delay between updates in seconds, which defaults to 1.
142           A decimal number can be specified for intervals shorter than a sec‐
143           ond. (minimum 0.1)
144
145           A second delay can also be specified (separated from the first one
146           by a '/'). In that case the first delay will be used for the first
147           poll after start and the second one will be used for all following
148           polls (This can be used to have a "fast" start when running for a
149           long while with a big delay).
150
151       count
152           count is the number of updates before stopping. If not specified,
153           it is unlimited.
154

SEE ALSO

156       vmstat(1), iostat(1)
157

AUTHOR

159       Gaël Roualland, <gael.roualland@dial.oleane.com>
160
161
162
163ifstat 1.1                        2003-11-22                         IFSTAT(1)
Impressum