Excessive Load (Find out number of simultaneous connections)

Miscellaneous snippets for SSH

Excessive Load (Find out number of simultaneous connections)

Postby Admin » Mon Feb 25, 2008 7:39 am

Symptom: Your server load is skyrocketing, and Apache continues to crash. Chances are a Bot of some kind is consuming excessive resources.

Solution:

Login to your server via SSH and run

Code: Select all
netstat -tn --inet 2> /dev/null| grep ":80" | awk '/tcp[\ ]*[0-9]+[\ ]*[0-9]+[\ ]+[^\ ]+[\ ]*[^\ ]*/ { print $5; }' | cut -d":" -f1 | sort | uniq -c | sort -n


See which IP has excessive connections and then ban it in your firewall.
Admin
Site Admin
 
Posts: 108
Joined: Sat May 26, 2007 7:57 am

Return to Things you can do via SSH

Who is online

Users browsing this forum: No registered users and 1 guest

cron