Salam (Hi) all,
Many people asked me to send them my own tcl scripts that deals with trace
analysis. As I said before, I wrote these scripts for my own simulations, I did
NOT extend them to support other simulations, and I am really have no time to
do so.
However, AS AN EXAMPLE, here are two files that generates a third file. The
first file contains commands to run the second file that is written in tcl, and
then run the generated third file to run 750 simulations (30 X 25)
automatically, and generate 3 trace files (sent data, received data, and sent
routing packets) from the original trace file per each simulation. To extract
further information from these generated trace files, I used matlab to
calculate, e.g., average e2e delay, normalized throghput, routing overhead,
..etc.
PLEASE NOTE, these 2 scripts include no comments explaining what I am doing. I
send them only as examples for those who need a start point. May be you can
understand what I am doing. If you don't, please do not ask me further because
I am really have NO time.
May be I will not reply for further emails concerning this issue. As a final
statement I will repeat what I wrote in previous email again:
"with ns-2, one should write his own scripts to ensure that he obtains the
right results from trace files."
Yours,
Samer
On 2/26/07, Samer Bali <[EMAIL PROTECTED]> wrote:
Hi all,
As I said, it depends on what you want to extract from the trace file. In
my case, for example, one parameter that I want to calculate is the average
normalized throughput. I defined it as the ratio between the useful throughput
or goodput (received data packets without duplication divided by simulation
time) to the offered data rate (amount of useful data sent without
retransmission devided by simulation time). To calculate the normalized
throughput I need to find number of received data packets without duplications
at AGT level. To do so (assuming that the trace file is output.tr in new
wireless format):
grep -e "r -t " output.tr > temp1.tr
grep -e "tcp -Il $rpktsize" temp1.tr > temp2.tr
grep -e "-Nl AGT " temp2.tr > datarecv.tr
(now datarecv.tr contains all trace lines concerning the received data only
on AGT level but "with duplications". $rpktsize depends on your simulation.
output.tr, temp1.tr, and temp2.tr can be deleted if you do not need them
anymore.)
To calculate number of received data without duplications I used matlab
making use of the source address.source port number (-Is), dest address.dest
port number (-Id), and packet uniqe id (-Ii). Tracegraph does not deal with -Is
and -Id, so with Tracegraph one cannot calculate number of received data
packets without duplications at AGT level (throghput calculated in Tracegraph
is not the useful throughput, so be careful !!!). ***THIS IS ONLY ONE
EXAMPLE****.
All these steps are done automatically by a certain software written in tcl
and matlab that I did it for my own simulations, I do not extend them to
support other simulations.
Anyway, as a final conclusion: with ns-2, one should write his own scripts
to ensure that he obtains the right results from trace files. I spent 3 months
trying understanding how Tracegrapgh works, whereas it tooks only 2 weeks to
write my own script.
Cheers,
Samer
----- Original Message -----
From: Pragasen Mudali
To: Samer Bali
Sent: Monday, February 26, 2007 7:42 AM
Subject: Re: [ns] Tracegraph CANNOT BE TRUSTED in all simulation scenarios
Hi,
Thanks for the posting. Do you have any other scripts that you use for
analysis. If so, can you forward them to me please.
On 24/02/07, Samer Bali < [EMAIL PROTECTED]> wrote:
hi all,
I used Tracegraph to analyse trace file of ns-2. I found that it works
good
when there is no frequent packet drops and retransmission. In a
simulation
where a large packet drops and retransmission exist (for example in my
case
I used the shadowing model in the PHY layer and used a multihop scenario
with up to 4 hops) Tracegraph fails to give a correct analysis results.
I
think that Tracegraph CANNOT BE TRUSTED in all simulation scenarios. One
should check his results using another tool (do some sample checks with
awk
or perl or grep command) or do his own analysis code.
Yours,
Samer
--
Pragasen Mudali
Research Student
Department of Computer Science
University of Zululand