network load

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

 



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?

Thank you,
Matias.

-
: 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