ns2 trace files explained
The product after running ns2 will probably be some tracefile. They are terribly documented (as everything I am working with at the moment).
A typical example of a line could be:
r 3.052590420 _75_ RTR — 14 SPAN 40 [0 ffffffff 5e 0] [energy 999.989886 ei 0.000 es 0.000 et 0.001 er 0.009] ——- [94:-1 -1:-1 32 0],
So… here it is, all beautifully laid out and explained for you:
Entry | r | 3.052590420 | _75_ | RTR | — | 14 | SPAN | 40 | [0 | ffffffff | 5e | 0] | [energy 999.989886 | ei 0.000 | es 0.000 | et 0.001 | er 0.009] | ——- | [94 | :-1 | -1 | :-1 | 32 | 0] | |
Interpretation | action | time | node number | kind of trace | reason for logging | identifier for this event | packet type | size of cmn header | expected time to send data | mac destination address | mac sender address | protocol type | remaining node nergy | idle energy | sleep energy | energy transmit | energy receiv | ip source address | src port | dest address |
dest port |
TTL | next hop | ||
possible entries | r(ead) s(end) D(rop) f(orward) |
time stamp | src_ | name of object type tracing | why | ch->uid(), | packet_info.name(ch->ptype()) | ch->size() | mh->dh_duration | ETHER_ADDR(mh->dh_da) | ETHER_ADDR(mh->dh_sa) | GET_ETHER_TYPE(mh->dh_body)) | ih->src | ih->ttl | if no next hop: 0 |
Note: This applies to CMU trace files that were created using the span protocol. Your ns2 output could be a bit different, but still: you will find this very helpful.
P.S.: Oh… I’m out of luck publishing this on wordpress. It’s all cut off on the right. Please, do simply copy this article to the clipboard and paste it somewhere to read, ok?
Read on! Knowledge is lazy today.
It is good website for ns2 learners
Ashok Kumar Alluri - Saturday, 20. November 2010 at 16:07 |
hi, when i want to compare energy consumption of aodv and dsr, should i concern about idel and sleep time or no?
thanks
mehdi - Thursday, 3. February 2011 at 14:51 |
Hi, did you ever find out how to do this? I’m trying to do the same thing.
Richard - Thursday, 8. September 2011 at 16:00 |
hi, me, too. I am also trying to reduce energy consumption .
Now, I want to know operation of mac trace file. It is a difficult for me now. please help me.
susuhlaing - Thursday, 31. January 2013 at 10:13
i hv found energy consumption of every node. first of all tell me ur trace file format. then i can help u
adil - Sunday, 10. February 2013 at 21:11
no
adil - Sunday, 10. February 2013 at 21:20 |
nic epost
srinivas - Saturday, 11. June 2011 at 20:39 |
I have started working with NS2 and using ns-2.34. So I need help from others.
Mohammed Abusafi - Thursday, 19. January 2012 at 9:36 |
hi, i am using ns2.35 in ubuntu for first time, can anyone tell me please how to turn on energy trace and how can i see the energy trace file, i dont know about command
adil - Monday, 10. December 2012 at 20:22 |
hi sir.
i am facing error when i generate xgraph from trace(.tr) file like this
Error in file ‘out.tr’ at line …
unknown line type
problems found with input data.
please sir give me solution it is very important to me.
pradeep.vanparia@gmail.com
pradip vanparia - Wednesday, 26. June 2013 at 13:30 |
Hi,
Can you help me understand ns-2 energy model. Which parameter I have to analyze? And how I can do that ?
mazhar hossain - Sunday, 17. November 2013 at 21:21 |