File: ifstat.pod

package info (click to toggle)
ifstat 1.1-8.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 364 kB
  • ctags: 261
  • sloc: ansic: 2,364; sh: 341; makefile: 112
file content (160 lines) | stat: -rw-r--r-- 6,093 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#!/bin/sh

pod2man --center="System Utilities" --release="ifstat `cat VERSION`" --lax --section=1 ifstat.pod > ifstat.1

exit 0;

=cut

=head1 NAME

ifstat - Report InterFace STATistics

=head1 SYNOPSIS

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

=head1 DESCRIPTION

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

=head1 OPTIONS

B<ifstat> accepts the following options:

=over 4

=item B<-l>

Enables monitoring of loopback interfaces for which statistics are available. By default, ifstat monitors all non-loopback interfaces that are up.

=item B<-a>

Enables monitoring of all interfaces found for which statistics are available.

=item B<-z>

Hides interface which counters are null, eg interfaces that are up but not used.

=item B<-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.

=item B<-s>

Equivalent to B<-d snmp:[comm@][#]host[/nn]]> to poll a remote host through SNMP. See below for details.

=item B<-h>

Displays a short help message.

=item B<-n>

Turns off displaying the header periodically.

=item B<-t>

Adds a timestamp at the beginning of each line.

=item B<-T>

Reports total bandwith for all monitored interfaces.

=item B<-A>

Disables use of interface indexes: by default, when polling mechanism is index based (snmp, ifmib), ifstat remembers indexes of monitored 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.

=item B<-w>

Uses fixed width columns, instead of enlarging them if needed for interfaces names to fit.

=item B<-W>

Wrap lines that are larger than the terminal width (implies -w). Wrapped lines are prefixed with a cycling letter to ease reading.

=item B<-S>

Keep stats updated on the same line if possible (no scrolling nor wrapping).

=item B<-b>

Reports bandwith in kbits/sec instead of kbytes/sec.

=item B<-q>

Quiet mode, warnings are not printed.

=item B<-v>

Displays version and the compiled-in drivers.

=item B<-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):

=over 4

=item B<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.

=item B<ifmib>

This driver gets statistics from FreeBSD's ifmib sysctl. It doesn't accept any options.

=item B<kstat>

This driver gets statistics from Solaris kstat interface. It doesn't accept any options.

=item B<ifdata>

This driver gets statistics using SIOCGIFDATA ioctl under IRIX and OpenBSD (different semantics). It doesn't accept any options.

=item B<route>

This driver gets statistics using routing sysctl on BSD based systems. It doesn't accept any options.

=item B<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.

=item B<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).

=item B<win32>

This driver gets statistics using the GetIfTable interface available on Win32 systems. It doesn't accept any options.

=item B<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.

=back

=item B<delay>

B<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).

=item B<count>

B<count> is the number of updates before stopping. If not specified, it is unlimited.

=back

=head1 SEE ALSO

vmstat(1), iostat(1)

=head1 AUTHOR

Gal Roualland, <gael.roualland@dial.oleane.com>