LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-27-2015, 05:09 AM   #46
rimonece
LQ Newbie
 
Registered: Jun 2015
Location: Perth, WA
Posts: 22

Rep: Reputation: Disabled

Hi knudfl,

Thanks for your reply. tracegraph is running. But, the throughput and delay output (From tracegraph) is not the same (from AWK-http://ns2blogger.blogspot.com.au/p/awk-scripting-on-ns2.html).
Can you tell me any link for proper measurement of throughput,delay for wireless LTE network?
 
Old 08-03-2015, 08:48 AM   #47
babar.hameed
LQ Newbie
 
Registered: Feb 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Hi knudfl,

i want to use(insert) x graph/gnu graph function to view results, in following code that u gave me as lte example.


set ns [new Simulator -multicast on]

set f [open out.tr w]
$ns trace-all $f
set nf [open out.nam w]
$ns namtrace-all $nf

set number 10

set eNB [$ns node]
set aGW [$ns node]
set server [$ns node]

for { set i 0} {$i < $number} {incr i} {

set UE($i) [$ns node]
}


for { set i 0} {$i < $number} {incr i} {
$ns simplex-link $UE($i) $eNB 500Mb 2ms LTEQueue/ULAirQueue
$ns simplex-link $eNB $UE($i) 1Gb 2ms LTEQueue/DLAirQueue

}


$ns simplex-link $eNB $aGW 5Gb 10ms LTEQueue/ULS1Queue
$ns simplex-link $aGW $eNB 5Gb 10ms LTEQueue/DLS1Queue

$ns duplex-link $aGW $server 10Gb 100ms DropTail

set mproto DM
set mrthandle [$ns mrtproto $mproto {}]
set group [Node allocaddr]

for { set i 0 } { $i < $number } {incr i} {
set s0($i) [new Session/RTP]
set s1($i) [new Session/RTP]
$s0($i) session_bw 12.2kb/s
$s1($i) session_bw 12.2kb/s
$s0($i) attach-node $UE($i)
$s1($i) attach-node $server
$ns at 0.7 "$s0($i) join-group $group"
$ns at 0.8 "$s0($i) start"
$ns at 0.9 "$s0($i) transmit 12.2kb/s"
$ns at 1.0 "$s1($i) join-group $group"
$ns at 1.1 "$s1($i) start"
$ns at 1.2 "$s1($i) transmit 12.2kb/s"
}

for { set i 0} {$i < $number} {incr i} {
set udp($i) [new Agent/UDP]
$ns attach-agent $server $udp($i)
set null($i) [new Agent/Null]
$ns attach-agent $UE($i) $null($i)
$ns connect $udp($i) $null($i)
$udp($i) set class_ 1

set cbr($i) [new Application/Traffic/CBR]
$cbr($i) attach-agent $udp($i)
$cbr($i) set packetSize_ 1000
$cbr($i) set rate_ 0.01Mb
$cbr($i) set random_ false
$ns at 1.4 "$cbr($i) start"
}

# step 3.3 define the interactive traffic
$ns rtproto Session
set log [open "http.log" w]

# Care must be taken to make sure that every client sees the same set of pages as the servers to which they are attached.
set pgp [new PagePool/Math]
set tmp [new RandomVariable/Constant] ;# Size generator
$tmp set val_ 10240 ;# average page size
$pgp ranvar-size $tmp
set tmp [new RandomVariable/Exponential] ;# Age generator
$tmp set avg_ 4 ;# average page age
$pgp ranvar-age $tmp

set s [new Http/Server $ns $server]
$s set-page-generator $pgp
$s log $log

set cache [new Http/Cache $ns $aGW]
$cache log $log

for { set i 0} {$i<$number} {incr i} {
set c($i) [new Http/Client $ns $UE($i)]
set ctmp($i) [new RandomVariable/Exponential] ;# Poisson process
$ctmp($i) set avg_ 1 ;# average request interval
$c($i) set-interval-generator $ctmp($i)
$c($i) set-page-generator $pgp
$c($i) log $log
}

$ns at 0.4 "start-connection"
proc start-connection {} {
global ns s cache c number

$cache connect $s
for { set i 0} {$i<$number} {incr i} {
$c($i) connect $cache
$c($i) start-session $cache $s
}
}

for { set i 0} {$i < $number} {incr i} {
set tcp($i) [new Agent/TCP]
$ns attach-agent $server $tcp($i)
set sink($i) [new Agent/TCPSink]
$ns attach-agent $UE($i) $sink($i)
$ns connect $tcp($i) $sink($i)
$tcp($i) set class_ 3
$tcp($i) set packetSize_ 0.5M

set ftp($i) [new Application/FTP]
$ftp($i) attach-agent $tcp($i)
$ns at 3.4 "$ftp($i) start"
}

$ns at 30 "finish"
proc finish {} {
global ns f nf
$ns flush-trace
close $f
close $nf
exec nam out.nam &
exit 0
}

$ns run
 
Old 08-03-2015, 09:24 AM   #48
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
Re #47.

1) Repeat : Please edit post #44 : The 'Edit' button in post #44.

2) Post #47 : Code must be in code tags : [code]code text[/code]
http://www.linuxquestions.org/questi....php?do=bbcode


You can get answers, when you have edited posts #44, #47.


-
 
Old 08-03-2015, 09:46 AM   #49
babar.hameed
LQ Newbie
 
Registered: Feb 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #47.

1) Repeat : Please edit post #44 : The 'Edit' button in post #44.

2) Post #47 : Code must be in code tags : [code]code text[/code]
http://www.linuxquestions.org/questi....php?do=bbcode


You can get answers, when you have edited posts #44, #47.


-
dear knudfl
i have already installed x graph it is also giving results but for particular code that i displayed in post 47.i need changes in that for graphs.
 
Old 09-15-2015, 09:41 AM   #50
babar.hameed
LQ Newbie
 
Registered: Feb 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
dear sir
i could not understand your requirements.what type of editing required
i am going to attach example lte code file in which i want to introduce x graph feature.i attached original "lte.tcl.txt" as well as "lte-xgraph.tcl.txt"

best regards
Attached Files
File Type: txt lte.tcl.txt (3.0 KB, 21 views)
File Type: txt lte-xgraph.tcl.txt (3.7 KB, 26 views)
 
Old 09-15-2015, 10:36 AM   #51
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
Re #50.

You are not supposed to show code as plain text. Don't do that again.
CODE TAGS, see http://www.linuxquestions.org/questi....php?do=bbcode
CODE Tags are : [code]tcl code text[/code]
I.e. type [code] at tcl code start, and [/code] at code end.
? What was problem with finding the 'Edit' button in post #47 ?


About Xgraph files : Please read and run all the default examples in :
xgraph_ns2-files-tcl_24Apr2015.tar.gz https://drive.google.com/file/d/0B7S...ew?usp=sharing
.... and read all the output files from the simulations.


Your file "hameed-lte.tcl" : Works OK. .... EDIT : Is a copy of eyana.tcl
( The name lte.tcl cannot be used. New files must have new unique names.)

Your LTE-Xgraph example : There is no such thing as "bytes" in ns2, AFAIK :
ns: record: can't read "bytes_": no such variable
********* Ref. **********
set bw [$server set bytes_]
$server set bytes_ 0

-

Last edited by knudfl; 09-15-2015 at 02:28 PM.
 
  


Reply

Tags
lte, lte-ns235, ns2



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
LTE Patch for NS-2 Redsfan86 Linux - Software 51 04-22-2014 12:57 AM
Writing for 4G-LTE systemlordanubis Programming 3 03-10-2014 12:15 PM
[SOLVED] patching lte in ns2.33 chandana Linux - Software 19 03-01-2014 12:20 AM
Ns2-lte binteasim Linux - Software 2 07-23-2013 04:43 AM
install lte $ wimax in ns-2 maouhoub Linux - Newbie 15 03-26-2011 12:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:31 PM.

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