Diagnosing DDOS

I found this command very helpful when diagnosing DDOS.  It will show you IPs connecting to your server and the number of their connections.

netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1