Shashikant shah

Monday 14 April 2014

How to Check Web Server Connections


Web Server Connections

1.Grep port 80 (web services port) :-
# netstat -alntp | grep :80

2.Check the number of connection from port 80 :-
# netstat -alntp | grep :80 | wc -l
# netstat -t -u -c 
# ps auxw | grep httpd | wc -l

3.List the remote IPs connecting to your web server on port 80 :-
# netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr

4.List the unique remote IPs and the number of connections from each IP.
# netstat -alntp | grep :80 | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n

No comments:

Post a Comment