Friday, April 11, 2008

NS2 Trace File is too large!

One of the main problem in using NS2 is it output (trace file) can be very large.
It depends on the simulation time , the number of nodes in the network, the number of transport agents etc. The larger the trace file , more time will be required to extract the trace file for visualization and performance analysis.

There are few ways to reduce the trace file , but most important part is know which part to be evaluated from the network layout. Is it at all nodes and links? or just at a destination nodes? specific link? or at a specific queue?

The (usual) solution is to use specific monitoring/trace command instead of trace-all command. Trace-all command give complete simulation result for each links and nodes. Some command/technique are trace-queue, Loss Monitor and queue monitoring. For the case of mannasim (if using Script Generator Tool) , it gives 3 options of trace. Test it one by one and compare the size of the trace file. Ooh.. don't forget to try the "specific monitoring/trace" command. Compare it withthe trace file created by trace-all command.


Nereyda said...

Hi I'm trying to get some statistics from a Flow monitor instead of a queue monitor. But I had problems with the variables of the flow monitor.
I have an error after the classifier of the flow monitor:

ns: monitorF: invalid command name ""
while executing
"$flow set bdepartures_ "
(procedure "monitorF" line 16)
invoked from within

I don't know how to get the number of bytes, arrivals ,etc from each flow.

Could you help me with this? I had searching in forums and i haven't get an answer.

I'll thank you a lot for that said...

I dont know what the exact problem is, let me guess..

the flow monitoring is implemented in monitorF procedure in your script? maybe it is because the variable flow is not defined?

korydallos said...

anyone can help me guys ? i have a couple of questions...please

1.How to find out the number of nodes in the network from the trace file? Also can u give any examples that would help please??

2.How to discover the “visible network topology” from the trace file? Give examples pleeeeeeeease.

3.Which parameters of the event descriptor in the trace file can be used for calculation of the throughput on the link? examples would really help

4. Which parameters of the event descriptor in the trace file can be used for calculation of the throughput on the end-to-end route? any examples??.

5.What typical functions are needed in order to extract useful data from trace files (think in terms of getting values from some text columns, sorting of strings, etc.)? Can u please make a pseudo-code for the postprocessing algorithm. Aslo do u know Which standard Unix utilities may help to extract necessary data from the trace files and process them? Give examples of sequences pleaseeeeeeeee (i.e. which to run first, which is next, etc.). said...

dear korydallos.

I believe that there are a few tools available to do that.. tracegraph is one of the option.

Have a look at the trace file and compare to the format.. you will get an idea..

maybe other visitors can help?

Reevaa said...


i am trying to get the nergu value of nodes in ns trace file.i have added the energy model in ns-nodeconfig in tcl file.but i am nt getting the output in trace file..

can anyone help out for this problem ?

Reevaa said...

my previous comment was abt energy in nodes..sorry for typo error