Skip to first unread message

Daniel Oliva Domingues

unread,
Nov 15, 2016, 4:54:49 PM11/15/16
to ns-3-users
Hello,

I've implemented a routing comparison simulation and now I would like to develop a way to collect simulation results and then to calculate some performance metrics.

The results that I want to collect are:
- Each data packet delay;
- Number of data packets received;
- Number of data packets transmitted;
- Each data packet transfer throughput;
- Number of data packet transfers;
- Number of routing packets transmitted;
- Number of total packets transmitted;
- Amount of energy at the beginning of simulation;
- Amount of energy at the end of simulation.

Can you please give me a clue about how can I collect these data?

Many thanks.

Regards,

Daniel

Tommaso Pecorella

unread,
Nov 17, 2016, 7:19:34 PM11/17/16
to ns-3-users
HiDaniel,

please read the manual sections about FlowMonitor and Data Collection. Both should be useful for you.

Have fun,

T.

Daniel Oliva Domingues

unread,
Dec 19, 2016, 5:51:39 PM12/19/16
to ns-3-users
Hi Tommaso,

I've been studying FlowMonitor and it did solve my problems of collecting some statistics. However I didn't manage to find a way to measure all packets transmitted by eatch node (I mean, routing packets, ARP, etc, FlowMonitor only monitors the flow  that I have defined). Do you have any clue about how can I do that?

PS: My idea is to measure routing overhead, using a formula like that one: Total routing packets transmitted / Total packets transmitted.

Many thanks.

Regards,

Daniel

Tommaso Pecorella

unread,
Dec 24, 2016, 7:56:43 PM12/24/16
to ns-3-users
Hi Daniel,

I think that the only way is to hook to a trace source below the IP level. In this way you'll be able to count all the transmitted packets.

Cheers,

T.

Daniel Oliva Domingues

unread,
Dec 28, 2016, 8:44:10 PM12/28/16
to ns-3-users
Hi Tommasso,

First of all, I hope you had a nice Chrismas.

Thanks for the idea. I will try to do that if my comments below doesn't make sense.

Just to explain to you, I'm simulating an Hybrid Mesh Network, where client nodes send packets to a sink node and router nodes just foward that traffic. Client nodes can also forward another clients traffic.

I've been working with FlowMonitor to extract the statistics that I need and I did succeed fortunately. When printing each flow statistics I have noticed that there are flows established from a client to a router, from a router to sink, and from a client to sink). Since I'm interested on monitor client to sink communication, I have done an IF clause to filter that output using the destination port from OnOff Application traffic generator. My doubt is about the other flows (router to sink and client to router). Aren't they the "routing packets" that I have mentioned before?

Another question that I will ask for your help please is about a way to obtain samples of the simulation statistics during specific time intervals (for example each 5 seconds). I need this to be able to plot all this information in a graphic to show the statistics evolution during the simulation sime. Do you have any clue about how can I do that? At this moment I'm only able to obtain global execution statistics.

The last question is related to HWMP simulation. Every time I use this protocol in my scenario the statistics for each flow report that every flow was transmited using 1 hop only. If I simulate the same scenario with AODV or OLSR, the statistics correctly shows that some flows were transmited using 2 hops, others 3 hops, others 1 hop, and so on. Do you have any idea about this strange behavior of HWMP?

Many thanks for your help.

Regards,

Daniel Domingues

Tommaso Pecorella

unread,
Jan 2, 2017, 9:33:52 PM1/2/17
to ns-3-users
Hi Daniel,

answers in-line.


On Thursday, December 29, 2016 at 2:44:10 AM UTC+1, Daniel Oliva Domingues wrote:
Hi Tommasso,

First of all, I hope you had a nice Chrismas.

Wonderful one, thanks. I hope you had a nice one as well. 
 
Thanks for the idea. I will try to do that if my comments below doesn't make sense.

Just to explain to you, I'm simulating an Hybrid Mesh Network, where client nodes send packets to a sink node and router nodes just foward that traffic. Client nodes can also forward another clients traffic.

I've been working with FlowMonitor to extract the statistics that I need and I did succeed fortunately. When printing each flow statistics I have noticed that there are flows established from a client to a router, from a router to sink, and from a client to sink). Since I'm interested on monitor client to sink communication, I have done an IF clause to filter that output using the destination port from OnOff Application traffic generator. My doubt is about the other flows (router to sink and client to router). Aren't they the "routing packets" that I have mentioned before?

No idea. However you should be able to filter the routing packets by their destination ports.

Another question that I will ask for your help please is about a way to obtain samples of the simulation statistics during specific time intervals (for example each 5 seconds). I need this to be able to plot all this information in a graphic to show the statistics evolution during the simulation sime. Do you have any clue about how can I do that? At this moment I'm only able to obtain global execution statistics.

This has been discussed in the past in the group.
 
The last question is related to HWMP simulation. Every time I use this protocol in my scenario the statistics for each flow report that every flow was transmited using 1 hop only. If I simulate the same scenario with AODV or OLSR, the statistics correctly shows that some flows were transmited using 2 hops, others 3 hops, others 1 hop, and so on. Do you have any idea about this strange behavior of HWMP?

HWMP is a mesh-under routing protocol. In other terms, it does its work at MAC level. IP will see the whole network as a single hop one.

Cheers,

T.

Daniel Oliva Domingues

unread,
Feb 23, 2017, 8:25:50 PM2/23/17
to ns-3-users
Hi Tommasso,

Sorry for the delay answering. I did manage to implement statistics by regular intervals using a function like that:

Simulator::Schedule (Seconds (1.0), &HybridMesh::SimulationReport, this);

Thanks for your usual help.

Regards,

Daniel
Reply all
Reply to author
Forward
0 new messages