On 04 Dec 11:55, Chris Green wrote:
I have a number of quite long (i.e. 30 metres or more) cat5e cables strung about the place and would like to test how 'clean' they are.
It's easy enough to test their basic integrity (i.e. if all 8 wires are correctly connected) and I have done that. However I'd like to see if they are actually good enough to provide maximum performance when running gigabit. Presumably if they aren't working too well one will see errors and retries at the hardware level - is there a tool for monitoring this?
Mostly these cables have just one switch between the ends but there are a couple where there may be two switches involved.
Create a 100M file on the system that you're testing the connection with using something like: dd if=/dev/urandom of=1Gfileorubbish bs=$((1024*1024)) count=100
We use urandom, because random will take a LOOONG time waiting for the required entropy for that operation...
Now, on that machine do something like: cat 1Gfileorubbish | nc -l serverip 10234
Then on the other machine: time nc serverip 10234 > /dev/null
Use the realtime and calculate your byterate as such...
e.g. over localhost I did...
$ cat 100Mfileocrap | nc -l localhost 10234
and in another terminal:
$ time nc localhost 10234 > /dev/null
real 0m2.275s user 0m0.036s sys 0m0.376s
$
So that took 2.275 seconds to transfer 100M of data, so (ignoring TCP overheads, etc):
; (100/2.25)*8 ~355.55555555555555555556
Which is 355Mb/s give or take.
I'm thinking I'm probably at that point actually stuck on disk IO, as that's approximately 44MB/s.
Anyways - you're most likely to get hit by disk io rather than network... 1Gb/s is ~ 125MB/s then take in to account TCP overhead and you're probably around 100MB/s... which is probably getting close to the limits of disks (unless you've got really good disks and there's no seeking and everything is being read in sequence, in which case, you're doing better than anyone else I know in the world.
If you're after anything more extensive than that, you're looking at paying Good Money for a top end cable tester of doom.