Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8165561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:34:28+00:00 2026-06-06T19:34:28+00:00

My senario in NS 2.29 has 5 nodes which each node has 2 interfaces

  • 0

enter image description here
My senario in NS 2.29 has 5 nodes which each node has 2 interfaces to expect node 0 and node 4 and node 0 wants to send packet to node 4. The protocol I’ve used is AODV and type of nodes is wireless

I want to calculate

receive packet / send packet

and also throughput in different simulation time and I want to do all with AWK language.

I dont know how to share output file to undrestand what I said.

output file :

s -t 0.100000000 -Hs 0 -Hd -2 -Ni 0 -Nx 0.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl AGT -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.0 -Id 4.0 -It cbr -Il 1000 -If 1 -Ii 0 -Iv 32 -Pn cbr -Pi 0 -Pf 0 -Po 0 

r -t 0.100000000 -Hs 0 -Hd -2 -Ni 0 -Nx 0.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.0 -Id 4.0 -It cbr -Il 1000 -If 1 -Ii 0 -Iv 32 -Pn cbr -Pi 0 -Pf 0 -Po 0 

s 0.100000000 _0_ RTR  --- 0 AODV 48 [0 0 0 0] ------- [0:255 -1:255 30 0] [0x2 1 1 [4 0] [0 4]] (REQUEST)

s -t 0.100295000 -Hs 0 -Hd -2 -Ni 0 -Nx 0.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md ffffffff -Ms 0 -Mt 800 -Is 0.255 -Id -1.255 -It AODV -Il 100 -If 0 -Ii 0 -Iv 30 -P aodv -Pt 0x2 -Ph 1 -Pb 1 -Pd 4 -Pds 0 -Ps 0 -Pss 4 -Pc REQUEST 

r -t 0.101095133 -Hs 1 -Hd -2 -Ni 1 -Nx 40.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md ffffffff -Ms 0 -Mt 800 -Is 0.255 -Id -1.255 -It AODV -Il 48 -If 0 -Ii 0 -Iv 30 -P aodv -Pt 0x2 -Ph 1 -Pb 1 -Pd 4 -Pds 0 -Ps 0 -Pss 4 -Pc REQUEST 

r -t 0.101120133 -Hs 1 -Hd -2 -Ni 1 -Nx 40.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md ffffffff -Ms 0 -Mt 800 -Is 0.255 -Id -1.255 -It AODV -Il 48 -If 0 -Ii 0 -Iv 30 -P aodv -Pt 0x2 -Ph 1 -Pb 1 -Pd 4 -Pds 0 -Ps 0 -Pss 4 -Pc REQUEST 

s 0.102001360 _1_ RTR  --- 0 AODV 48 [0 ffffffff 0 800] ------- [1:255 -1:255 29 0] [0x2 2 1 [4 0] [0 4]] (REQUEST)

s -t 0.102476360 -Hs 1 -Hd -2 -Ni 1 -Nx 40.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md ffffffff -Ms 1 -Mt 800 -Is 1.255 -Id -1.255 -It AODV -Il 100 -If 0 -Ii 0 -Iv 29 -P aodv -Pt 0x2 -Ph 2 -Pb 1 -Pd 4 -Pds 0 -Ps 0 -Pss 4 -Pc REQUEST 

r -t 0.103276493 -Hs 0 -Hd -2 -Ni 0 -Nx 0.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md ffffffff -Ms 1 -Mt 800 -Is 1.255 -Id -1.255 -It AODV -Il 48 -If 0 -Ii 0 -Iv 29 -P aodv -Pt 0x2 -Ph 2 -Pb 1 -Pd 4 -Pds 0 -Ps 0 -Pss 4 -Pc REQUEST 

r -t 0.103301493 -Hs 0 -Hd -2 -Ni 0 -Nx 0.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md ffffffff -Ms 1 -Mt 800 -Is 1.255 -Id -1.255 -It AODV -Il 48 -If 0 -Ii 0 -Iv 29 -P aodv -Pt 0x2 -Ph 2 -Pb 1 -Pd 4 -Pds 0 -Ps 0 -Pss 4 -Pc REQUEST 

s 0.105531867 _1_ RTR  --- 0 AODV 48 [0 ffffffff 0 800] ------- [1:255 -1:255 29 0] [0x2 2 1 [4 0] [0 4]] (REQUEST)

s -t 0.105786867 -Hs 1 -Hd -2 -Ni 1 -Nx 40.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md ffffffff -Ms 2 -Mt 800 -Is 1.255 -Id -1.255 -It AODV -Il 100 -If 0 -Ii 0 -Iv 29 -P aodv -Pt 0x2 -Ph 2 -Pb 1 -Pd 4 -Pds 0 -Ps 0 -Pss 4 -Pc REQUEST 

r -t 0.106587000 -Hs 2 -Hd -2 -Ni 2 -Nx 80.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md ffffffff -Ms 2 -Mt 800 -Is 1.255 -Id -1.255 -It AODV -Il 48 -If 0 -Ii 0 -Iv 29 -P aodv -Pt 0x2 -Ph 2 -Pb 1 -Pd 4 -Pds 0 -Ps 0 -Pss 4 -Pc REQUEST 

r -t 0.106612000 -Hs 2 -Hd -2 -Ni 2 -Nx 80.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md ffffffff -Ms 2 -Mt 800 -Is 1.255 -Id -1.255 -It AODV -Il 48 -If 0 -Ii 0 -Iv 29 -P aodv -Pt 0x2 -Ph 2 -Pb 1 -Pd 4 -Pds 0 -Ps 0 -Pss 4 -Pc REQUEST 

s 0.109702791 _2_ RTR  --- 0 AODV 48 [0 ffffffff 2 800] ------- [2:255 -1:255 28 0] [0x2 3 1 [4 0] [0 4]] (REQUEST)

s -t 0.110077791 -Hs 2 -Hd -2 -Ni 2 -Nx 80.00 -Ny 500.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md ffffffff -Ms 4 -Mt 800 -Is 2.255 -Id -1.255 -It AODV -Il 100 -If 0 -Ii 0 -Iv 28 -P aodv -Pt 0x2 -Ph 3 -Pb 1 -Pd 4 -Pds 0 -Ps 0 -Pss 4 -Pc REQUEST 

….

to be continue

Can anybody explain how can I do this?
Any answer will be very helpfull.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:34:31+00:00Added an answer on June 6, 2026 at 7:34 pm

    Let’s say you have the following two data lines which consist of a timestamp and a number of bytes sent during the time interval ending with that timestamp:

    s 1341227109 10010
    r 1341227111 19115
    s 1341227118 12345
    r 1341227122 16773
    

    This snippet would calculate the throughput during the time interval between the two events:

    awk '! sprev && $1 == "s" {sprev = $2; next} $1 == "s" {sinterval = $2 - sprev; sthroughput = $2 / sinterval; print sthroughput, "sent bytes/second"}' inputfile
    

    add similar blocks for received data. You can use arrays to track node to node communication separately if needed.

    Issues to be addressed:

    • Do you want to output throughput for each interval? Probably not. Is it good enough to use the first and last event only? Do you want to do some sort of moving calculation taking some number of events or larger segements of time?
    • Are there different types of events that need to be accounted separately?
    • Is there data to be ignored or used in setup?

    It looks to me that the more natural choice for processing NS2 data might be TCL since it appears to be used within the package and there may be APIs that you can take advantage of. However, AWK is perfectly suited for processing tabular data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have senario in which one view and view has binding with multiple ViewModel.
I've written some MPI code which works flawlessly on large clusters. Each node in
Hi I have senario where i need to update the MySQL table which has
In my senario, I have a global setting object, say GlobalSettings, it has a
I have an orchestration which is receiving messages from the message box of type
I've got a system that processes some large CSV files. The scenario has now
Obfuscated Scenario : A person has zero, one or many pets. Using Linq to
SCENARIO: Given that a model called Edition has its community feature enabled I want
Scenario: I have a view that has some DataTemplate resources <DataTemplate x:Key=myDragCueTemplate> <Border Background=Blue
Scenario I have a C# windows forms application that has a number of processes.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.