How to check the number of protocol connections made in a server
Here is a simple tip to check the number of protocol connections made by HTTP or MySQL.
We know port 80 is used by the HTTP server and port 3306 is used by the MySQL server, by default. So here is the command to check the number of connections:
netstat -an | grep :80 | wc -l
The above command is for the HTTP server. Similarly, type 3306 instead of 80 to know the connection made for the MySQL server.
To know the IP addresses that have made requests to port 80 of your server, run the following command:
netstat -an | grep :80