Re: network load

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matias Freytes wrote:

> Hello,
> 	I need to generate network load in our LAN (10BT) in
> order to verify some experiments. Is there any way to force a 
> 1Mb/s, a 5Mb/s and a 9Mb/s overall load. Can I use just one
> station:
> 
> /* For 5Mb/s */
> while (<cond>) {
> 	sendto(s, data, 1400, flags,(struct sockaddr*)to, tolen);
> 	tv.tv_sec=0;
> 	tv_tv_usec=2136;	/*0.002136 seg*/
> 	select(0,NULL,NULL,NULL,&tv)
> }
> 
> This would send 1400 bytes every other 0.002136 seconds -> 5Mb in
> one second. Is this a valid approach? Any better ideas?


Well, how about "other" ideas? Have you considered using ping in flood 
mode? By varying the packet size, you can change the bandwidth usage.

i.e. `ping -f -s 3072 <remote host>`

Flood pings have, in my experience, proven to be one of the best ways to 
stress a network in an easily re-producable manner.
-- 
Noah Romer
Driver Developer, CM gopher and Linux Whipping Boy
Storage Components Firmware
LSI Logic Corp.

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux