Skip to contentSkip to conversation

netrate - network rate/rtt measurement utility

PATCH In review Clark Williams 1 participant 1 message Oct 22, 2008

lore
Share & tools
lore
#0 lore raw

cover netrate - network rate/rtt measurement utility

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thomas,

The patch series that follows is for a program called 'netrate'. It's a utility
I wrote recently to prove to a customer (and myself) that we were
receiving data on a TCP socket at the same rate as it was being sent
from another system. Since I did that, I've added a round-trip-time
measurement as well. Nothing in netrate is specific to the -rt kernel, since I tried to ensure I only used posix interfaces. So if you spot something which breaks that, please let me know.

The default host address is localhost, so you can test this quite easily on the same system.

$ netrate --help
usage: netrate {--transmit|--rtt|--listen} [options]
   where options are:
        --rate=<Inter-Packet Interval>
        --size=<packet size>
        --tcp
        --udp
        --sctp
        --nodelay
        --multicast
        --port=<port number>
        --host=<hostname or IP address>
        --debug
        --histogram
        --help

Currently histogram, multicast and sctp aren't functional.

Typical usage:

<server>

$ netrate --listen

<client>

$ netrate --transmit --host=<server>
^C

<server>
Run Length: 2s:575ms
Run Statistics:

Number of Samples: 25
Minumum:           99ms
Maximum:           100ms
Average:           100ms

As you can see the default transmit rate is 100ms. Additionally, you can run it to measure the round-trip-time of a connection with:

<server>

$ netrate --listen

<client>

$ netrate --rtt --host=<server>
^C
Run Statistics:
Number of Samples: 37
Minumum:           641us
Maximum:           1569us
Average:           1141us

It's nowhere near completely cooked, but I though I'd get you (and the folks on the rt-list) to try it out and see if it was generally useful. If so, I'll add it to the repository with cyclictest/signaltest/pi_stress and continue to try and flesh it out.

Questions, comments, snide remarks welcome

Clark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkj+oJEACgkQqA4JVb61b9coeACfZ/PvVGzZXQIteIhmX1cQbYr7 ZmQAoJNwBJi/B607omP0+Ek/I9sqZ38W
=ZvUv
-----END PGP SIGNATURE-----