Techno Thoughts!  Subscribe

See a list of current connections to your web server

by ichilton on Dec.02, 2009, under UNIX

If you have a high load on your web server, it’s useful to be able to see a list of the current connections on port 80 as sometimes high load can be caused by someone abusing the site - for example scraping it or some kind of denial of service attack.

This code will show a list of the ip’s currently connected to your server on port 80 with a count of the number of connections to the left of it. It’s ordered by the number of connections - highest first:

netstat -ntulpa | grep :80 | awk '{print $5}' | cut -d: -f1 | sort -n | uniq -c | sort -n -r

:, , ,

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...