output from ns3 examples

56 views
Skip to first unread message

hanene

unread,
Apr 8, 2018, 3:27:18 PM4/8/18
to ns-3-users
hi,

i'm trying to find how to collect statistics (PDR, PACKETLOSS,E2E DELAY) from some ns3 examples but till now (after reading some discussions) i cannot understand from where can i get them??

ps: i have added flowmonitor code below and get an xml file (attached) but don't know how to deduce results (since packet loss is always = 0) is that normal?

Ptr<FlowMonitor> flowMonitor;
  FlowMonitorHelper flowHelper;
  flowMonitor = flowHelper.InstallAll();
  Simulator::Stop (Seconds (m_TotalSimTime));
  AnimationInterface anim("animvanetroutingcomp.xml");
  anim.EnablePacketMetadata (true);
  Simulator::Run ();
  flowMonitor->CheckForLostPackets ();
  flowMonitor->SerializeToXmlFile("results.xml", true, true);
i had also tried with .tr file but cannot interpret results also.

i'm stack since a week i will be thankful if anyone can get me out ^.^" .

results.xml

Konstantinos

unread,
Apr 9, 2018, 4:26:06 AM4/9/18
to ns-3-users
Hi,

This subjects has been discussed several times in the list. 
Using FlowMonitor is one of the recommended methods to collect those statistics.
The analysis can be either post-processed from the XML file (there is a python script that outputs these metrics - see in the ns-3 code) or you can do it within your scenario (again there are examples in the code that do it).

The fact that the dropped packets are always 0, it may depend on your scenario.

Regards
K

hanene

unread,
Apr 9, 2018, 12:42:26 PM4/9/18
to ns-3-users
i have been looking here several times and what i did till know is because of your help (thank you) in other posts but still cannot get how to do this. i've never dealt with python. i'm also using existing scripts here the results are from vanet-routing-compare example.
Reply all
Reply to author
Forward
0 new messages