Server statistics:
1) count the number of connections on port 80
Netstat-Nat | grep-I "80" | WC-l
1
2) count the number of httpd connections
PS-Ef | grep httpd | WC-l
1
3) collect statistics on connected instances in the "established" status'
Netstat-Na | grep established | WC-l
2
4) Find out which IP Address has the most connections and seal it.
Netstat-Na | grep established | awk '{print $5}' | awk-F: '{print
$1} '| sort | uniq-c | sort-R + 0n
Netstat-Na | grep SYN | awk '{print $5}' | awk-F:
'{Print $1}' | sort | uniq-c | sort-R + 0n
Netstat Quick View of TCP connections
Netstat-N | awk '/^ TCP/{++ s [$ NF]} end {for (a in
S) print a, s [a]}'
Man netstat can be used to understand the significance of syn_rcvd. Syn_rcvd indicates the current unfinished tcp syn queue
Run the following command:
# Netstat-an | grep SYN | WC-l
$ Netstat-an | grep syn_recv | WC
97 582 7857
$ Netstat-an |
Grep 80 | WC
916 5500 74164