How many clients are associated with the specified port number

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?

+4
source share
1 answer

Listen, I know I'll do it on Linux: 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!

+5
source

All Articles