Pour remettre à zéro les statistiques de 'netstat', quelques options :

-Zc : Statistiques sur Buffer cache

-Zi  : Statistiques sur les interfaces

-Zm : Allocateur de mémoire.

-Zs  : Protocoles.

-p tcp : Spécifie la demande pour le protocole TCP

 Ainsi, on porra faire une commande de Reset des statistiques :

# netstat -Zs -Zm -Zi -Zc

Suivie d'une commande d'affichage des valeurs après cette réinitialisation :

# netstat -in

Name  Mtu   Network     Address            Ipkts Ierrs    Opkts Oerrs  Coll

en0   1500  link#2      4e.cc.64.4b.28.2       15     0        7     0     0

en0   1500  10.78.16    10.78.18.100           15     0        7     0     0

en1   1500  link#3      4e.cc.64.4b.28.3       12     0        0     0     0

en1   1500  10.26.80    10.26.87.18            12     0        0     0     0

en2   1500  link#4      4e.cc.64.4b.28.4       17     0       16     0     0

en2   1500  10.41.68    10.41.68.32            17     0       16     0     0

en3   1500  link#5      4e.cc.64.4b.28.5        2     0        1     0     0

en3   1500  10.28.96    10.28.96.80             2     0        1     0     0

lo0   16896 link#1                              6     0        6     0     0

# netstat -s -p tcp 

tcp:
215 packets sent
215 data packets (34360 bytes)
0 data packets (0 bytes) retransmitted
0 ack-only packets (0 delayed)
0 URG only packets
0 window probe packets
0 window update packets
0 control packets
0 large sends
0 bytes sent using largesend
0 bytes is the biggest largesend
363 packets received
216 acks (for 34596 bytes)
1 duplicate ack
0 acks for unsent data
214 packets (29056 bytes) received in-sequence
0 completely duplicate packets (0 bytes)
0 old duplicate packets
0 packets with some dup. data (0 bytes duped)
0 out-of-order packets (0 bytes)
0 packets (0 bytes) of data after window
0 window probes
0 window update packets
0 packets received after close
0 packets with bad hardware assisted checksum
0 discarded for bad checksums
0 discarded for bad header offset fields
0 discarded because packet too short
0 discarded by listeners
0 discarded due to listener's queue full
145 ack packet headers correctly predicted
146 data packet headers correctly predicted
0 connection requests
0 connection accepts
0 connections established (including accepts)
0 connections closed (including 0 drops)
0 connections with ECN capability
0 times responded to ECN
0 embryonic connections dropped
215 segments updated rtt (of 213 attempts)
0 segments with congestion window reduced bit set
0 segments with congestion experienced bit set
0 resends due to path MTU discovery
0 path MTU discovery terminations due to retransmits
0 retransmit timeouts
0 connections dropped by rexmit timeout
0 fast retransmits
0 when congestion window less than 4 segments
0 newreno retransmits
0 times avoided false fast retransmits
0 persist timeouts
0 connections dropped due to persist timeout
1 keepalive timeout
0 keepalive probes sent
0 connections dropped by keepalive
0 times SACK blocks array is extended
0 times SACK holes array is extended
0 packets dropped due to memory allocation failure
0 connections in timewait reused
0 delayed ACKs for SYN
0 delayed ACKs for FIN
0 send_and_disconnects
0 spliced connections
0 spliced connections closed
0 spliced connections reset
0 spliced connections timeout
0 spliced connections persist timeout
0 spliced connections keepalive timeout
0 TCP checksum offload disabled during retransmit
0 Connections dropped due to bad ACKs
0 Connections dropped due to duplicate SYN packets
0 fastpath loopback connections
0 fastpath loopback sent packets (0 bytes)
0 fastpath loopback received packets (0 bytes)

icon phone
Téléphone/Whatsapp : +33 (0)6 83 84 85 74
icon phone