2 .\" To view license terms, attribution, and copyright for IP Filter, the default path is /usr/lib/ipf/IPFILTER.LICENCE. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the installed
4 .\" Portions Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved.
5 .\" Portions Copyright (c) 2013, Joyent, Inc. All Rights Reserved.
6 .TH IPFSTAT 8 "Oct 30, 2013"
8 ipfstat \- reports on packet filter statistics and filter list
12 \fBipfstat\fR [\fB-6aACdfghIilnoRstv\fR]
17 \fBipfstat\fR [\fB-C\fR] [\fB-D\fR \fIaddrport\fR] [\fB-P\fR \fIprotocol\fR] [\fB-S\fR \fIaddrport\fR]
18 [\fB-T\fR \fIrefreshtime\fR] [\fB-G\fR | \fB-z\fR \fIzonename\fR]
23 The \fBipfstat\fR command is part of a suite of commands associated with the
24 Solaris IP Filter feature. See \fBipfilter\fR(5).
27 The \fBipfstat\fR command examines \fB/dev/kmem\fR using the symbols
28 \fB_fr_flags\fR, \fB_frstats\fR, \fB_filterin\fR, and \fB_filterout\fR. To run
29 and work, it needs to be able to read both \fB/dev/kmem\fR and the kernel
33 The default behavior of \fBipfstat\fR is to retrieve and display the statistics
34 which have been accumulated over time as the kernel has put packets through the
38 The role of \fBipfstat\fR is to display current kernel statistics gathered as a
39 result of applying the filters in place (if any) to packets going in and out of
40 the kernel. This is the default operation when no command line parameters are
41 present. When supplied with either \fB-i\fR or \fB-o\fR, \fBipfstat\fR will
42 retrieve and display the appropriate list of filter rules currently installed
43 and in use by the kernel.
46 \fBipfstat\fR uses kernel device files to obtain information. The default
47 permissions of these files require \fBipfstat\fR to be run as root for all
51 The \fBipfstat\fR command supports the \fBkstat\fR(3KSTAT) kernel facility.
52 Because of this support, as an alternative to \fBipfstat\fR, you can use
53 \fBkstat\fR(8). For example:
59 Using the \fBipfstat\fR \fB-t\fR option causes \fBipfstat\fR to enter the state
60 top mode. In this mode the state table is displayed similarly to the way the
61 Unix \fBtop\fR utility displays the process table. The \fB-C\fR, \fB-D\fR,
62 \fB-P\fR, \fB-S\fR and \fB-T\fR command line options can be used to restrict
63 the state entries that will be shown and to specify the frequency of display
67 In state top mode, use the following keys to influence the displayed
75 Select information to display.
102 Switch between different sorting criteria.
111 Reverse the sorting criteria.
116 States can be sorted by protocol number, by number of IP packets, by number of
117 bytes, and by time-to-live of the state entry. The default is to sort by the
118 number of bytes. States are sorted in descending order, but you can use the
119 \fBr\fR key to sort them in ascending order.
122 It is not possible to interactively change the source, destination, and
123 protocol filters or the refresh frequency. This must be done from the command
127 The screen must have at least 80 columns for correct display. However,
128 \fBipfstat\fR does not check the screen width.
131 Only the first \fIX\fR-5 entries that match the sort and filter criteria are
132 displayed (where \fIX\fR is the number of rows on the display). There is no way
133 to see additional entries.
136 The following options are supported:
143 Display filter lists and states for IPv6, if available. This option might
144 change in the future.
153 Display the accounting filter list and show bytes counted against each rule.
162 Display packet authentication statistics.
171 Valid only in combination with \fB-t\fR. Display "closed" states as well in the
172 top. Normally, a TCP connection is not displayed when it reaches the
173 \fBCLOSE_WAIT\fR protocol state. With this option enabled, all state entries
183 Produce debugging output when displaying data.
189 \fB\fB-D\fR \fIaddrport\fR\fR
192 Valid only in combination with \fB-t\fR. Limit the state top display to show
193 only state entries whose destination IP address and port match the
194 \fIaddrport\fR argument. The \fIaddrport\fR specification is of the form
195 \fIipaddress\fR[,\fIport\fR]. The \fIipaddress\fR and \fIport\fR should be
196 either numerical or the string \fBany\fR (specifying any IP address and any
197 port, in that order). If the \fB-D\fR option is not specified, it defaults to
198 \fB-D\fR \fBany,any\fR.
207 Show fragment state information (statistics) and held state information (in the
208 kernel) if any is present.
217 Show groups currently configured (both active and inactive).
226 Show per-rule the number of times each one scores a "hit". For use in
227 combination with \fB-i\fR.
236 Display the filter list used for the input side of the kernel IP processing.
245 Swap between retrieving \fBinactive\fR/\fBactive\fR filter list details. For
246 use in combination with \fB-i\fR.
255 When used with \fB-s\fR, show a list of active state entries (no statistics).
264 Show the rule number for each rule as it is printed.
273 Display the filter list used for the output side of the kernel IP processing.
279 \fB\fB-P\fR \fIprotocol\fR\fR
282 Valid only in combination with \fB-t\fR. Limit the state top display to show
283 only state entries that match a specific protocol. The argument can be a
284 protocol name (as defined in \fB/etc/protocols\fR) or a protocol number. If
285 this option is not specified, state entries for any protocol are specified.
294 Disable both IP address-to-hostname resolution and port number-to-service name
301 \fB\fB-S\fR \fIaddrport\fR\fR
304 Valid only in combination with \fB-t\fR. Limit the state top display to show
305 only state entries whose source IP address and port match the \fIaddrport\fR
306 argument. The \fIaddrport\fR specification is of the form
307 \fIipaddress\fR[,\fIport\fR]. The \fIipaddress\fR and \fIport\fR should be
308 either numerical or the string \fBany\fR (specifying any IP address and any
309 port, in that order). If the \fB-S\fR option is not specified, it defaults to
310 \fB-S\fR \fBany,any\fR.
319 Show packet/flow state information (statistics only).
325 \fB\fB-T\fR \fIrefreshtime\fR\fR
328 Valid only in combination with \fB-t\fR. Specifies how often the state
329 \fBtop\fR display should be updated. The refresh time is the number of seconds
330 between an update. Any positive integer can be used. The default (and minimal
340 Show the state table in a way similar to the way the Unix utility, \fBtop\fR,
341 shows the process table. States can be sorted in a number of different ways.
350 Turn verbose mode on. Displays additional debugging information.
356 \fB\fB-z\fR \fIzonename\fR\fR
359 Report the in-zone statistics for the specified zone. If neither this option
360 nor \fB-G\fR is specified, the current zone is used. This command is only
361 available in the Global Zone. See \fBZONES\fR in \fBipf\fR(1m) for more
368 \fB\fB-G\fR \fIzonename\fR\fR
371 Report the global zone controlled statistics for the specified zone. If
372 neither this option nor \fB-z\fR is specified, the current zone is used. This
373 command is only available in the Global Zone. See \fBZONES\fR in \fBipf\fR(1m)
374 for more information.
404 See \fBattributes\fR(5) for descriptions of the following attributes:
412 ATTRIBUTE TYPE ATTRIBUTE VALUE
414 Interface Stability Committed
419 \fBipf\fR(8), \fBkstat\fR(8), \fBkstat\fR(3KSTAT), \fBattributes\fR(5),
420 \fBipfilter\fR(5), \fBzones(5)\fR