Originally Posted by mrmnemo
I dont understand how I can use that information for filtering network traffic.
Sorry, your previous post included:
I am just trying to monitor traffic on a machine by the actual command vs. the port number.
and my answer was orientated towards monitoring rather than filtering, per se. And I should also have mentioned wireshark as a monitoring thingy.
There are dozens of apps that allow you to see in more or less detail (and with better or worse display filtering options; wireshark does well at display filtering) what is going on your network; the trouble is most of them don't tell you anything about what is listening to which port, but you can do it yourself. Look at the traffic and if you see lots of traffic that you are interested in going to some particular port, use netstat to see who is listening there.
(you might like to make a one-line script along the lines
netstat -l | grep $1
which you can call from the command line, and the parameter that you specify will allow you to filter the netstat output just to stuff that contains the specific number that you specify on the command line, which will be the port number that you are interested in)
It is two stages, but they are pretty easy stages. Certainly, it seems to me easier than what you were originally trying to do. Still think you might be better with a different thread title, though.