flow monitor in ns3-dce-mptcp

109 views
Skip to first unread message

tina

unread,
Jan 16, 2017, 1:18:36 PM1/16/17
to ns-3-users
Hi all,

I am trying to use flow monitor in an example of ns3-dce with Linux kernel. when I use :

 "std::string stack = "ns3";"  

 and in the following 


  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);
      NS_LOG_UNCOND("Flow ID: " << iter->first << " Src Addr " << t.sourceAddress << " Dst Addr " << t.destinationAddress);
      NS_LOG_UNCOND("Tx Packets = " << iter->second.txPackets);
      NS_LOG_UNCOND("Rx Packets = " << iter->second.rxPackets);
      
    }
  monitor->SerializeToXmlFile("file.flowmon", true, true);

it is ok and I will receive the result correctly but when I change the stack to 
std::string stack = "linux";
then it is not working and I  receive :

Command ['/home/user/dce/source/ns-3-dce/build/bin/dce-sample'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
in gdb:
#0  0x00000000004179d6 in std::_Rb_tree<unsigned int, std::pair<unsigned int const, ns3::FlowMonitor::FlowStats>, std::_Select1st<std::pair<unsigned int const, ns3::FlowMonitor::FlowStats> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, ns3::FlowMonitor::FlowStats> > >::_M_root (this=0x20)
    at /usr/include/c++/4.8/bits/stl_tree.h:482
#1  0x00000000004168b9 in std::_Rb_tree<unsigned int, std::pair<unsigned int const, ns3::FlowMonitor::FlowStats>, std::_Select1st<std::pair<unsigned int const, ns3::FlowMonitor::FlowStats> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, ns3::FlowMonitor::FlowStats> > >::_Rb_tree (
    this=0x7fffffffd4d0, __x=...) at /usr/include/c++/4.8/bits/stl_tree.h:657
#2  0x0000000000415879 in std::map<unsigned int, ns3::FlowMonitor::FlowStats, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, ns3::FlowMonitor::FlowStats> > >::map (this=0x7fffffffd4d0, 
    __x=<error reading variable: Cannot access memory at address 0x48>)
    at /usr/include/c++/4.8/bits/stl_map.h:181
#3  0x0000000000413abc in main (argc=2, argv=0x7fffffffd798)
    at ../example/dce-sample.cc:251


Could you please tell me is it possible to use flowmonitor with linux stack or not? if it is not possible is there any other way to monitor the links? do you have any example that i can use?

Thanks in advance

Tommaso Pecorella

unread,
Jan 16, 2017, 6:40:51 PM1/16/17
to ns-3-users
No, FlowMonitor is not compatible with DCE because it can not access the probes on different nodes (because they're different linux stacks).

You can monitor the links through "normal" data collection facilities or by using the tools you'd use with a normal Linux host (e.g., Iperf, etc.).

T.

tina

unread,
Jan 19, 2017, 1:55:40 PM1/19/17
to ns-3-users

Hi Tommaso,

Thanks for your always guide and supports.

Could you please explain me with more details?


 I have an application that is running over DCE and mptcp linux kernel.
There are only two nodes 0 and 1.  They are connected with two pointtopoint channels. a file is transferring ( around 200 MB) from node 0 to node 1 over mptcp. So, i have this assumption that both links have to work simultaneously. I checked the pcaps and i saw only 58 KB captured on each of 0-0 , 0-1, 1-0 and 1-1. I checked the trace file and there are only few lines
 that contain "DeviceList/1/" just in  ns3::PppHeader. I think that "DeviceList/1" refers to the interface 1. So, does it mean that the second channel is not working?


              ................................
         .                                      .
       .                                            .
node 0                                      node1
       .                                             .
         .                                        .
            .....................................


In the first step i need a way to know all channels are working?
and then  I wish to know packet lost, throughput, jitter, goodput and other statistics of each path. 


Thanks in advance.
Reply all
Reply to author
Forward
0 new messages