i need to monitor how many users are actively connected to one port on debian. I know i can do it with command
netstat -na |grep $port |grep ESTABLISHED |wc -l
which really gives me result - a number of connections on certain port which are "ESTABLISHED". But i am looking for a linux command which can give me result on how many connections there is really some flowing traffic - because many of my connections are only established - but there is no traffic, so i need to filter them. Someone has any idea how to get this number?
thank you all