Measuring throughput for a UDP app

1,275 views
Skip to first unread message

MProkop

unread,
Mar 23, 2011, 8:24:04 PM3/23/11
to omnetpp
Im working with inetmant trying to setup a small VANET. Currently my
nodes contain a simple UDP app, pretty much send messages to a single
node every X seconds. What I want to do is try to measure throughput
to the application. Can anyone suggest an easy way of doing this?

Rudolf Hornig

unread,
Mar 24, 2011, 5:54:12 PM3/24/11
to omn...@googlegroups.com
If your network has DatarateChannels (i.e. ethernet) you can measure the throughput on the channles by enabling the built-in statistics on the DatarateChannlel. Put 

**.channel.throughput.result-recording-modes = all

in your ini file

RUdolf


--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To post to this group, send email to omn...@googlegroups.com.
To unsubscribe from this group, send email to omnetpp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en.


MProkop

unread,
Mar 24, 2011, 8:26:46 PM3/24/11
to omnetpp
I tried putting that in there and I received no extra results in
either my VEC or SCA files. I am fairly new to Omnet so maybe I am
misunderstanding you or maybe I am doing something wrong.

Heres is my NED file for the hosts, maybe this will help....

//
// Wireless-enabled Host
//
module Host
{
parameters:

@display("bgb=424,541");
gates:
input radioIn;

submodules:
//comm_rad: Display;
// display: "p=140,468;i=block/app2";
notificationBoard: NotificationBoard {
parameters:
@display("p=140,462;i=block/control");
}
interfaceTable: InterfaceTable {
parameters:
@display("p=140,326;i=block/table");
}
routingTable: RoutingTable {
parameters:
IPForward = true;
routerId = "";
routingFile = "";
@display("p=60,326;i=block/table");
}
udpapp: UDPBasicApp {
parameters:
@display("i=block/app;p=384,47");
}
udp: UDP {
parameters:
@display("p=384,146;i=block/transport");
}
networkLayer: NetworkLayer {
parameters:
proxyARP = false;
@display("p=304,327;i=block/fork;q=queue");
gates:
ifIn[1];
ifOut[1];
}
wlan: Nic80211 {
parameters:
@display("p=304,461;q=queue;i=block/ifcard");
}
hostAutoConfigurator: HostAutoConfigurator {
@display("p=171,335");
}
traCIMobility: TraCIMobility {
@display("p=47,462");
}
thruputMeter: ThruputMeter {
@display("p=372,250;b=7,7");
}
thruputMeter1: ThruputMeter {
@display("p=277,235;b=7,7");
}
connections allowunconnected:
udp.appOut++ --> udpapp.udpIn;
udp.appIn++ <-- udpapp.udpOut;

networkLayer.udpOut --> udp.ipIn;
networkLayer.udpIn <-- udp.ipOut;

wlan.uppergateOut --> networkLayer.ifIn[0];
wlan.uppergateIn <-- networkLayer.ifOut[0];

radioIn --> wlan.radioIn;




Rudolf Hornig

unread,
Mar 25, 2011, 6:29:16 AM3/25/11
to omn...@googlegroups.com
Ah ok, you are simulating a wireless scenario :) The mentioned line turns on the logging ONLY on DatarateChannels (like ethernet etc.). If you want to measure the thruput inside the module, you have to modify module's ned file and exchange the IdealChannel with DatarateChannel. YOu should have something like this:

       udp.appOut++ --> DatarateChannel --> udpapp.udpIn;

(keep the dataratechannel's paramaeters (delay and datarate) at the default 0)
Rudolf





--

MProkop

unread,
Mar 25, 2011, 5:16:42 PM3/25/11
to omnetpp
Rudolph,

Thank you very much for the advice. I will give it a shot tonight or
tomorrow and let you know how I make out.

Matt

MProkop

unread,
Mar 28, 2011, 9:07:03 PM3/28/11
to omnetpp
I added the following line to my NED file:
udpapp.udpOut --> DatarateChannel --> udp.appIn++;

It seemed to work and I am getting a throughput value! Thanks for the
help. I am probably not looking hard enough at Omnet but do you know
what units that measurement is in? I have a few simulations running at
the moment so I will check when they complete in a little while.

On Mar 25, 6:29 am, Rudolf Hornig <rudolf.hor...@gmail.com> wrote:

Bozicni Vod

unread,
Mar 29, 2011, 3:00:36 AM3/29/11
to omnetpp
May I use this parameter in PPP links? Can you please send me an
example for extension of PPP channel called "Link1"?

Thanks!

MProkop

unread,
Mar 30, 2011, 7:40:44 PM3/30/11
to omnetpp
This might work, I am not really sure. All I did was replace the
standard connection between my UDP and Application layers with the
DataRateChannel and it worked. Give it a try and let me know how you
make out!

arie jambulx

unread,
Dec 2, 2016, 5:53:01 AM12/2/16
to omn...@googlegroups.com
hello, can you help me, to show  throughput chanel  on Vector?
because if i use 

**.channel.throughput.result-recording-modes = all
 just only  Scalar. thanks

Wian Virgi

unread,
Jan 17, 2017, 2:06:10 AM1/17/17
to OMNeT++ Users
Mr.Rudolf

How if I get error in NED NA_AdhocHost.NED not in StandartHost.NED?

        networkLayer.igmpOut --> thruputMeter_rx.in;
        networkLayer.igmpIn <-- thruputMeter_tx.out;
can you help me why I have error??

Thanks you before...

this is my NED I used for thuruput meter
package nesg.netattacks.nodes;


import nesg.netattacks.nodes.NA_
WirelessHost;
import inet.networklayer.IManetRouting;
import nesg.netattacks.attacks.controllers.NA_Attack;
import nesg.netattacks.attacks.controllers.delayAttack.NA_DelayAttack;
import nesg.netattacks.attacks.controllers.droppingAttack.NA_DroppingAttack;
import nesg.netattacks.attacks.controllers.sinkholeAttack.NA_SinkholeAttack;
//import inet.networklayer.IManetRouting;
import inet.util.ThruputMeter;
import inet.util.ThruputMeteringChannel;
//
// Wireless ad hoc host. Modificated from WirelessHost module.
// Redefined from INET framework and used as normal host.
//
// It is used as a simple AdhocHost like in INET framework. These hosts never
// behaves as attacker host. The only differente regards AdhocHost is that in
// this case they are using the MA framework arquitecture.
//
// @see AdhocHost, WirelessHost
//
// @author Gabriel Maciá Fernández, gma...@ugr.es
// @date 01/22/2013
module NA_AdhocHost extends NA_WirelessHost
{
    parameters:
        @display("i=device/cellphone,white;bgb=803,448;i2=status/green");
        wlan[*].mgmtType = default("Ieee80211MgmtAdhoc");  // use adhoc management
        string routingProtocol @enum("AODVUU","DYMOUM","DYMO","DSRUU","OLSR","OLSR_ETX","DSDV_2","Batman") = default("AODVUU");
        IPForward = default(true);

    submodules:
        manetrouting: <routingProtocol> like IManetRouting if routingProtocol != "" {
            @display("p=522,307");
        }
    connections:
        //networkLayer.manetOut --> manetrouting.from_ip if routingProtocol != "";
        //networkLayer.manetIn <-- manetrouting.to_ip if routingProtocol != "";
      
        networkLayer.manetOut --> manetrouting.from_ip if routingProtocol != "";
        networkLayer.manetIn <-- manetrouting.to_ip if routingProtocol != "";
        udp.ipOut --> thruputMeter_tx.in;
        udp.ipIn <-- thruputMeter_rx.out;

        for i=0..numTcpApps-1 {
            tcpApp[i].tcpOut --> tcp.appIn++;
            tcpApp[i].tcpIn <-- tcp.appOut++;
        }

        thruputMeter_tx.out --> networkLayer.manetIn if hasTcp;
        thruputMeter_rx.in <-- networkLayer.manetOut if hasTcp;
        networkLayer.ifOut++ --> thruputMeter_rx.in;
        networkLayer.ifIn++ <-- thruputMeter_tx.out;
        networkLayer.igmpOut --> thruputMeter_rx.in;
        networkLayer.igmpIn <-- thruputMeter_tx.out;
}

serap bakioglu

unread,
Dec 10, 2018, 7:12:29 AM12/10/18
to OMNeT++ Users
That was an amazing advice thank you so much.

I have some problems on showing performance metrics

1- ın rip, ospf example files, I want to get end-to-end delay, throughput like basically performance metrics.
But in rip/simpletest I saw e-t-e delay. However I could not get e-t-e delay in rip/dynamictest.

2- in ospf, in fulltest file, I got e-t-e- delay bur in simple test I did not.

I am very confused.
Please help.

24 Mart 2011 Perşembe 23:54:12 UTC+2 tarihinde Rudolf Hornig yazdı:
Reply all
Reply to author
Forward
0 new messages