JasonDaly.name

PHP, Ruby, Symfony, Rails, Doctrine, MooTools. Web Development.
March 30, 2009

Dumping the Number of Open Connection to Port 80 by IP Address

This displays the number of open connections to port 80 on a server, dumping the ip address/connection count pairs in ascending order.

netstat -anlp | grep :80 | awk '{print $5}' | awk -F: '{print $1}' | sort | uniq -c | sort -n

This can be useful in combination with grep1 searches performed on

httpd fullstatus

to determine if a DOS attack is being performed on a server.

1 note Tags: apache netstat linux httpd awk grep connections load

  1. d4ly posted this