How to CastaliaPlot for delay and packet loss for each node

197 views
Skip to first unread message

Zin Win

unread,
May 25, 2017, 1:04:45 AM5/25/17
to Castalia Simulator

Hello, all

I would like to draw for delay, energy and number of packets loss for each node in CastaliaPlot.
For energy, I get output that I want. But I do not know how to plot for latency and packet lost.

In my simulation, I use Castalia 3.2 for implementing MAC protocol. Actually, I want to analyze the performance of my MAC protocol for each node in different network topology.

I want to plot with end to end latency in y axis vs each node in x axis for both single hop topology and multihop topology.
For packet loss, I want to calculate the difference the number of recieved packets and sent packets. May I know Where can I do this?

When I plot energy and latency, I got as in attach files. So, Please suggest me How to plot for these graphs in CastaliaPlot?

Thank you in advance.

Best Regards,
Zin Win
energyhistogram.png
latencyhistogram.png

Thanassis Boulis

unread,
Jun 4, 2017, 2:47:40 AM6/4/17
to Castalia Simulator
You have to provide the exact commands you type. Also it would be good to have your output file.

In general, latency is given as a histogram, so it would be difficult to draw all the latency histograms of all nodes in a graph, unless you do your own custom graph. Maybe there is an average latency recorded as an output, I do not remember. If you have that, then you can use it with the standard CastaliaPlot tool.

--
You received this message because you are subscribed to the Google Groups "Castalia Simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castalia-simulator+unsub...@googlegroups.com.
To post to this group, send email to castalia-simulator@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/castalia-simulator/4dc96ff6-a59d-450d-ab87-309d592fc99b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zin Win

unread,
Jun 4, 2017, 8:57:16 PM6/4/17
to castalia-...@googlegroups.com
Dear Sir,

Thanks you very much for your reply. What do you mean what is average latency? In my  histogram graph for latency, does it express average latency for all packets received in Sink at Application layer?
How to do for average latency?

If I create my custom graph, How should I do?  Is there references code for creating graph with latency Vs. each node?


May I know where I have to start for this?
Thank you.

Best Regards,
Zin Win


On Sun, Jun 4, 2017 at 1:47 PM, Thanassis Boulis <bou...@gmail.com> wrote:
You have to provide the exact commands you type. Also it would be good to have your output file.

In general, latency is given as a histogram, so it would be difficult to draw all the latency histograms of all nodes in a graph, unless you do your own custom graph. Maybe there is an average latency recorded as an output, I do not remember. If you have that, then you can use it with the standard CastaliaPlot tool.
On 25 May 2017 at 15:04, Zin Win <zinwi...@gmail.com> wrote:

Hello, all

I would like to draw for delay, energy and number of packets loss for each node in CastaliaPlot.
For energy, I get output that I want. But I do not know how to plot for latency and packet lost.

In my simulation, I use Castalia 3.2 for implementing MAC protocol. Actually, I want to analyze the performance of my MAC protocol for each node in different network topology.

I want to plot with end to end latency in y axis vs each node in x axis for both single hop topology and multihop topology.
For packet loss, I want to calculate the difference the number of recieved packets and sent packets. May I know Where can I do this?

When I plot energy and latency, I got as in attach files. So, Please suggest me How to plot for these graphs in CastaliaPlot?

Thank you in advance.

Best Regards,
Zin Win

--
You received this message because you are subscribed to the Google Groups "Castalia Simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castalia-simulator+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Castalia Simulator" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/castalia-simulator/oqEU_W8-2K4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to castalia-simulator+unsub...@googlegroups.com.

To post to this group, send email to castalia-simulator@googlegroups.com.

Thanassis Boulis

unread,
Jun 4, 2017, 10:07:07 PM6/4/17
to Castalia Simulator
On 5 June 2017 at 10:57, Zin Win <zinwi...@gmail.com> wrote:
Dear Sir,

Thanks you very much for your reply. What do you mean what is average latency?
 
Not sure what you are asking. Average latency is just one number, the mean latency. In other words we are taking the latencies of all the packets arriving in a node, and calculate the mean. The histogram, on the other hand,  is a way to show the distribution of all the individual packet latencies and offers much more information than just the average. 
 
In my  histogram graph for latency, does it express average latency for all packets received in Sink at Application layer?
 
How to do for average latency?
Not sure what you ask. If you are uncertain about what a histogram is, or what the average/mean is then google it, there is plenty of educational information online.

I did not remember, whether the average latency was given as an output in Castalia already (in addition to the histogram). I checked briefly and it is not.
 

If I create my custom graph, How should I do?  Is there references code for creating graph with latency Vs. each node?
You create your custom graph any way you can. In excel, in matlab, with gnuplot, with other graphing tools. You will have all the different histogram information for the different nodes, and you can create a 3D graph to include all this info.
 

Zin Win

unread,
Jun 4, 2017, 11:24:08 PM6/4/17
to castalia-...@googlegroups.com
Dear Sir,

 
Thanks you very much for your quick reply. I am more clear than before.  I want to draw custom graph with the results from Castalia.
I would like to know that is:

zin@zin-virtual-machine:~/zwa/Castalia-3.2/Simulations/My2HopScenario$ CastaliaResults -i 170501-073755.txt -s latency -n node
                                                       

Application:Application level latency, in ms
+--------+---------+---------+---------+----------+-----------+-----------+-----------+-----------+-----------+-----------+
| [0,20) | [20,40) | [40,60) | [60,80) | [80,100) | [100,120) | [120,140) | [140,160) | [160,180) | [180,200) | [200,inf) |
+--------+---------+---------+---------+----------+-----------+-----------+-----------+-----------+-----------+-----------+
| 41     | 0       | 0       | 0       | 0        | 0         | 0         | 0         | 0         | 0         | 0         |
+--------+---------+---------+---------+----------+-----------+-----------+-----------+-----------+-----------+-----------+

this result is for which node? I am not clear what does this result mean? In my topology, It has 8 nodes including sink. I want to get all end to end delay from each node (7 nodes) to Sink.
Because I want to compare packet loss and latency of each node(from Source) at destination (to Sink) in both Multihop and Single hop topology.

Thank you very much, Sir,


Best Regards,
Zin Win

--
You received this message because you are subscribed to a topic in the Google Groups "Castalia Simulator" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/castalia-simulator/oqEU_W8-2K4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to castalia-simulator+unsub...@googlegroups.com.
To post to this group, send email to castalia-simulator@googlegroups.com.

Zin Win

unread,
Jun 4, 2017, 11:31:56 PM6/4/17
to castalia-...@googlegroups.com
Sorry, I forget to ask something. If I want to get latency of each node, where I have to change to get the latency result of each node?

For example, if above result is for node 1, and  if I want to get for node 2, How to do for it? something like this..
Do I have to collect the result for each node one by one?



 




 

To unsubscribe from this group and all its topics, send an email to castalia-simulator+unsubscribe@googlegroups.com.

To post to this group, send email to castalia-simulator@googlegroups.com.

Thanassis Boulis

unread,
Jun 28, 2017, 7:59:16 AM6/28/17
to Castalia Simulator
On 5 June 2017 at 13:31, Zin Win <zinwi...@gmail.com> wrote:
Sorry, I forget to ask something. If I want to get latency of each node, where I have to change to get the latency result of each node?

"of each node" can mean a two different things. 
Imagine you have 3 nodes receiving, with nodeIDs 2,3, and 5. Also imagine that these nodes receive from multiple nodes. Node 2 receives from 1 and 4, Node 3 receives from 2,4,6,and 7, while node 5 receives only from node 7.  There could be 7 different histograms here according to the (sender, receiver) pair.

Castalia  keeps histograms for different receivers distinct, BUT it does not distinguish between different senders for one receiver. So if a node receives from multiple nodes, there will be just one histogram. If we have multiple receivers we will keep a histogram for each of them.

To see distinct histograms just use the -n switch. In your example you only have one receiver node, that's why you see only one histogram even after using the -n switch in your command

So if you have multiple receivers, you do not need to do anything special. Just use -n and you will see multiple histograms in the output.
 

Zin Win

unread,
Jun 28, 2017, 10:52:52 PM6/28/17
to castalia-...@googlegroups.com
Dear Thanassis,


Thank you very much for your kind and details reply.. That is the answer that I want to know about histogram. You make me clear.. Thanks.

In my case, I do fix routing for eight nodes in tree structure, node 0 is sink, and node 1 and 2 are at one hop distance from sink.
node 3,4, 5 and 6 are at two hop distance from sink. node 7 is three hop distance from sink. So, node 1 and 2 are relay nodes at first level, and node 3, 4, 5, and 6 are also relay nodes at second level.

If I want to get delay and number of recieved packets at each relay node, and combine it with the results at sink , is it possible?
For getting the results at relay node, Can I use only -n switch for each relay? Then, I will use gnuplot for drawing the result from these values.

The command is :   CastaliaResults -i 170501-073755.txt -s latency -n
                             CastaliaResults -i 170501-073755.txt -s packets -n

This command show only latency at only one node and the lower command show packets recieved at node 1 and 2 only.

It does not include latency and recieved packets for sink node 0 and other relay nodes.. I do not know what is wrong?
So, May I know the command for it?

Because my MAC protocol will be constructed over multihop topology and I need to show the result for end to end delay and packet loss between pair of sender and reciever.


Thank you, sir...

Best Regards,
Zin Win




--
You received this message because you are subscribed to a topic in the Google Groups "Castalia Simulator" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/castalia-simulator/oqEU_W8-2K4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to castalia-simulator+unsub...@googlegroups.com.

To post to this group, send email to castalia-simulator@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages