=== Apache Connection IPs and Connection State === Cent OS 6 netstat -pant | awk '/http/ {print $5, $6}' | awk -F: '{print $4 , $5}' | awk '{print $1, $3}' | sort -k1 | uniq -c | sort -rn \\ Ubuntu: netstat -pant | awk '/apache2/ {print $5, $6, $7}' | awk -F'[: /]' '{print $1, $3, $5}' | sort | uniq -c | sort -rn Example output: 63 x.x.x.x CLOSE_WAIT apache2 58 127.0.0.1 ESTABLISHED apache2 9 127.0.0.1 SYN_SENT apache2 1 10.x.x.254 CLOSE_WAIT apache2 1 10.x.x.252 CLOSE_WAIT apache2 1 10.x.x.251 CLOSE_WAIT apache2 1 10.x.x.250 CLOSE_WAIT apache2 \\ === Close_Wait Connections Summary === netstat -pant | awk -F: '/CLOSE.*httpd/ {print $8}' | sort | uniq -c | sort -rn