How to Check Apache Connections

Apache is one of the famous web services and surpass for more than 100 Million website.

If you have experience in Server Administrator task, you surely headache on the Apache connections when it is getting tons of connections to the server. But, how could you going to check for those connections?

Some command like netstats, grep, ps, etc will very helpful to help you to understand the number of connections of the server.

Mick Genie will guide you some ways to list the Apache connection as below.

Grep port 80 (web services port)

netstat -alntp | grep :80

Check the number of connection from port 80

netstat -alntp | grep :80 | wc -l
ps auxw | grep httpd | wc -l

List the remote IPs connecting to your server on port 80

netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr

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

Published by

Mick Genie

Mick Genie is the founder of and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.

4 thoughts on “How to Check Apache Connections”

Comments are closed.