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

Re: [ns] Link Capacity



Meow Chiow Chia wrote:
The resulted xgraph showed that the maximum link
throughput is actually bigger than 10000bits/sec. I am
wondering why it would happen ?
I guess you're measuring traffic going in both directions of the duplex link. This gives a maximum throughput of 20kbit/s. Otherwise try using my awk script which I've attached to this mail. Run it on a trace of the link you like to perform the measurements on, i.e. not a trace-all file:

$ns trace-queue $node0 $node1 $trace_file

I am wondering what
are the reason of the dropping packets , is that due
to buffer memory overflow and/or link capacity has
been exceeded ?
Yes, both. This is however basic computer communications knowledge and not a question about ns.

Kindly
Håkan

-- 
Håkan Byström, Operax
+46 920 755 07, office
+46 70 374 03 24, cellular
 
BEGIN {
    arguments = 2;
    if (ARGC < arguments || ARGC > arguments || flowtype == 0 || outdata_file==0) {
	printf("error: wrong number of arguments.\nawk: usage - awk -f flowcalc.awk [-v graphgran=value] [-v fidfrom=value] [-v fidto=value] -v flowtype=\"type\" -v outdata_file=\"filename\" indata_file\n");
	exit;
    } else {
	printf("Running flowcalc on %s to %s.\n", ARGV[arguments - 1], outdata_file);
    }
    measuretime = 0;
    if (graphgran == 0) {
	graphgran = 0.1;
    }
    bits = 0;
    first_time = 0;
    
}

{
    if (($1 == "r") &&
	((fidfrom == 0 && fidto ==0) || (($8 <= fidto) && ($8 >= fidfrom))) &&
	(flowtype == "all" || flowtype == $5)) {

	bits = bits + $6 * 8;

	if (($2 - graphgran) > measuretime) {
	    last_time = $2;
	    rate = (bits/1000000)/(last_time - first_time);
	    print last_time, rate >> outdata_file;
	    measuretime = $2;
	    bits = 0;
	    first_time = $2;
	}
    }
}

END {
}