LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-14-2013, 01:20 PM   #1
ines8989
Member
 
Registered: Mar 2013
Posts: 62

Rep: Reputation: Disabled
Script awk for wireless-wired toplogy with ns2


Hi .i simulated a tcp tcl script for both wired-wireless communication with ns2. I'am newer with awk script .I want to have sripts to plot variation of sending rate and loss rate with time for my script . I have tested some scripts but i did'nt acheive to have successful one with my wired-wireless topology . Please help me with a little script . please .
in the attachement is my script tcl that i have used .
Thanks for you i really need your help.
Attached Files
File Type: txt tcp-wireless-wired.tcl.txt (7.2 KB, 212 views)

Last edited by ines8989; 05-14-2013 at 02:04 PM. Reason: attachement not downloaded
 
Old 05-15-2013, 04:40 AM   #2
ines8989
Member
 
Registered: Mar 2013
Posts: 62

Original Poster
Rep: Reputation: Disabled
Script awk for wireless-wired toplogy with ns2

Hi i wait for your reply please .Thanks for you
 
Old 05-15-2013, 09:10 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
May be you can find something with : Google .. ns2 awk sending rate and loss rate ..

The first hit is "@Mohit P. Tahiliani", who also has other pages with awk scripts
> http://mohittahiliani.blogspot.dk/20...n-ns-2_06.html

Some of the other scripts from Mohit P. Tahiliani :
http://mohittahiliani.blogspot.dk/20...t-for-ns2.html
http://mohittahiliani.blogspot.dk/20...n-ns-2_06.html
http://mohit.ueuo.com/AWK_Scripts.html
 
Old 05-15-2013, 11:59 AM   #4
ines8989
Member
 
Registered: Mar 2013
Posts: 62

Original Poster
Rep: Reputation: Disabled
Script awk for wireless-wired toplogy with ns2

Thanks for your reply . i have tested this script from the lists of links that you have sent for me .
This script schow me the nomber of packets sent how can i change to have the sending rate please ?
Code:
BEGIN {

count = 0;

}

{

action = $1;

time = $2;

node_id = $3;

layer = $4;

flags = $5;

seqno = $6;

type = $7;

size = $8;

a = $9;

b = $10;

c = $11;

d = $12;

energy = $14;

for(seqno = 0; seqno < 68; seqno++) {

if((node_id = "_0_" && action == "s" && layer == "AGT" && type == "cbr" && size >= 1000) || (node_id = "_1_" && action == "s" && layer == "AGT" && type == "cbr" && size >= 1000) || (node_id = "_2_" && layer == "AGT" && action == "s" && type == "cbr" && size >= 1000) || (node_id = "_3_" && action == "s" && layer == "AGT" && type == "cbr" && size >= 1000) || (node_id = "_5_" && action == "s" && layer == "AGT" && type == "cbr" && size >= 1000) || (node_id = "_6_" && action == "s" && layer == "AGT" && type == "cbr" && size >= 1000)) {

count++;

}

}

}

END {
printf("%d\n",count);
}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me NS2 Programming : AWK script error ns-2_learning Linux - Newbie 2 02-17-2014 09:59 AM
Errors while using awk script for calculating average end to end delay in ns2 NS2User2012 Linux - Networking 4 02-17-2013 11:20 AM
i am trying to run wireless2.tcl script used for wired cum wireless network pooja lohia Linux - Wireless Networking 0 06-15-2012 03:36 AM
ns2-how to use Diffserv in wireless-cum-wired networks robina Linux - Networking 0 03-03-2012 11:44 PM
Wireless Laptop to Wired ethernet via Linux PC (wired/wireless) sambartle Linux - Wireless Networking 0 01-30-2005 04:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration