Link to home
Start Free TrialLog in
Avatar of DJ_AM_Juicebox
DJ_AM_Juicebox

asked on

how much data has been sent across port?

Hi,

Is there some way (on windows XP) to measure how many bytes have come across a port? I'm using a third party library to compress images and send them to a remote computer. I'm not convinced that the compression is taking place during the image transfer, rather it's happening when the remote machine receives it. I thought it would be a simple test to just listen to the port im sending to and actually see how much data is sent across (in bytes) - then I can see if my 1mb image is really getting compressed or not.

Thanks
Avatar of jkr
jkr
Flag of Germany image

There is no such thing that allowes you to see that in a per port basis (we are talking TCP/IP, aren't we?), only per interface. So you'd have to make sure to not generate any traffic on that interface during the measurement period.
Avatar of DJ_AM_Juicebox
DJ_AM_Juicebox

ASKER

if I can't do it per-port, it shouls still be ok, in fact I'm running the server and client on my own machine here like:

    server: listen on port 4006
    client: send to 127.0.0.1, port 4006

so I can shut everything else off I suppose.

But what/how do I see how many bytes are being transferred?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok I set it up that way.

But when I transfer the image, the Bytes Sent value does NOT increase. Is it because I'm sending to a port on my own machine? (I'm using the 127.0.0.1 address)

Thanks
Windows.... the loopback adapter isn't taken into account here *gnarf*

You will have to check with a remote connection. On Linux, a simple 'ifconfig' would help.
curses!

Thanks
Wanna measure that yourself? See http://msdn2.microsoft.com/en-us/library/aa365959.aspx ("GetIpStatistics"). Also http://www.codeproject.com/internet/winnetstat.asp ("IP Helper API - Retrieve TCP/IP/UDP Statistics, Interface details, ARP Table and Route Table")