network-programmingsimulationomnet++inetpacket-loss

How to get PacketLoss(%), throughput, E2E delay statistics in OMNET++?


I have tried @statistic[nameOfStatistic] for PacketLoss but still it doesn't come up in .anf.How to calculate it? I am unable to find enough information on this. Please help!

Which module filter or result name filter should I use to get the required result i.e., PacketLoss throughput and E2E delay (all these for each node respectively)?

I have gone through stackoverflow, documentations/manuals, and google groups.

Thank you.

packet type: UDP Traffic Type: Video Streaming OMNET version:6.0.1 INET version: 4.5 NED file code and .ini code as below:

.NED file:

mport inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.ethernet.EthernetSwitch;
import inet.node.inet.StandardHost;
import inet.node.inet.WirelessHost;
import inet.node.wireless.AccessPoint;
import inet.physicallayer.wireless.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.visualizer.common.IntegratedVisualizer;
import ned.DatarateChannel;
//WIRED-SCENARIO
network GiB
{
    parameters:
        @display("bgb=1986.9299,976.53595");
        @statistic[endToendDelay](title="end-to-end delay"; source="messageAge(rcvdPk)"; unit=s; record=vector);
        @statistic[throughput](title="throughput"; unit=bps; source="throughput(rcvdPk)"; record=vector);
   
        int numHosts;
        int numWHosts;
    types:
        channel Ether1000m extends DatarateChannel
        {
            datarate = 1000Mbps;
            delay = 0.1us;
        }
    submodules:
        standardHost[numHosts]: StandardHost;
        standardHost1[numHosts]: StandardHost;
        server: StandardHost {
            @display("p=985.446,69.498;i=device/server");
        }
        configurator: Ipv4NetworkConfigurator {
            @display("p=263.675,820.875");
        }
        centerSwitch: EthernetSwitch {
            @display("p=985.446,276.21");
        }
        ethernetSwitch1: EthernetSwitch {
            @display("p=518.562,441.936");
        }
        ethernetSwitch2: EthernetSwitch {
            @display("p=760.914,488.26797");
        }
        wirelessHost[numWHosts]: WirelessHost {
            @display("p=265.518,185.328");
        }
        wirelessHost1[numWHosts]: WirelessHost {
            @display("p=115.829994,367.09198");
        }
        accessPoint: AccessPoint {
            @display("p=504.306,276.21");
        }
        accessPoint1: AccessPoint {
            @display("p=311.85,422.33398");
        }
        radioMedium: Ieee80211ScalarRadioMedium {
            @display("p=450.2375,818.3875");
        }
        visualizer: IntegratedVisualizer {
            @display("p=114.424995,820.875");
        }
        ethernetSwitch3: EthernetSwitch {
            @display("p=1044.252,497.17798");
        }
        ethernetSwitch4: EthernetSwitch {
            @display("p=1309.77,506.08798");
        }
        ethernetSwitch5: EthernetSwitch {
            @display("p=1564.596,543.51");
        }
        standardHost2[numHosts]: StandardHost;
        standardHost3[numHosts]: StandardHost;
        standardHost4[numHosts]: StandardHost;
    connections:
        server.ethg++ <--> Ether1000m <--> centerSwitch.ethg++;
        ethernetSwitch1.ethg++ <--> Ether1000m <--> centerSwitch.ethg++;
        ethernetSwitch2.ethg++ <--> Ether1000m <--> centerSwitch.ethg++;
        centerSwitch.ethg++ <--> Ether1000m <--> ethernetSwitch3.ethg++;
        centerSwitch.ethg++ <--> Ether1000m <--> ethernetSwitch4.ethg++;
        centerSwitch.ethg++ <--> Ether1000m <--> ethernetSwitch5.ethg++;
        for i=0..numHosts-1 {
            ethernetSwitch1.ethg++ <--> Ether1000m <--> standardHost[i].ethg++;
            standardHost1[i].ethg++ <--> Ether1000m <--> ethernetSwitch2.ethg++;
            ethernetSwitch3.ethg++ <--> Ether1000m <--> standardHost2[i].ethg++;
            ethernetSwitch4.ethg++ <--> Ether1000m <--> standardHost3[i].ethg++;
            ethernetSwitch5.ethg++ <--> Ether1000m <--> standardHost4[i].ethg++;
        }
        ethernetSwitch1.ethg++ <--> Ether1000m <--> accessPoint1.ethg++;
        ethernetSwitch2.ethg++ <--> Ether1000m <--> accessPoint.ethg++;


}

.ini file code:

[General]
network = GiB
sim-time-limit = 3600s

#**.numHosts = ${5..25 step 10}
**.numHosts = ask
**.numWHosts = ask

**.channel.throughput.statistic-recording = true
**.channel.throughput.result-recording-modes = all
**.*.vector-recording = true
**.*.vector-recording-intervals = 0..900
**.*.scalar-recording = true

**.standardHost[*].numApps = 1
**.standardHost[*].app[*].typename = "UdpVideoStreamClient"
**.standardHost[*].app[*].serverAddress = "server"
**.standardHost[*].app[*].serverPort = 1000

**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 800m
**.constraintAreaMaxY = 500m
**.constraintAreaMaxZ = 0m


**.standardHost1[*].numApps = 1
**.standardHost1[*].app[*].typename = "UdpVideoStreamClient"
**.standardHost1[*].app[*].serverAddress = "server"
**.standardHost1[*].app[*].serverPort = 1000

**.standardHost2[*].numApps = 1
**.standardHost2[*].app[*].typename = "UdpVideoStreamClient"
**.standardHost2[*].app[*].serverAddress = "server"
**.standardHost2[*].app[*].serverPort = 1000

**.standardHost3[*].numApps = 1
**.standardHost3[*].app[*].typename = "UdpVideoStreamClient"
**.standardHost3[*].app[*].serverAddress = "server"
**.standardHost3[*].app[*].serverPort = 1000

**.standardHost4[*].numApps = 1
**.standardHost4[*].app[*].typename = "UdpVideoStreamClient"
**.standardHost4[*].app[*].serverAddress = "server"
**.standardHost4[*].app[*].serverPort = 1000

**.server.numApps = 1
**.server.app[*].typename = "UdpVideoStreamServer"
**.server.app[*].localPort = 1000
**.server.app[*].sendInterval = 0.001s
**.server.app[*].packetLen = 1400B
**.server.app[*].videoSize = 1Gb


**.addDefaultRoutes = false

#Assigning SSID to access point and configuring wireless hosts

*.accessPoint.numApps = 1
*.accessPoint.numWlanInterfaces = default
*.accessPoint.wlan[*].mgmt.ssid = "AP"
*.accessPoint1.numApps = 1
*.accessPoint1.numWlanInterfaces = default
*.accessPoint1.wlan[*].mgmt.ssid = "AP1"

*.wirelessHost[*].numApps = 1
*.wirelessHost[*].wlan[*].agent.defaultSsid = "AP"
*.wirelessHost[*].app[*].typename = "UdpVideoStreamClient"
*.wirelessHost[*].app[*].serverAddress = "server"
*.wirelessHost[*].app[*].serverPort = 1000

*.wirelessHost1[*].numApps = 1
*.wirelessHost1[*].wlan[*].agent.defaultSsid = "AP1"
*.wirelessHost1[*].app[*].typename = "UdpVideoStreamClient"
*.wirelessHost1[*].app[*].serverAddress = "server"
*.wirelessHost1[*].app[*].serverPort = 1000

Solution

  • I have checked your simulation for:

    numHosts=3
    numWHosts=3
    time of simulation: 36 s
    

    and results do contain specified in your NED statistics, i.e. endToendDelay and throughput.

    To see them:

    You should see recorded vectors:

    enter image description here

    After double click of any row the statistic is plotted, for example:

    enter image description here

    When you set throughput* in the result name filter, you will see statistics for throughput:

    enter image description here

    enter image description here