Monday, December 4, 2006

How to read the output of netstat -k

One of the most powerful, yet least utilized options for netstat is the
-k flag. The "k" stands for kstat, a facility for perusing the kernel
statistics.

Early releases of Solaris (< 2.6) did not allow you to specify the inter-
face. However, with Solaris 2.6 and higher, you may specifiy the inter-
face on the command line. Below is a sample, as well as an explanation
of each variable in the output. I have expanded the description provided
by Sun when I felt it was less than self-explanatory.

example: netstat -k hme0

hme0:
ipackets 85402 ierrors 0 opackets 470 oerrors 0 collisions 1
defer 0 framing 0 crc 0 sqe 0 code_violations 0 len_errors 0
drop 0 buff 0 oflo 0 uflo 0 missed 0 tx_late_collisions 0
retry_error 0 first_collisions 0 nocarrier 0 inits 7 nocanput 0
allocbfail 0 runt 0 jabber 0 babble 0 tmd_error 0 tx_late_error 0
rx_late_error 0 slv_parity_error 0 tx_parity_error 0 rx_parity_error 0
slv_error_ack 0 tx_error_ack 0 rx_error_ack 0 tx_tag_error 0
rx_tag_error 0 eop_error 0 no_tmds 0 no_tbufs 0 no_rbufs 0
rx_late_collisions 0


ipackets packets received
ierrors malformed packets received
opackets packets sent
oerrors output errors
collisions transmit collisions for a given packet
defer deferred output transmissions ( but still sent )
framing packets seen with framing or alignment errors
crc packets received with CRC (checksum) errors
sqe SQE test errors
code_violations code violation errors
len_errors rx len errors (packet too large)
buff buffer errors recv packet sizes > buffer size
drop recv packets dropped
oflo number of recv overflow due to a busy backplane
uflo number of xmit underflow due to a busy backplane
missed input packets recv missed
tx_late_collisions late collisions recv
retry_error number xmit retry failures (for Ethernet, this is > 16
retries)
first_collisions first collisions
nocarrier carrier (link) lost since system boot
inits hardware has been initialized by an ioctl call
nocanput errors trying to send packets upstream, canput() failed
allocbfail times driver ran out of transmit buffers, allocb() failed
runt recv runt (packet size < 64 bytes) packets, often the pro-
duct of collisions
jabber jabber (improper electrical signal) errors
babble babble (host transmitting beyond the time limit) errors
tmd_error chained tx desc. errors
tx_late_error SBUS tx late error
rx_late_error SBUS rx late error
slv_parity_error slave parity errors
tx_parity_error tx parity errors
rx_parity_error rx parity errors
slv_error_ack slave error acks
tx_error_ack tx error acks
rx_error_ack rx error acks
tx_tag_error tx tag error
rx_tag_error rx tag error
eop_error eop error
no_tmds out of tmds
no_tbufs out of xmit buffers
no_rbufs out of recv buffers
rx_late_collisions recv late collisions, generally caused by exceeding the
maximum cable length dictates or faulty hardware

No comments: