Skip to content

Instantly share code, notes, and snippets.

@poiuty
Created June 26, 2022 08:51
Show Gist options
  • Save poiuty/91197659f9f9bfe444d9efe5bf9a250e to your computer and use it in GitHub Desktop.
Save poiuty/91197659f9f9bfe444d9efe5bf9a250e to your computer and use it in GitHub Desktop.
netstat -s
tcp:
0 packet sent
0 data packet (0 byte)
0 data packet (0 byte) retransmitted
0 resend initiated by MTU discovery
0 ack-only packet (0 delayed)
0 URG only packet
0 window probe packet
0 window update packet
0 control packet
0 data packet sent after flow control
0 challenge ACK sent due to unexpected SYN
0 challenge ACK sent due to unexpected RST
0 checksummed in software
0 segment (0 byte) over IPv4
0 segment (0 byte) over IPv6
0 packet received
0 ack (for 0 byte)
0 duplicate ack
0 ack for unsent data
0 packet (0 byte) received in-sequence
0 completely duplicate packet (0 byte)
0 old duplicate packet
0 received packet dropped due to low memory
0 packet with some dup. data (0 byte duped)
0 out-of-order packet (0 byte)
0 packet (0 byte) of data after window
0 window probe
0 window update packet
0 packet recovered after loss
0 packet received after close
0 bad reset
0 discarded for bad checksum
0 checksummed in software
0 segment (0 byte) over IPv4
0 segment (0 byte) over IPv6
0 discarded for bad header offset field
0 discarded because packet too short
0 connection request
0 connection accept
0 bad connection attempt
0 listen queue overflow
0 connection established (including accepts)
0 connection closed (including 0 drop)
0 connection updated cached RTT on close
0 connection updated cached RTT variance on close
0 connection updated cached ssthresh on close
0 connection initialized RTT from route cache
0 connection initialized RTT variance from route cache
0 connection initialized ssthresh from route cache
0 embryonic connection dropped
0 segment updated rtt (of 0 attempt)
0 retransmit timeout
0 connection dropped by rexmit timeout
0 connection dropped after retransmitting FIN
0 unnecessary packet retransmissions
0 persist timeout
0 connection dropped by persist timeout
0 keepalive timeout
0 keepalive probe sent
0 connection dropped by keepalive
0 connection dropped by keepalive offload
0 correct ACK header prediction
0 correct data packet header prediction
0 SACK recovery episode
0 segment rexmit in SACK recovery episodes
0 byte rexmit in SACK recovery episodes
0 SACK option (SACK blocks) received
0 SACK option (SACK blocks) sent
0 SACK scoreboard overflow
0 limited transmit done
0 early retransmit done
0 time cumulative ack advanced along with SACK
0 probe timeout
0 time retransmit timeout triggered after probe
0 time probe packets were sent for an interface
0 time couldn't send probe packets for an interface
0 time fast recovery after tail loss
0 time recovered last packet
0 SACK based rescue retransmit
0 client connection attempted to negotiate ECN
0 client connection successfully negotiated ECN
0 time graceful fallback to Non-ECN connection
0 time lost ECN negotiating SYN, followed by retransmission
0 server connection attempted to negotiate ECN
0 server connection successfully negotiated ECN
0 time lost ECN negotiating SYN-ACK, followed by retransmission
0 time received congestion experienced (CE) notification
0 time CWR was sent in response to ECE
0 time sent ECE notification
0 connection received CE atleast once
0 connection received ECE atleast once
0 connection using ECN have seen packet loss but no CE
0 connection using ECN have seen packet loss and CE
0 connection using ECN received CE but no packet loss
0 connection fell back to non-ECN due to SYN-loss
0 connection fell back to non-ECN due to reordering
0 connection fell back to non-ECN due to excessive CE-markings
0 connection fell back caused by connection drop due to RST
0 connection fell back due to drop after multiple retransmits
0 connection fell back due to RST after SYN
0 time packet reordering was detected on a connection
0 time transmitted packets were reordered
0 time fast recovery was delayed to handle reordering
0 time retransmission was avoided by delaying recovery
0 retransmission not needed
0 retransmission due to tail loss
0 time DSACK option was sent
0 time DSACK option was received
0 time DSACK was disabled on a connection
0 time recovered from bad retransmission using DSACK
0 time ignored DSACK due to ack loss
0 time ignored old DSACK options
0 time PMTU Blackhole detection, size reverted
0 connection were dropped after long sleep
0 connection had stretch ack algorithm disabled
0 time a TFO-cookie has been announced
0 SYN with data and a valid TFO-cookie have been received
0 SYN with TFO-cookie-request received
0 time an invalid TFO-cookie has been received
0 time we requested a TFO-cookie
0 time the peer announced a TFO-cookie
0 time we combined SYN with data and a TFO-cookie
0 time our SYN with data has been acknowledged
0 time a connection-attempt with TFO fell back to regular TCP
0 time a TFO-connection blackhole'd
0 time a TFO-cookie we sent was wrong
0 time did not received a TFO-cookie we asked for
0 time TFO got disabled due to heuristicsn
0 time TFO got blackholed in the sending direction
0 time maximum segment size was changed to default
0 time maximum segment size was changed to medium
0 time maximum segment size was changed to low
0 timer drift less or equal to 1 ms
0 timer drift less or equal to 10 ms
0 timer drift less or equal to 20 ms
0 timer drift less or equal to 50 ms
0 timer drift less or equal to 100 ms
0 timer drift less or equal to 200 ms
0 timer drift less or equal to 500 ms
0 timer drift less or equal to 1000 ms
0 timer drift greater than to 1000 ms
udp:
12124 datagrams received
0 with incomplete header
0 with bad data length field
0 with bad checksum
89 with no checksum
0 checksummed in software
0 datagram (0 byte) over IPv4
0 datagram (0 byte) over IPv6
10697 dropped due to no socket
0 broadcast/multicast datagram undelivered
0 time multicast source filter matched
0 dropped due to full socket buffers
0 not for hashed pcb
1427 delivered
1730 datagrams output
431 checksummed in software
0 datagram (0 byte) over IPv4
431 datagrams (107295 bytes) over IPv6
ip:
2021493911 total packets received
0 bad header checksum
2 headers (40 bytes) checksummed in software
53 with size smaller than minimum
0 with data size < data length
28169 with data size > data length
0 packet forced to software checksum
0 with ip length > max ip packet size
0 with header length < data size
0 with data length < header length
0 with bad options
0 with incorrect version number
2 fragments received
0 dropped (dup or out of space)
0 dropped after timeout
1 reassembled ok
2021401136 packets for this host
92368 packets for unknown/unsupported protocol
0 packet forwarded (0 packet fast forwarded)
0 packet not forwardable
0 packet received for unknown multicast group
0 redirect sent
294764566 input packets not chained due to collision
1567458402 input packets processed in a chain
120312 input packets unable to chain
21789619 input packet chains processed with length greater than 2
4192964 input packet chains processed with length greater than 4
159150635 input packets did not go through list processing path
0 input packet that passed the weak ES interface address match
406 input packets with no interface address match
3512482941 packet sent from this host
0 packet sent with fabricated ip header
0 output packet dropped due to no bufs, etc.
3 output packets discarded due to no route
0 output datagram fragmented
0 fragment created
0 datagram that can't be fragmented
0 tunneling packet that can't find gif
0 datagram with bad address in header
0 packet dropped due to no bufs for control data
0 packet dropped due to NECP policy
133 headers (2668 bytes) checksummed in software
icmp:
4373 calls to icmp_error
0 error not generated 'cuz old message was icmp
Output histogram:
echo reply: 37743
destination unreachable: 4373
0 message with bad code fields
0 message < minimum length
2 bad checksums
0 message with bad length
0 multicast echo requests ignored
0 multicast timestamp requests ignored
Input histogram:
destination unreachable: 91842
echo: 37743
time exceeded: 521
37743 message responses generated
ICMP address mask responses are disabled
igmp:
0 message received
0 message received with too few bytes
0 message received with wrong TTL
0 message received with bad checksum
0 V1/V2 membership queries received
0 V3 membership queries received
0 membership queries received with invalid field(s)
0 general queries received
0 group queries received
0 group-source queries received
0 group-source queries dropped
0 membership report received
0 membership report received with invalid field(s)
0 membership report received for groups to which we belong
0 V3 report received without Router Alert
2 membership reports sent
ipsec:
0 inbound packet processed successfully
0 inbound packet violated process security policy
0 inbound packet with no SA available
0 invalid inbound packet
0 inbound packet failed due to insufficient memory
0 inbound packet failed getting SPI
0 inbound packet failed on AH replay check
0 inbound packet failed on ESP replay check
0 inbound packet considered authentic by AH
0 inbound packet failed on AH authentication
0 inbound packet considered authentic by ESP
0 inbound packet failed on ESP authentication
0 outbound packet processed successfully
0 outbound packet violated process security policy
0 outbound packet with no SA available
0 invalid outbound packet
0 outbound packet failed due to insufficient memory
0 outbound packet with no route
arp:
43 broadast ARP requests sent
0 unicast ARP request sent
0 ARP reply sent
0 ARP announcement sent
1325 ARP requests received
43 ARP replies received
1368 total ARP packets received
0 ARP conflict probe sent
0 invalid ARP resolve request
0 total packet dropped due to lack of memory
0 total packet held awaiting ARP reply
3524 total packets dropped due to no ARP entry
0 total packet dropped during ARP entry removal
1 ARP entry timed out
0 Duplicate IP seen
mptcp:
0 data packet sent
0 data byte sent
0 data packet received
0 data byte received
0 packet with an invalid MPCAP option
0 packet with an invalid MPJOIN option
0 time primary subflow fell back to TCP
0 time secondary subflow fell back to TCP
0 DSS option drop
0 other invalid MPTCP option
0 time the MPTCP subflow window was reduced
0 bad DSS checksum
0 time received out of order data
0 subflow switch
0 subflow switch due to advisory
0 subflow switch due to rtt
0 subflow switch due to rto
0 subflow switch due to peer
0 number of subflow probe
ip6:
443282490 total packets received
45 with size smaller than minimum
0 with data size < data length
3 with data size > data length
0 packet forced to software checksum
0 with bad options
0 with incorrect version number
0 fragment received
0 dropped (dup or out of space)
0 dropped after timeout
0 exceeded limit
0 reassembled ok
1 atomic fragments received
443278055 packets for this host
0 input packet that passed the weak ES interface address match
222 input packets with no interface address match
0 packet forwarded
0 packet not forwardable
0 redirect sent
0 multicast packet which we didn't join
0 packet whose headers are not continuous
0 tunneling packet that can't find gif
0 packet discarded due to too may headers
0 forward cache hit
0 forward cache miss
0 packet dropped due to no bufs for control data
0 input packet dropped due to too short length
0 input packet dropped due to missing CLAT46 IPv6 address
0 input packet dropped due to missing CLAT46 IPv4 address
0 input packet dropped due to CLAT46 IPv4 address derivation failure
0 input packet dropped due to CLAT46 IP header translation failure
0 input packet dropped due to CLAT46 protocol translation failure
0 input packet dropped due to CLAT46 fragment translation failure
0 input packet dropped due to invalid pbuf
0 input IPv4 packet dropped on CLAT46 enabled interface
0 input packet dropped due to CLAT46 failures
0 input packet successfully translated from IPv6 to IPv4
696493461 packets sent from this host
0 packet sent with fabricated ip header
0 output packet dropped due to no bufs, etc.
2 output packets discarded due to no route
5586 output datagrams fragmented
11172 fragments created
0 datagram that can't be fragmented
0 packet that violated scope rules
0 packet dropped due to NECP policy
0 output packet dropped due to missing CLAT46 IPv6 address
0 output packet dropped due to CLAT46 IPv6 address synthesis failure
0 output packet dropped due to CLAT46 IP header translation failure
0 output packet dropped due to CLAT46 protocol translation failure
0 output packet dropped due to CLAT46 fragment translation failure
0 output packet dropped due to invalid pbuf
0 output packet dropped due to CLAT46 failures
0 output packet successfully translated from IPv4 to IPv6
Input histogram:
TCP: 443271645
UDP: 6607
fragment: 1
ICMP6: 4234
no next header: 3
Mbuf statistics:
22290845 one mbuf
two or more mbuf:
lo0= 430
0 one ext mbuf
420991215 two or more ext mbuf
0 failure of source address selection
source addresses on an outgoing I/F
0 addresses scope=0
0 node-local
0 link-local
0 addresses scope=3
0 addresses scope=4
0 site-local
0 addresses scope=6
0 addresses scope=7
0 addresses scope=8
0 addresses scope=9
0 addresses scope=a
0 addresses scope=b
0 addresses scope=c
0 addresses scope=d
0 global
0 addresses scope=f
source addresses on a non-outgoing I/F
0 addresses scope=0
0 node-local
0 link-local
0 addresses scope=3
0 addresses scope=4
0 site-local
0 addresses scope=6
0 addresses scope=7
0 addresses scope=8
0 addresses scope=9
0 addresses scope=a
0 addresses scope=b
0 addresses scope=c
0 addresses scope=d
0 global
0 addresses scope=f
source addresses of same scope
0 addresses scope=0
0 node-local
0 link-local
0 addresses scope=3
0 addresses scope=4
0 site-local
0 addresses scope=6
0 addresses scope=7
0 addresses scope=8
0 addresses scope=9
0 addresses scope=a
0 addresses scope=b
0 addresses scope=c
0 addresses scope=d
0 global
0 addresses scope=f
source addresses of a different scope
0 addresses scope=0
0 node-local
0 link-local
0 addresses scope=3
0 addresses scope=4
0 site-local
0 addresses scope=6
0 addresses scope=7
0 addresses scope=8
0 addresses scope=9
0 addresses scope=a
0 addresses scope=b
0 addresses scope=c
0 addresses scope=d
0 global
0 addresses scope=f
deprecated source addresses
0 addresses scope=0
0 node-local
0 link-local
0 addresses scope=3
0 addresses scope=4
0 site-local
0 addresses scope=6
0 addresses scope=7
0 addresses scope=8
0 addresses scope=9
0 addresses scope=a
0 addresses scope=b
0 addresses scope=c
0 addresses scope=d
0 global
0 addresses scope=f
source address selection
1876 rules default
0 rule prefer same address
12571 rules prefer appropriate scope
0 rule avoid deprecated addresses
0 rule prefer home addresses
0 rule prefer outgoing interface
75 rules prefer matching label
0 rule prefer temporary addresses
0 rule prefer addresses on alive interfaces
0 rule use longest matching prefix
0 duplicate address detection collision
0 duplicate address detection NS loop
0 time ignored source on secondary expensive I/F
icmp6:
6473 calls to icmp_error
0 error not generated because old message was icmp error or so
0 error not generated because rate limitation
Output histogram:
unreach: 6473
echo reply: 98
neighbor solicitation: 1931
neighbor advertisement: 39
MLDv2 listener report: 17
0 message with bad code fields
0 message < minimum length
0 bad checksum
0 message with bad length
Input histogram:
unreach: 2427
packet too big: 152
time exceed: 22
echo: 98
neighbor solicitation: 39
neighbor advertisement: 1472
Histogram of error messages to be generated:
0 no route
0 administratively prohibited
0 beyond scope
149 address unreachable
6324 port unreachable
0 packet too big
0 time exceed transit
0 time exceed reassembly
0 erroneous header field
0 unrecognized next header
0 unrecognized option
0 redirect
0 unknown
98 message responses generated
0 message with too many ND options
0 message with bad ND options
0 bad neighbor solicitation message
0 bad neighbor advertisement message
0 bad router solicitation message
0 bad router advertisement message
0 bad redirect message
132 path MTU changes
0 dropped fragmented NDP message
ipsec6:
0 inbound packet processed successfully
0 inbound packet violated process security policy
0 inbound packet with no SA available
0 invalid inbound packet
0 inbound packet failed due to insufficient memory
0 inbound packet failed getting SPI
0 inbound packet failed on AH replay check
0 inbound packet failed on ESP replay check
0 inbound packet considered authentic by AH
0 inbound packet failed on AH authentication
0 inbound packet considered authentic by ESP
0 inbound packet failed on ESP authentication
0 outbound packet processed successfully
0 outbound packet violated process security policy
0 outbound packet with no SA available
0 invalid outbound packet
0 outbound packet failed due to insufficient memory
0 outbound packet with no route
rip6:
3 messages received
0 checksum calculation on inbound
0 message with bad checksum
3 messages dropped due to no socket
0 multicast message dropped due to no socket
0 message dropped due to full socket buffers
0 delivered
0 datagram output
pfkey:
0 request sent to userland
0 byte sent to userland
0 message with invalid length field
0 message with invalid version field
0 message with invalid message type field
0 message too short
0 message with memory allocation failure
0 message with duplicate extension
0 message with invalid extension type
0 message with invalid sa type
0 message with invalid address extension
0 request sent from userland
0 byte sent from userland
0 message toward single socket
0 message toward all sockets
0 message toward registered sockets
0 message with memory allocation failure
kevt:
15 current kernel control sockets
15 kernel control generation count
0 bad vendor failure
0 message too big failure
0 out of memory failure
0 message dropped due to full socket buffers
89510 messages posted
kctl:
0 total kernel control module registered
14 current kernel control modules registered
75 current kernel control sockets
859 kernel control generation count
460 connection attempts
0 connection failure
1137 send failures
0 send list failure
58422 enqueue failures
58422 packets dropped due to full socket buffers
0 failure with bad kern_ctl_ref
0 register failure because of too many kern_ctl_ref
0 enqueuedata failure because could not allocate a packet
0 enqueuedata failure due to full socket buffers
xbkidle:
1 max per process
600 maximum time (seconds)
131072 high water mark
0 socket option not supported failure
0 too many sockets failure
0 total socket requested OK
0 extended bk idle socket
0 no cellular failure
0 no time failures
0 forced defunct socket
0 resumed socket
0 timeout expired failure
0 timer rescheduled
0 no delegated failure
net_api:
2 interface filters currently attached
2 interface filters currently attached by OS
2 interface filters attached since boot
2 interface filters attached since boot by OS
0 IP filter currently attached
0 interface filter currently attached by OS
0 IP filter attached since boot
0 IP filter attached since boot by OS
4 socket filters currently attached
4 socket filters currently attached by OS
4 socket filters attached since boot
4 socket filters attached since boot by OS
483603 sockets allocated since boot
4 sockets allocated in-kernel since boot
4 sockets allocated in-kernel by OS
0 socket with NECP client UUID since boot
1211 local domain sockets allocated since boot
27 route domain sockets allocated since boot
51656 inet domain sockets allocated since boot
11940 inet6 domain sockets allocated since boot
475 system domain sockets allocated since boot
0 multipath domain socket allocated since boot
0 key domain socket allocated since boot
3 ndrv domain sockets allocated since boot
0 other domains socket allocated since boot
49365 IPv4 stream sockets created since boot
2291 IPv4 datagram sockets created since boot
260 IPv4 datagram sockets connected
914 IPv4 DNS sockets
1259 IPv4 datagram sockets without data
11857 IPv6 stream sockets created since boot
83 IPv6 datagram sockets created since boot
0 IPv6 datagram socket connected
0 IPv6 DNS socket
79 IPv6 datagram sockets without data
8 socket multicast joins since boot
8 socket multicast joins since boot by OS
152 IPv4 stream nexus flows added since boot
0 IPv4 datagram nexus flow added since boot
48 IPv6 stream nexus flows added since boot
0 IPv6 datagram nexus flow added since boot
20 interfaces currently allocated
20 interfaces allocated since boot
20 interfaces currently allocated by OS
20 extended interfaces allocated since boot by OS
0 PF addrule operation since boot
0 PF addrule operation since boot by OS
0 vmnet start since boot
if_ports_used:
0 wakeuuid generation
0 offload port list query with wakeuuid not set
0 total offload port entry created since boot
0 current offload port entry
0 max offload port entry
0 duplicate offload port entry
0 total table entry search
0 max hash table entry search
0 match so wake packet call
0 match ch wake packet call
0 IPv4 wake packet
0 IPv6 wake packet
0 TCP wake packet
0 UDP wake packet
0 ISAKMP NAT traversal wake packet
0 ESP wake packet
0 bad protocol wake packet
0 bad family wake packet
0 wake packet event
0 duplicate wake packet event in same wake cycle
0 wake packet event undelivered
0 unattributed wake packet event
0 duplicate unattributed wake packet event in same wake cycle
0 unattributed wake packet event undelivered
0 unattributed wake packet received with null interface
0 bad packet without wake flag
0 pure fragment wake packet
0 packet with incomplete TCP header
0 packet with incomplete UDP header
0 port entry not added with wakeuuid not set
0 deferred matching of ISAKMP NAT traversal wake packet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment