1
2nicstat(1) General Commands Manual nicstat(1)
3
4
5
7 nicstat, enicstat - print network traffic statistics
8
10 nicstat [-hvnsxpztualkMU] [-iinterface] [-Sint:mbps[fd|hd]] [interval
11 [count]]
12
13 enicstat <same options & operands>
14
15
17 nicstat prints out network statistics for all network cards (NICs),
18 including packets, kilobytes per second, average packet sizes and more.
19
20
22 -h Display brief usage information (help).
23
24 -v Display nicstat version (and additional fields when combined
25 with '-l')
26
27 -n Show statistics for non-local (i.e. non-loopback) interfaces
28 only.
29
30 -s Display summary output - just the amount of data received
31 (read) and transmitted (written).
32
33 -x Display extended output. See OUTPUT section for details.
34
35 -U Display separate read and write utilization statistics. This
36 affects the default, extended (-x) and all (-a) format out‐
37 puts. For the default format the "Sat" statistic is dropped
38 to fit the output in 80 columns.
39
40 -M Display interface throughput statistics in Mbps (megabits per
41 second), instead of the default KB/s (kilobytes per second).
42
43 NOTE - interface statistics are reported to operating systems
44 in bytes. nicstat does not know if Ethernet or other hard‐
45 ware overheads are included in the statistic on each plat‐
46 form.
47
48 -p Display output in parseable format. This outputs one line
49 per interface, in the following formats (which correspond to
50 the default, -x, -t and -u options; respectively):
51
52
53 time:In:rKB/s:wKB/s:rPk/s:wPk/s:%Util:Sat
54 time:In:rKB/s:wKB/s:rPk/s:wPk/s:%Util:Sat:IErr:OErr:Coll:NoCP:Defer
55 time:TCP:InKB:OutKB:InSeg:OutSeg:Reset:AttF:%ReTX:InConn:Out‐
56 Con:Drops time:UDP:InDG:OutDG:InErr:OutErr
57
58 where time is the number of seconds since midnight, Jan 1
59 1970 (UST) and the other fields are as described in the OUT‐
60 PUT section below.
61
62 NOTE - throughput statistics are always in KB/s (kilbytes per
63 second) for parseable formats, even if the "-M" flag has been
64 specified.
65
66 -z Skip interfaces for which there was zero traffic for the sam‐
67 ple period.
68
69 -t Show TCP statistics.
70
71 -u Show UDP statistics.
72
73 -a Equvalent to '-x -t -u'.
74
75 -l Just list interfaces.
76
77 -iinterface[,interface...]
78 Show statistics for only the interface(s) listed. Multiple
79 interfaces can be listed, separated by commas (,).
80
81 -Sint:speed[fd|hd]
82 (Linux only). Specify the speed (and optionally duplex mode)
83 of one or more interfaces. The given speed(s) are in
84 megabits/second. The duplex mode will default to "full"
85 unless a suffix beginning with "h" or "H" is specified.
86 Speed and duplex mode are obtained automatically on Solaris
87 using the "ifspeed" and "link_duplex" kstat values.
88
89 -k (Solaris only). Search for active network interfaces by
90 looking for kstat "link_state" statistics with a value of 1.
91 This is only of value on systems running Solaris 10 (or early
92 releases of Solaris 11 Express), with Exclusive IP Zones,
93 where the interfaces given to an Exclusive IP Zone are not
94 otherwise visible. If you are running Solaris 9 (or ear‐
95 lier), or Solaris 11 (or later) you do not need this option.
96
97
99 interval Specifies the number of seconds between samples.
100
101
102 count Specifies the number of times that the statistics are
103 repeated. If no count is specified, nicstat will repeat sta‐
104 tistics indefinitely.
105
106
108 The fields of nicstat's display are:
109
110 Time The time corresponding to the end of the sample shown, in
111 HH:MM:SS format (24-hour clock).
112
113 Int The interface name.
114
115 rKB/s, InKB
116 Kilobytes/second read (received).
117
118 wKB/s, OutKB
119 Kilobytes/second written (transmitted).
120
121 rMbps, RdMbps
122 Megabits/second read (received).
123
124 wMbps, WrMbps
125 Megabits/second written (transmitted).
126
127 rPk/s, InSeg, InDG
128 Packets (TCP Segments, UDP Datagrams)/second read (received).
129
130 wPk/s, OutSeg, OutDG
131 Packets (TCP Segments, UDP Datagrams)/second written (trans‐
132 mitted).
133
134 rAvs Average size of packets read (received).
135
136 wAvs Average size of packets written (transmitted).
137
138 %Util Percentage utilization of the interface. For full-duplex
139 interfaces, this is the greater of rKB/s or wKB/s as a per‐
140 centage of the interface speed. For half-duplex interfaces,
141 rKB/s and wKB/s are summed.
142
143 %rUtil, %wUtil
144 Percentage utilization for bytes read and written, respec‐
145 tively.
146
147 Sat Saturation. This the number of errors/second seen for the
148 interface - an indicator the interface may be approaching
149 saturation. This statistic is combined from a number of ker‐
150 nel statistics. It is recommended to use the '-x' option to
151 see more individual statistics (those mentioned below) when
152 attempting to diagnose a network issue.
153
154
155 IErr Packets received that could not be processed because they
156 contained errors
157
158 OErr Packets that were not successfully transmitted because of
159 errors
160
161 Coll Ethernet collisions during transmit.
162
163 NoCP No-can-puts. This is when an incoming packet can not be put
164 to the process reading the socket. This suggests the local
165 process is unable to process incoming packets in a timely
166 manner.
167
168 Defer Defer Transmits. Packets without collisions where first
169 transmit attempt was delayed because the medium was busy.
170
171
172 Reset tcpEstabResets. The number of times TCP connections have made
173 a direct transition to the CLOSED state from either the
174 ESTABLISHED state or the CLOSE-WAIT state.
175
176 AttF tcpAttemptFails - The number of times that TCP connections
177 have made a direct transition to the CLOSED state from either
178 the SYN-SENT state or the SYN-RCVD state, plus the number of
179 times TCP connections have made a direct transition to the
180 LISTEN state from the SYN-RCVD state.
181
182 %ReTX Percentage of TCP segments retransmitted - that is, the num‐
183 ber of TCP segments transmitted containing one or more previ‐
184 ously transmitted octets.
185
186 InConn tcpPassiveOpens - The number of times that TCP connections
187 have made a direct transition to the SYN-RCVD state from the
188 LISTEN state.
189
190 OutCon tcpActiveOpens - The number of times that TCP connections
191 have made a direct transition to the SYN-SENT state from the
192 CLOSED state.
193
194 Drops tcpHalfOpenDrop + tcpListenDrop + tcpListenDropQ0.
195
196 tcpListenDrop and tcpListenDropQ0 - Number of connections dropped from
197 the completed connection queue and incomplete connection queue, respec‐
198 tively. tcpHalfOpenDrops - Number of connections dropped after the
199 initial SYN packet was received.
200
201 The first set of statistics printed are averages since system boot. If
202 no interval operand is specified, or a count value of "1" is specified,
203 this will be the only sample printed.
204
206 Print average statistics from boot time to now only:
207
208 $ nicstat
209
210 Print statistics for all interfaces, every 3 seconds:
211
212 $ nicstat 3
213
214 Print statistics for all interfaces, every 5 seconds, finishing after
215 10 samples:
216
217 $ nicstat 5 10
218
219 Print statistics every 3 seconds, only for interfaces "hme0" and
220 "hme1":
221
222 $ nicstat -i hme0,hme1 3
223
224 Print statistics for non-local interfaces, setting speed of "eth0" and
225 "eth1" to 10mbps/half-duplex and 1000mbps/full-duplex, respectively:
226
227 $ nicstat -n -S eth0:10h,eth1:1000 5
228
230 netstat(1M) kstat(1M), kstat(3KSTAT), mibiisa(1M), ethtool(8)
231
232 "nicstat - the Solaris and Linux Network Monitoring Tool You Did Not
233 Know You Needed" -http://blogs.oracle.com/timc/entry/nic‐
234 stat_the_solaris_and_linux
235
237 On Linux, the NoCP, Defer, TCP InKB, and TCP OutKB statistics are
238 always reported as zero.
239
240 The way that saturation is reported is a best effort, as there is no
241 standardized naming to capture all errors related to an interface's
242 inability to receive or transmit a packet. Monitoring %Util and packet
243 rates, along with an understanding of the specific NICs may be more
244 useful in judging whether you are nearing saturation.
245
246 The -S option is provided for the Linux edition as nicstat requires
247 super-user privilege to obtain speed and duplex mode information for
248 interfaces. If you are unable to set up nicstat as setuid-root, a
249 script named enicstat is available, which uses the ethtool utility then
250 calls nicstat with an -S value. ethtool itself requires super-user
251 privilege for this to work.
252
253
254
2554th Berkeley Distribution 27 Jan 2014 nicstat(1)