How to count all connections (clients) connected to the specified port on my (remote) server?
Suppose the port number is: 3306 (MySQL port), and how to calculate how many clients are connected to this port at the same time?
3306
Listen, I know I'll do it on Linux: netstat -anp | grep ":3306.*ESTABLISHED" | wc -l netstat -anp | grep ":3306.*ESTABLISHED" | wc -l
netstat -anp | grep ":3306.*ESTABLISHED" | wc -l
I expect it to work on FreeBSD too ... let me know the result!