Hello all,
How are yo??
I am trying to simulate an application which send 1Mbyte using UDP protocol,
this file is splitted in a chuncks of 25Kbytes, and I want to compute the real
throughput.
If I want to specify this 25Kbytes, I have to do it in [Agent/UDP] packetSize
or in [Application/Traffic/CBR]
packetSize.
How can I compute the thrpughput, so the real data bandwith?
I tried to do that, but it doesn't work, I think:
proc record {} {
global null1 ns_ total_bytes
#Set the time after which the procedure should be called again
set time 0.1
#How many bytes have been received by the traffic sinks?
set bw0 [$null1 set bytes_]
#Get the current time
set now [$ns_ now]
#Calculate the bandwidth (in MBit/s) and write it to the files
puts "$now [expr $bw0/$time*8/1000000]"
#Reset the bytes_ values on the traffic sinks
$null1 set bytes_ 0
#Re-schedule the procedure
$ns_ at [expr $now+$time] "record"
}
where is my problem??
Thank you
____________________________________________________________________________________
Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!
http://advision.webevents.yahoo.com/reto/entretenimiento.html