La commande 'netstat' permet de suivre l'activité réseau, les configurations des adresses IP et des routes.
# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en100 1500 link#2 40.f2.e9.5a.6e.e4 7681 0 5772 0 0
en100 1500 10.26.96 10.26.99.166 7681 0 5772 0 0
en101 1500 link#3 40.f2.e9.5a.6e.e5 1832 0 0 0 0
en101 1500 10.78.16 10.78.18.180 1832 0 0 0 0
en201 1500 link#4 e4.1f.13.d8.70.62 1886 0 2083 0 0
# netstat -rn
Routing tables
Destination Gateway Flags Refs Use If Exp Groups
Route tree for Protocol Family 2 (Internet):
default 10.42.3.1 UG 93 1825844 en203 - -
10.26.96.0 10.26.99.166 UHSb 0 0 en100 - - =>
10.26.96/20 10.26.99.166 U 14 79812 en100 - -
# netstat -c # Affichage des statistiques du cache réseau
netstat -c
Network Buffer Cache Statistics:
-------------------------------
Current total cache buffer size: 0
Maximum total cache buffer size: 0
Current total cache data size: 0
Maximum total cache data size: 0
Current number of cache: 0
Maximum number of cache: 0
Number of cache with data: 0
Number of searches in cache: 0
Number of cache hit: 0
Number of cache miss: 0
Number of cache newly added: 0
Number of cache updated: 0
Number of cache removed: 0
Number of successful cache accesses: 0
Number of unsuccessful cache accesses: 0
Number of cache validation: 0
Current total cache data size in private segments: 0
Maximum total cache data size in private segments: 0
Current total number of private segments: 0
Maximum total number of private segments: 0
Current number of free private segments: 0
Current total NBC_NAMED_FILE entries: 0
Maximum total NBC_NAMED_FILE entries: 0
# netstat -p tcp
tcp:
102230137 packets sent
76018873 data packets (247507030292 bytes)
14793 data packets (17580398 bytes) retransmitted
17214584 ack-only packets (16135005 delayed)
0 URG only packets
65 window probe packets
8237144 window update packets
1489358 control packets
10079965 large sends
236711907150 bytes sent using largesend
65160 bytes is the biggest largesend
118420915 packets received
78969989 acks (for 247507036358 bytes)
2330993 duplicate acks
0 acks for unsent data
100885729 packets (95410847253 bytes) received in-sequence
1527 completely duplicate packets (1037792 bytes)
3 old duplicate packets
2 packets with some dup. data (1350 bytes duped)
114708 out-of-order packets (2811422 bytes)
0 packets (0 bytes) of data after window
0 window probes
67611 window update packets
7971 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
8280 discarded by listeners
0 discarded due to listener's queue full
12386647 ack packet headers correctly predicted
36254612 data packet headers correctly predicted
373147 connection requests
12520 connection accepts
378994 connections established (including accepts)
385348 connections closed (including 666 drops)
0 connections with ECN capability
0 times responded to ECN
6013 embryonic connections dropped
78931484 segments updated rtt (of 72411891 attempts)
0 segments with congestion window reduced bit set
0 segments with congestion experienced bit set
0 resends due to path MTU discovery
308 path MTU discovery terminations due to retransmits
4277 retransmit timeouts
283 connections dropped by rexmit timeout
4082 fast retransmits
2 when congestion window less than 4 segments
7009 newreno retransmits
23 times avoided false fast retransmits
94 persist timeouts
0 connections dropped due to persist timeout
2015269 keepalive timeouts
0 keepalive probes sent
41 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
1 connection 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
581 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)
# netstat -s
icmp:
786 calls to icmp_error
0 errors not generated because old message was icmp
Output histogram:
echo reply: 346109
destination unreachable: 786
echo: 1126
time stamp reply: 1
0 messages with bad code fields
0 messages < minimum length
0 bad checksums
0 messages with bad length
Input histogram:
echo reply: 1111
destination unreachable: 22400
echo: 346146
time exceeded: 3
time stamp: 1
address mask request: 3
346110 message responses generated
igmp:
0 messages received
0 messages received with too few bytes
0 messages received with bad checksum
0 membership queries received
0 membership queries received with invalid field(s)
0 membership reports received
0 membership reports received with invalid field(s)
0 membership reports received for groups to which we belong
10 membership reports sent
tcp:
102352947 packets sent
76063549 data packets (247783938081 bytes)
14793 data packets (17580398 bytes) retransmitted
17238774 ack-only packets (16141009 delayed)
0 URG only packets
65 window probe packets
8290776 window update packets
1489982 control packets
10084131 large sends
236981533418 bytes sent using largesend
65160 bytes is the biggest largesend
118587099 packets received
79035030 acks (for 247783941511 bytes)
2333127 duplicate acks
0 acks for unsent data
101020090 packets (97500883269 bytes) received in-sequence
1527 completely duplicate packets (1037792 bytes)
3 old duplicate packets
2 packets with some dup. data (1350 bytes duped)
114766 out-of-order packets (2813824 bytes)
0 packets (0 bytes) of data after window
0 window probes
67612 window update packets
7974 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
8283 discarded by listeners
0 discarded due to listener's queue full
12415472 ack packet headers correctly predicted
36353308 data packet headers correctly predicted
373303 connection requests
12525 connection accepts
379155 connections established (including accepts)
385516 connections closed (including 666 drops)
0 connections with ECN capability
0 times responded to ECN
6013 embryonic connections dropped
78996671 segments updated rtt (of 72452373 attempts)
0 segments with congestion window reduced bit set
0 segments with congestion experienced bit set
0 resends due to path MTU discovery
308 path MTU discovery terminations due to retransmits
4277 retransmit timeouts
283 connections dropped by rexmit timeout
4082 fast retransmits
2 when congestion window less than 4 segments
7009 newreno retransmits
23 times avoided false fast retransmits
94 persist timeouts
0 connections dropped due to persist timeout
2017295 keepalive timeouts
0 keepalive probes sent
41 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
1 connection 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
581 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)
udp:
1659256 datagrams received
0 incomplete headers
0 bad data length fields
0 bad checksums
1362 dropped due to no socket
959642 broadcast/multicast datagrams dropped due to no socket
0 socket buffer overflows
698252 delivered
733205 datagrams output
ip:
120629044 total packets received
0 bad header checksums
0 with size smaller than minimum
0 with data size < data length
0 with header length < data size
0 with data length < header length
0 with bad options
0 with incorrect version number
0 fragments received
0 fragments dropped (dup or out of space)
0 fragments dropped after timeout
0 packets reassembled ok
120593084 packets for this host
22381 packets for unknown/unsupported protocol
0 packets forwarded
12875 packets not forwardable
0 redirects sent
105777028 packets sent from this host
129 packets sent with fabricated ip header
0 output packets dropped due to no bufs, etc.
0 output packets discarded due to no route
108 output datagrams fragmented
0 fragments created
108 datagrams that can't be fragmented
0 IP Multicast packets dropped due to no receiver
0 successful path MTU discovery cycles
0 path MTU rediscovery cycles attempted
0 path MTU discovery no-response estimates
0 path MTU discovery response timeouts
0 path MTU discovery decreases detected
0 path MTU discovery packets sent
0 path MTU discovery memory allocation failures
0 ipintrq overflows
4 with illegal source
0 packets processed by threads
0 packets dropped by threads
0 packets dropped due to the full socket receive buffer
0 dead gateway detection packets sent
0 dead gateway detection packet allocation failures
0 dead gateway detection gateway allocation failures
0 incoming packets dropped due to MLS filters
0 packets not sent due to MLS filters
ipv6:
700 total packets received
Input histogram:
UDP: 576
ICMP v6: 124
0 with size smaller than minimum
0 with data size < data length
0 with incorrect version number
0 with illegal source
0 input packets without enough memory
0 fragments received
0 fragments dropped (dup or out of space)
0 fragments dropped after timeout
0 packets reassembled ok
700 packets for this host
0 packets for unknown/unsupported protocol
0 packets forwarded
0 packets not forwardable
0 too big packets not forwarded
700 packets sent from this host
0 packets sent with fabricated ipv6 header
0 output packets dropped due to no bufs
0 output packets without enough memory
0 output packets discarded due to no route
0 output datagrams fragmented
0 fragments created
0 packets dropped due to full socket receive buffer
0 packets not delivered due to bad raw IPv6 checksum
0 incoming packets dropped due to MLS filters
0 packets not sent due to MLS filters
icmpv6:
576 calls to icmp6_error
0 errors not generated because old message was icmpv6
Output histogram:
unreachable: 124
packets too big: 0
time exceeded: 0
parameter problems: 0
redirects: 0
echo requests: 0
echo replies: 0
group queries: 0
group reports: 0
group terminations: 0
router solicitations: 0
router advertisements: 0
neighbor solicitations: 0
neighbor advertisements: 0
0 messages with bad code fields
0 messages < minimum length
0 bad checksums
0 messages with bad length
Input histogram:
unreachable: 124
packets too big: 0
time exceeded: 0
parameter problems: 0
echo requests: 0
echo replies: 0
group queries: 0
bad group queries: 0
group reports: 0
bad group reports: 0
our groups' reports: 0
group terminations: 0
bad group terminations: 0
router solicitations: 0
bad router solicitations: 0
router advertisements: 0
bad router advertisements: 0
neighbor solicitations: 0
bad neighbor solicitations: 0
neighbor advertisements: 0
bad neighbor advertisements: 0
redirects: 0
bad redirects: 0
mobility calls when not started: 0
home agent address discovery requests: 0
bad home agent address discovery requests: 0
bad home agent address discovery replys: 0
bad home agent address discovery replys: 0
prefix solicitations: 0
bad prefix solicitations: 0
prefix advertisements: 0
bad prefix advertisements: 0
0 message responses generated
# netstat -m
Kernel malloc statistics:
******* CPU 0 *******
By size inuse calls failed delayed free hiwat freed
64 412 327943 0 6 356 27960 0
128 94 320922 0 2 226 20970 0
256 72 1254182 0 249 4152 41940 0
512 800 71434866 0 522 4184 87375 0
1024 216 150186 0 147 388 20970 0
2048 142 123899 0 78 16 52425 0
4096 2 164472 0 17 11 3495 0
8192 13 1244373 0 15 23 873 0
16384 0 173 0 19 4 436 0
32768 152 81049 0 74 17 218 42
65536 0 97778 0 25 2 218 0
131072 0 64 0 0 31 40 13
******* CPU 1 *******
By size inuse calls failed delayed free hiwat freed
64 1 1264 0 0 63 27960 0
128 0 196 0 0 32 20970 0
256 0 1148 0 4 96 41940 0
512 16 3895917 0 76 848 87375 0
1024 0 153 0 4 16 20970 0
2048 1 1250 0 4 13 52425 0
4096 0 93563 0 5 107 3495 0
8192 0 94 0 2 3 873 0
16384 0 7 0 1 2 436 0
32768 0 792 0 4 11 218 0
65536 0 21 0 4 3 218 0
131072 0 3 0 0 19 32 0
******* CPU 2 *******
By size inuse calls failed delayed free hiwat freed
64 2 1199 0 0 62 27960 0
128 0 9 0 0 32 20970 0
256 0 254 0 5 96 41940 0
512 1 975885 0 57 615 87375 0
1024 0 56 0 1 4 20970 0
2048 2 1219 0 2 6 52425 0
4096 0 15914 0 12 30 3495 0
8192 0 35 0 2 4 873 0
16384 0 2 0 1 0 436 0
32768 0 724 0 2 4 218 0
65536 0 5 0 3 4 218 0
131072 0 3 0 0 19 32 0
******* CPU 3 *******
By size inuse calls failed delayed free hiwat freed
64 0 1115 0 0 64 27960 0
128 0 23 0 0 32 20970 0
256 0 268 0 5 80 41940 0
512 0 1056170 0 68 776 87375 0
1024 0 53 0 1 4 20970 0
2048 0 1136 0 2 6 52425 0
4096 0 18169 0 8 24 3495 0
8192 0 37 0 2 6 873 0
16384 0 2 0 1 0 436 0
32768 0 726 0 4 6 218 0
65536 0 6 0 4 0 218 0
131072 0 3 0 0 19 32 0
******* CPU 4 *******
By size inuse calls failed delayed free hiwat freed
64 576 474351 0 10 320 27960 0
128 176 234000 0 2 240 20970 0
256 143 1004598 0 65 977 41940 0
512 727 69398226 0 121 953 87375 0
1024 127 196175 0 74 185 20970 0
2048 148 176882 0 87 28 52425 0
4096 31 179644 0 21 18 3495 0
8192 4 985292 0 8 7 873 0
16384 0 182 0 10 4 436 0
32768 149 78897 0 62 25 218 8
65536 1 85190 0 30 43 218 0
131072 2 58 0 0 203 341 0
******* CPU 5 *******
By size inuse calls failed delayed free hiwat freed
64 2 1143 0 0 62 27960 0
128 1 147 0 0 31 20970 0
256 0 1498 0 5 96 41940 0
512 11 3968170 0 76 845 87375 0
1024 0 148 0 3 12 20970 0
2048 2 1178 0 4 10 52425 0
4096 0 94374 0 8 112 3495 0
8192 0 120 0 2 4 873 0
16384 0 5 0 2 3 436 0
32768 0 735 0 5 8 218 0
65536 0 21 0 4 2 218 0
131072 0 5 0 0 19 32 0
******* CPU 6 *******
By size inuse calls failed delayed free hiwat freed
64 2 980 0 0 62 27960 0
128 0 12 0 0 32 20970 0
256 0 239 0 5 80 41940 0
512 1 1290150 0 22 327 87375 0
1024 0 54 0 1 4 20970 0
2048 2 1001 0 2 4 52425 0
4096 0 35277 0 7 60 3495 0
8192 0 37 0 1 2 873 0
16384 0 2 0 1 1 436 0
32768 1 616 0 2 2 218 0
65536 0 6 0 4 3 218 0
131072 0 3 0 0 19 32 0
******* CPU 7 *******
By size inuse calls failed delayed free hiwat freed
64 1 1038 0 0 63 27960 0
128 0 21 0 0 32 20970 0
256 0 325 0 5 80 41940 0
512 0 935507 0 28 392 87375 0
1024 0 58 0 1 4 20970 0
2048 1 1053 0 2 5 52425 0
4096 0 13312 0 10 52 3495 0
8192 0 40 0 1 2 873 0
16384 0 2 0 1 1 436 0
32768 0 681 0 2 3 218 0
65536 0 5 0 3 5 218 0
131072 0 3 0 0 19 32 0
******* CPU 8 *******
By size inuse calls failed delayed free hiwat freed
64 264 371410 0 6 824 27960 0
128 133 181890 0 1 187 20970 0
256 28753 934034 0 2163 6207 41940 0
512 27517 78007193 0 4194 6267 87375 0
1024 139 160951 0 65 165 20970 0
2048 125 139784 0 66 31 52425 0
4096 10 214992 0 18 19 3495 0
8192 15 1033500 0 9 4 873 0
16384 0 206 0 12 2 436 0
32768 113 78854 0 50 18 218 0
65536 0 83809 0 32 2 218 0
131072 0 75 0 0 197 341 0
******* CPU 9 *******
By size inuse calls failed delayed free hiwat freed
64 1 1186 0 0 63 27960 0
128 0 213 0 0 32 20970 0
256 0 2599 0 4 96 41940 0
512 26 3897411 0 71 790 87375 0
1024 0 153 0 3 12 20970 0
2048 1 1051 0 5 11 52425 0
4096 0 87507 0 6 107 3495 0
8192 0 119 0 1 3 873 0
16384 0 6 0 1 2 436 0
32768 0 649 0 4 8 218 0
65536 0 15 0 4 3 218 0
131072 0 3 0 0 19 32 0
******* CPU 10 *******
By size inuse calls failed delayed free hiwat freed
64 0 951 0 0 64 27960 0
128 2 26 0 0 30 20970 0
256 0 263 0 5 96 41940 0
512 1 947279 0 5 175 87375 0
1024 0 64 0 2 8 20970 0
2048 0 971 0 3 8 52425 0
4096 0 16118 0 12 82 3495 0
8192 0 39 0 1 3 873 0
16384 0 2 0 1 1 436 0
32768 0 608 0 3 6 218 0
65536 0 8 0 4 3 218 0
131072 0 3 0 0 19 32 0
******* CPU 11 *******
By size inuse calls failed delayed free hiwat freed
64 2 888 0 0 62 27960 0
128 1 7 0 0 31 20970 0
256 0 269 0 5 80 41940 0
512 1 1068801 0 63 695 87375 0
1024 0 51 0 1 4 20970 0
2048 2 906 0 1 4 52425 0
4096 0 21977 0 6 66 3495 0
8192 0 39 0 1 2 873 0
16384 0 2 0 1 0 436 0
32768 0 560 0 2 3 218 0
65536 0 5 0 3 0 218 0
131072 0 3 0 0 18 32 0
Streams mblk statistic failures:
0 high priority mblk failures
0 medium priority mblk failures
0 low priority mblk failures