[Battlemesh] socat simpler than iperf

Gioacchino Mazzurco gmazzurco89 at gmail.com
Mon Feb 27 22:57:22 UTC 2012


/dev/zero is not so trustable some kernel release have very slow
bandwidth reading from /dev/zero

using
yes somelongwords______________here

is more stable to generate traffic

moreover you can use nc and pv if you wan't something more simple

here is what i usually use
on the server side

nc -l -p 5000 | pv > /dev/null

on the client size

yes supercalifragilistichespiralidososuperca | pv | nc $serverip -p 5000


pv is a pipe meter and simply show the instant bandwidth of the pipe

On 02/27/12 22:11, Benjamin Henrion wrote:
> Hi,
> 
> Today I found a simpler way to make speed tests with socat+iptraf:
> 
> socat TCP-LISTEN:8003,,fork PIPE:/dev/null &
> socat UDP-LISTEN:8002,,fork PIPE:/dev/null &
> socat -b 300 -d -d -u /dev/zero UDP:192.168.0.160:8002
> socat -b 300 -d -d -u /dev/zero TCP:192.168.0.160:8003
> 
> and play with the -b size, and launch iptraf on one of the boxes.
> 
> There is also a kernel packet generator, but I had not the time yet to
> play with it.
> 
> --
> Benjamin Henrion <bhenrion at ffii.org>
> FFII Brussels - +32-484-566109 - +32-2-3500762
> "In July 2005, after several failed attempts to legalise software
> patents in Europe, the patent establishment changed its strategy.
> Instead of explicitly seeking to sanction the patentability of
> software, they are now seeking to create a central European patent
> court, which would establish and enforce patentability rules in their
> favor, without any possibility of correction by competing courts or
> democratically elected legislators."
> _______________________________________________
> Battlemesh mailing list
> Battlemesh at ml.ninux.org
> http://ml.ninux.org/mailman/listinfo/battlemesh


More information about the Battlemesh mailing list