awk in NS-3 and Calculate the average queue length ,average End to End delay,control traffic and over head or data traffic for a manet.

373 views
Skip to first unread message

Elisa Aslanian

unread,
May 27, 2016, 11:02:41 AM5/27/16
to ns-3-users
hello 
 i should Calculate the average queue length ,average End to End delay,control traffic and over head or data traffic for a manet.
 how should i do this with .tr files?
 is the awk file in ns3 as same as ns2?
i have calculated the average end to end delay with below code with flowmonitor is it right?

   monitor->CheckForLostPackets ();
   Ptr<Ipv4FlowClassifier> classifier = DynamicCast<Ipv4FlowClassifier>     (flowmon.GetClassifier ());
   std::map<FlowId, FlowMonitor::FlowStats> stats = monitor->GetFlowStats ();

for (std::map<FlowId, FlowMonitor::FlowStats>::const_iterator iter = stats.begin(); iter!= stats.end(); ++iter)
  {
  Ipv4FlowClassifier::FiveTuple t = classifier->FindFlow (iter->first);

total_RxPackets = total_RxPackets + iter->second.rxPackets ;
total_DelaySum =total_DelaySum + iter->second.delaySum.GetSeconds() ;
  }

  EndtoEndDelay =  total_DelaySum /total_RxPackets 

due to shortage of time,I need your urgent guidance to help me calculate this parameters.
Thanks in advance for your kind cooperation.

Konstantinos

unread,
May 27, 2016, 11:21:42 AM5/27/16
to ns-3-users
Hi Elisa,

- Not all of the required metrics can be extracted from the trace file*.
- How? Analysing it. The AWK file from NS-2 will not do the work, because the trace files are completely different, however, if you understand one, you can implement the other.
- Potentially yes, but it will depend on your traffic. You need to understand the limitations/scope of FlowMonitor and what types of traffic it can classify; hence provide statistics.
- Due to being a Friday and especially one before a long weekend, do not expect immediate replies... people volunteer to the ns-3-users list, they are not paid, so I would expect to have a beer first and then answer your questions! If you do not have enough time, that's your problem because you did not manage it properly to learn the tool intime. 

Regards,
K.

(*I assume the ASCII auto-generated trace files, because you can generate your own trace files and have anything you like inside.)

Elisa Aslanian

unread,
May 27, 2016, 11:32:23 AM5/27/16
to ns-3-users
thanks a lot for your guidance 

Mahsa Omidrahmat

unread,
Jan 28, 2018, 4:05:33 PM1/28/18
to ns-3-users
سلام

...من دقیقا مثل شما در مرحله ایجاد ترافیک و مانیتور هستم.
امکانش هست به من بگید نهایتا از چه روشی استفاده کردید؟
Reply all
Reply to author
Forward
0 new messages