Is there a way to measure the network consumption to a specific IP port.
I am running 2-3 process with multiple threads which connect to a remote server and I need to know the exact used network bandwidth from my server to the remote server.
My server runs under Linux - unfortunately I have no access to the involved network components.
As far, as I know, you can measure bandwidth out of the box only on specific interface.
To measure traffic by ports or IP's you have to use accounting software. For example ntop
I'm not 100% sure whether you need to know active flow or cumulative usage. For the latter and other more involved data gathering, the aforementioned ntop is an excellent choice.
If you just need something quick and dirty to see the active connection flows on a NIC, you can try the iftop command.
My experience is that ntop doesn't scale well (this was a couple of years ago). I am now using a combination of fprobe and nfsen to do bandwith usage monitoring. See my notes here.
I ended up using pktstat as ntop looked good, but was a hazzle to install. it gives exactly the required breakdown.