LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-25-2018, 10:06 AM   #46
DeepakJustone
LQ Newbie
 
Registered: Feb 2018
Posts: 9

Rep: Reputation: Disabled
Smile xgraph query


thank for RE#43


...it was very helpful...now i want to plot graph by xgraph of various parameters for the given tcl files..so help me from where i can start.

and let me inform first xgraph is successfully installed on my PC..so tell me what to do next..

waiting...........
 
Old 04-25-2018, 10:15 AM   #47
DeepakJustone
LQ Newbie
 
Registered: Feb 2018
Posts: 9

Rep: Reputation: Disabled
Red face end to end delay and packet drop not working...

i execute command for end to end pearl script but no solution found

pearl $End-to-End-Delay##.pl DBR60.tr

Simulation Time = -t seconds
Total Receive Count = 0
No packet received.


and it also happened when drop pearl scripts execute for the
$ perl packet-drop.pl DBR60.tr

output:
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Dropped tcp length 0.000000
Dropped udp length 0.000000
Showing no packet drop...
actually in NAM execution my tcl file DBR60.tcl shown some packet drropped but in all awk and pearl script not showing any packet drop...so how can i resolve..where is the problem in code or in process of execution..

please help...
 
Old 04-25-2018, 10:21 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 #46.

Plot graphs : Xgraph has never been used with AquaSim simulations.
See post #43: ns2 APP-Tool → Works with the AquaSim trace files.

"VIII. Creating Output Files for Xgraph" :
http://www.isi.edu/nsnam/ns/tutorial/nsscript4.html

Examples : xgraph_ns2-files-tcl_01.18.tar.gz
https://drive.google.com/file/d/1wa9...ew?usp=sharing

-
 
Old 04-25-2018, 03:17 PM   #49
DeepakJustone
LQ Newbie
 
Registered: Feb 2018
Posts: 9

Rep: Reputation: Disabled
Rmac

i am executing rmac example as $ns-aqua-el6 rmac-example.tcl

showing result fine as:
SINK 0 : terminates (send 0, recv 182, cum_delay 2779.903995)
SINK(0) : send_id = 4, num_recv = 38
SINK(0) : send_id = 3, num_recv = 53
SINK(0) : send_id = 1, num_recv = 50
SINK(0) : send_id = 2, num_recv = 41
SINK 4 : terminates (send 38, recv 0, cum_delay 0.000000)
SINK 1 : terminates (send 50, recv 0, cum_delay 0.000000)
SINK 2 : terminates (send 42, recv 0, cum_delay 0.000000)
SINK 3 : terminates (send 54, recv 0, cum_delay 0.000000)
god: the energy consumped is 21.948973
NS EXISTING...


whenever i am trying to increase one more node as code given below:rmac-example_1.tcl"file name"
$ns-aqua-el6 rmac-example_1.tcl


code:

set opt(chan) Channel/UnderwaterChannel
set opt(prop) Propagation/UnderwaterPropagation
set opt(netif) Phy/UnderwaterPhy
set opt(mac) Mac/UnderwaterMac/RMac
set opt(ifq) Queue/DropTail/PriQueue
set opt(ll) LL
set opt(energy) EnergyModel
set opt(txpower) 0.6
set opt(rxpower) 0.3
set opt(initialenergy) 10000
set opt(idlepower) 0.01
set opt(ant) Antenna/OmniAntenna ;#we don't use it in underwater
set opt(filters) GradientFilter ;# options can be one or more of
;# TPP/OPP/Gear/Rmst/SourceRoute/Log/TagFilter



# the following parameters are set fot protocols
set opt(bit_rate) 1.0e4
set opt(encoding_efficiency) 1
set opt(ND_window) 1
set opt(ACKND_window) 1
set opt(PhaseOne_window) 3
set opt(PhaseTwo_window) 1
set opt(PhaseTwo_interval) 0.5
set opt(IntervalPhase2Phase3) 1
set opt(duration) 0.1
set opt(PhyOverhead) 8
set opt(large_packet_size) 480 ;# 60 bytes
set opt(short_packet_size) 40 ;# 5 bytes
set opt(PhaseOne_cycle) 4 ;
set opt(PhaseTwo_cycle) 2 ;
set opt(PeriodInterval) 1
set opt(transmission_time_error) 0.0001;

set opt(dz) 10
set opt(ifqlen) 50 ;# max packet in ifq
set opt(nn) 6 ;# number of nodes in each layer
set opt(layers) 1
set opt(x) 100 ;# X dimension of the topography
set opt(y) 100 ;# Y dimension of the topography
set opt(z) [expr ($opt(layers)-1)*$opt(dz)]
set opt(seed) 348.88
set opt(stop) 1000 ;# simulation time
set opt(prestop) 20 ;# time to prepare to stop
set opt(tr) "rmac1.tr" ;# trace file
set opt(nam) "rmac1.nam" ;# nam file
set opt(adhocRouting) Vectorbasedforward
set opt(width) 20
set opt(adj) 10
set opt(interval) 0.001
#set opt(traf) "diffusion-traf.tcl" ;# traffic file

# ==================================================================

LL set mindelay_ 50us
LL set delay_ 25us
LL set bandwidth_ 0 ;# not used

#Queue/DropTail/PriQueue set Prefer_Routing_Protocols 1

# unity gain, omni-directional antennas
# set up the antennas to be centered in the node and 1.5 meters above it
Antenna/OmniAntenna set X_ 0
Antenna/OmniAntenna set Y_ 0
Antenna/OmniAntenna set Z_ 1.5
Antenna/OmniAntenna set Z_ 0.05
Antenna/OmniAntenna set Gt_ 1.0
Antenna/OmniAntenna set Gr_ 1.0



Mac/UnderwaterMac set bit_rate_ $opt(bit_rate)
Mac/UnderwaterMac set encoding_efficiency_ $opt(encoding_efficiency)
Mac/UnderwaterMac/RMac set ND_window_ $opt(ND_window)
Mac/UnderwaterMac/RMac set ACKND_window_ $opt(ACKND_window)
Mac/UnderwaterMac/RMac set PhaseOne_window_ $opt(PhaseOne_window)
Mac/UnderwaterMac/RMac set PhaseTwo_window_ $opt(PhaseTwo_window)
Mac/UnderwaterMac/RMac set PhaseTwo_interval_ $opt(PhaseTwo_interval)
Mac/UnderwaterMac/RMac set IntervalPhase2Phase3_ $opt(IntervalPhase2Phase3)
#Mac/UnderwaterMac/RMac set ACKRevInterval_ 0.1
Mac/UnderwaterMac/RMac set duration_ $opt(duration)
Mac/UnderwaterMac/RMac set PhyOverhead_ $opt(PhyOverhead)
Mac/UnderwaterMac/RMac set large_packet_size_ $opt(large_packet_size)
Mac/UnderwaterMac/RMac set short_packet_size_ $opt(short_packet_size)
Mac/UnderwaterMac/RMac set PhaseOne_cycle_ $opt(PhaseOne_cycle)
Mac/UnderwaterMac/RMac set PhaseTwo_cycle_ $opt(PhaseTwo_cycle)
Mac/UnderwaterMac/RMac set PeriodInterval_ $opt(PeriodInterval)
Mac/UnderwaterMac/RMac set transmission_time_error_ $opt(transmission_time_error)




# Initialize the SharedMedia interface with parameters to make
# it work like the 914MHz Lucent WaveLAN DSSS radio interface
Phy/UnderwaterPhy set CPThresh_ 100 ;#10.0
Phy/UnderwaterPhy set CSThresh_ 0 ;#1.559e-11
Phy/UnderwaterPhy set RXThresh_ 0 ;#3.652e-10
#Phy/UnderwaterPhy set Rb_ 2*1e6
Phy/UnderwaterPhy set Pt_ 0.2818
Phy/UnderwaterPhy set freq_ 25 ;#frequency range in khz
Phy/UnderwaterPhy set K_ 2.0 ;#spherical spreading

# ==================================================================
# Main Program
# =================================================================

#
# Initialize Global Variables
#
#set sink_ 1


remove-all-packet-headers
#remove-packet-header AODV ARP TORA IMEP TFRC
add-packet-header IP Mac LL ARP UWVB RMAC

set ns_ [new Simulator]
set topo [new Topography]

$topo load_cubicgrid $opt(x) $opt(y) $opt(z)
#$ns_ use-newtrace
set tracefd [open $opt(tr) w]
$ns_ trace-all $tracefd

set nf [open $opt(nam) w]
$ns_ namtrace-all-wireless $nf $opt(x) $opt(y)


set phase1_time [expr $opt(PhaseOne_cycle)*$opt(PhaseOne_window)]
set phase2_time [expr $opt(PhaseTwo_cycle)*($opt(PhaseTwo_window)+$opt(PhaseTwo_interval))]


set start_time [expr $phase1_time+$phase2_time+$opt(IntervalPhase2Phase3)]

puts "the start time is $start_time"

set total_number [expr $opt(nn)-1]
set god_ [create-god $opt(nn)]

set chan_1_ [new $opt(chan)]


global defaultRNG
$defaultRNG seed $opt(seed)

$ns_ node-config -adhocRouting $opt(adhocRouting) \
-llType $opt(ll) \
-macType $opt(mac) \
-ifqType $opt(ifq) \
-ifqLen $opt(ifqlen) \
-antType $opt(ant) \
-propType $opt(prop) \
-phyType $opt(netif) \
#-channelType $opt(chan) \
-agentTrace OFF \
-routerTrace OFF \
-macTrace ON\
-topoInstance $topo\
-energyModel $opt(energy)\
-txpower $opt(txpower)\
-rxpower $opt(rxpower)\
-initialEnergy $opt(initialenergy)\
-idlePower $opt(idlepower)\
-channel $chan_1_


set node_(0) [$ns_ node 0]
$node_(0) set sinkStatus_ 1
$node_(0) set passive 1

$god_ new_node $node_(0)
$node_(0) set X_ 0
$node_(0) set Y_ 0
$node_(0) set Z_ 0.0
$node_(0) set passive 1
set a_(0) [new Agent/UWSink]
$ns_ attach-agent $node_(0) $a_(0)
$a_(0) attach-vectorbasedforward $opt(width)
$a_(0) cmd set-range 20
$a_(0) cmd set-target-x -20
$a_(0) cmd set-target-y -10
$a_(0) cmd set-target-z -20



set node_(1) [$ns_ node 1]
$node_(1) set sinkStatus_ 1
$god_ new_node $node_(1)
$node_(1) set X_ 0
$node_(1) set Y_ -15
$node_(1) set Z_ 0
$node_(1) set-cx 0
$node_(1) set-cy -15
$node_(1) set-cz 0
$node_(1) set_next_hop 0 ;# target is node 0
#$node_(1) set passive 1
set a_(1) [new Agent/UWSink]
$ns_ attach-agent $node_(1) $a_(1)
$a_(1) attach-vectorbasedforward $opt(width)
$a_(1) cmd set-range 20
$a_(1) cmd set-target-x 0
$a_(1) cmd set-target-y 0
$a_(1) cmd set-target-z 0
$a_(1) set data_rate_ 0.05


set node_(2) [$ns_ node 2]
$node_(2) set sinkStatus_ 1
$god_ new_node $node_(2)
$node_(2) set X_ 0
$node_(2) set Y_ 40
$node_(2) set Z_ 0
$node_(2) set-cx 0
$node_(2) set-cy 40
$node_(2) set-cz 0
$node_(2) set_next_hop 0 ;# target is node 0
#$node_(1) set passive 1
set a_(2) [new Agent/UWSink]
$ns_ attach-agent $node_(2) $a_(2)
$a_(2) attach-vectorbasedforward $opt(width)
$a_(2) cmd set-range 20
$a_(2) cmd set-target-x 0
$a_(2) cmd set-target-y 0
$a_(2) cmd set-target-z 0
$a_(2) set data_rate_ 0.05


set node_(3) [$ns_ node 3]
$node_(3) set sinkStatus_ 1
$god_ new_node $node_(3)
$node_(3) set X_ -30
$node_(3) set Y_ 0
$node_(3) set Z_ 0
$node_(3) set-cx 0
$node_(3) set-cy -30
$node_(3) set-cz 0
$node_(3) set_next_hop 0 ;# target is node 0
#$node_(1) set passive 1
set a_(3) [new Agent/UWSink]
$ns_ attach-agent $node_(3) $a_(3)
$a_(3) attach-vectorbasedforward $opt(width)
$a_(3) cmd set-range 20
$a_(3) cmd set-target-x 0
$a_(3) cmd set-target-y 0
$a_(3) cmd set-target-z 0
$a_(3) set data_rate_ 0.05

set node_(4) [$ns_ node 4]
$node_(4) set sinkStatus_ 1
$god_ new_node $node_(3)
$node_(4) set X_ -40
$node_(4) set Y_ 0
$node_(4) set Z_ 0
$node_(4) set-cx 0
$node_(4) set-cy -40
$node_(4) set-cz 0
$node_(4) set_next_hop 0 ;# target is node 0
#$node_(1) set passive 1
set a_(4) [new Agent/UWSink]
$ns_ attach-agent $node_(4) $a_(4)
$a_(4) attach-vectorbasedforward $opt(width)
$a_(4) cmd set-range 20
$a_(4) cmd set-target-x 0
$a_(4) cmd set-target-y 0
$a_(4) cmd set-target-z 0
$a_(4) set data_rate_ 0.05

#puts "the total number is $total_number"
set node_($total_number) [$ns_ node $total_number]
$god_ new_node $node_($total_number)
$node_($total_number) set X_ 60
$node_($total_number) set Y_ 0
$node_($total_number) set Z_ 0
$node_($total_number) set-cx 60
$node_($total_number) set-cy 0
$node_($total_number) set-cz 0
$node_($total_number) set_next_hop 0 ;# target is node 0

set a_($total_number) [new Agent/UWSink]
$ns_ attach-agent $node_($total_number) $a_($total_number)
$a_($total_number) attach-vectorbasedforward $opt(width)
$a_($total_number) cmd set-range 20
$a_($total_number) cmd set-target-x 0
$a_($total_number) cmd set-target-y 0
$a_($total_number) cmd set-target-z 0
$a_($total_number) set data_rate_ 0.05





#set max_num [expr $total_number -1]



#$ns_ at 15 "$a_($total_number) cbr-start"
$ns_ at $start_time "$a_($total_number) exp-start"
$ns_ at $start_time "$a_(1) exp-start"
$ns_ at $start_time "$a_(2) exp-start"
$ns_ at $start_time "$a_(3) exp-start"
$ns_ at $start_time "$a_(4) exp-start"
#$ns_ at 4 "$a_(0) cbr-start"
#$ns_ at 2.0003 "$a_(2) cbr-start"
#$ns_ at 0.1 "$a_(0) announce"



set node_size 10
for {set k 0} { $k<$opt(nn) } { incr k } {
$ns_ initial_node_pos $node_($k) $node_size
}

puts "+++++++AFTER ANNOUNCE++++++++++++++"





$ns_ at $opt(stop).001 "$a_(0) terminate"
$ns_ at $opt(stop).002 "$a_($total_number) terminate"
$ns_ at $opt(stop).002 "$a_(1) terminate"
$ns_ at $opt(stop).002 "$a_(2) terminate"
$ns_ at $opt(stop).002 "$a_(3) terminate"
$ns_ at $opt(stop).003 "$a_(4) terminate"

$ns_ at $opt(stop).003 "$god_ compute_energy"
$ns_ at $opt(stop).004 "$ns_ nam-end-wireless $opt(stop)"
$ns_ at $opt(stop).005 "puts "NS EXISTING..."; $ns_ halt"

puts $tracefd "vectorbased"
puts $tracefd "M 0.0 nn $opt(nn) x $opt(x) y $opt(y) z $opt(z)"
puts $tracefd "M 0.0 prop $opt(prop) ant $opt(ant)"
puts "starting Simulation..."
$ns_ run


but when i execute above file it gives error:


please resolve and help to success.
thanks

SINK 0 : terminates (send 0, recv 205, cum_delay 12108.468513)
SINK(0) : send_id = 2, num_recv = 47
SINK(0) : send_id = 5, num_recv = 45
SINK(0) : send_id = 3, num_recv = 40
SINK(0) : send_id = 1, num_recv = 34
SINK(0) : send_id = 4, num_recv = 39
SINK 5 : terminates (send 47, recv 0, cum_delay 0.000000)
SINK 1 : terminates (send 35, recv 0, cum_delay 0.000000)
SINK 2 : terminates (send 48, recv 0, cum_delay 0.000000)
SINK 3 : terminates (send 47, recv 0, cum_delay 0.000000)
SINK 4 : terminates (send 44, recv 0, cum_delay 0.000000)
node pointer is null
Segmentation fault (core dumped)
 
Old 04-25-2018, 03:56 PM   #50
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.

You can extract values from a trace file with awk or perl scripts:
... But only if the trace file contains that information.

Packet drop : Who says any packets were dropped ?
... Anyway 0.000000 is the right result.
The same with PDR*** : Do not expect a particular result.

--------------------------------------------------------

Re #49 :
Please edit posts #49, #47 to Code Tags around "code", "output text".
http://www.linuxquestions.org/questi....php?do=bbcode
I.e. type [code]code text[/code] and [code]output text[/code]


About RMac with many nodes :
`RMac-vbf_example_7.tclŽ has 100 nodes → Is a 64bits example.
See uw_tcl-examples-12.17/LIST-examples_usable-64.
... Can be run with a 64bits executable "ns-aqua-64".

P.S. : "Your RMac-6nodes.tcl" runs OK with "ns-aqua-64".

-

Last edited by knudfl; 04-25-2018 at 04:05 PM.
 
Old 04-26-2018, 12:15 PM   #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
Plot with APP-Tool : Please have a look at the examples →

https://drive.google.com/drive/folde...NC?usp=sharing
 
  


Reply

Tags
aquasim, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Aqua-Sim in NS2 Shaveta Kamra Linux - Newbie 4 06-13-2017 01:35 AM
Aqua-Sim in NS2 Shaveta Kamra Linux - Newbie 3 06-07-2017 11:01 AM
Aqua-Sim in NS2 Shaveta Kamra Linux - Wireless Networking 1 06-07-2017 06:02 AM
aqua sim in ns2 - DBR protocol saye_s Linux - Software 71 03-04-2017 09:19 AM
NS2 and Aqua-sim Faiza Al-Salti Linux - Networking 3 06-12-2014 12:46 AM

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

All times are GMT -5. The time now is 10:27 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