LinuxQuestions.org
Review your favorite Linux distribution.
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 11-26-2018, 08:42 AM   #1
rmanicavasagam@gmail.com
LQ Newbie
 
Registered: Nov 2018
Posts: 4

Rep: Reputation: Disabled
Aquasim Vector Based Forwarding Trace File shows no AGT


I am trying to simulate VBF using Aquasim. The VBF is working fine. I am trying to calculate the throughput and end-to-end delay. The generated trace file does not have any AGT row. All example scripts uses AGT/CBR rows in trace file to calculate send and receive packets.

Can anyone please let me know, how to calculate the throughput? I can submit any code or trace if required.
I am simulating various attacks in underwater sensor networks. I went through various postings on aquasim. But all the scripts given in the forum does not provide a script for addressing this specific problem.

Please see below for code and trace

set opt(chan) Channel/UnderwaterChannel
set opt(prop) Propagation/UnderwaterPropagation
set opt(netif) Phy/UnderwaterPhy
set opt(mac) Mac/UnderwaterMac/BroadcastMac
set opt(ifq) Queue/DropTail/PriQueue
set opt(ll) LL
set opt(energy) EnergyModel
set opt(txpower) 1.0
set opt(rxpower) 0.5
set opt(initialenergy) 2000
set opt(idlepower) 0.45
set opt(sleeppower) 0.005
set opt(ant) Antenna/OmniAntenna
set opt(filters) GradientFilter ;# options can be one or more of
;# TPP/OPP/Gear/Rmst/SourceRoute/Log/TagFilter
set opt(minspeed) 0 ;#minimum speed of node
set opt(maxspeed) 3 ;#maximum speed of node
set opt(speed) 0.5 ;#speed of node
set opt(position_update_interval) 0.3 ;# the length of period to update node's position
set opt(packet_size) 100 ;#50 bytes
set opt(routing_control_packet_size) 20 ;#bytes

set opt(ifqlen) 100 ;# max queue length in if
set opt(nn) 12 ;# number of nodes
set opt(x) 1500 ;# X dimension of the topography
set opt(y) 1500;# Y dimension of the topography
set opt(z) 1500
set opt(seed) 11
set opt(stop) 3000 ;# simulation time
set opt(prestop) 400 ;# time to prepare to stop
set opt(tr) "vbf_atck_energy.tr" ;# trace file
set opt(datafile) "vbf_atck_energy.data"
set opt(nam) "vbf_atck_energy.nam" ;# nam file
set opt(adhocRouting) Vectorbasedforward
set opt(width) 500
set opt(interval) 10.0
set opt(range) 500 ;#range of each node in meters
set opt(attack_packet_size) 300


puts "the file name is $opt(datafile)"
puts "the sending interval is $opt(interval)"

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

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

Agent/Vectorbasedforward set hop_by_hop_ 1

Mac/UnderwaterMac set bit_rate_ 1.0e4 ;#10kbps
Mac/UnderwaterMac set encoding_efficiency_ 1
Mac/UnderwaterMac/BroadcastMac set packetheader_size_ 0 ;# #of bytes

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

# ==================================================================
# Main Program
# Ten nodes
# 1 sink node, 1 source node , 6 sensor nodes, 2 attacker nodes
# =================================================================

#
# Initialize Global Variables
#
#set
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)
#ns add new trace
$ns_ use-newtrace


set data [open $opt(datafile) a]


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


$ns_ at 0.0 "$god_ set_filename $opt(datafile)"
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 ON \
-routerTrace ON\
-macTrace ON\
-topoInstance $topo\
-energyModel $opt(energy)\
-txPower $opt(txpower)\
-rxPower $opt(rxpower)\
-initialEnergy $opt(initialenergy)\
-idlePower $opt(idlepower)\
-channel $chan_1_


puts "Width=$opt(width)"
#Set the Sink node#############################################################(300,0,0)
set node_(0) [ $ns_ node 0]

$node_(0) set sinkStatus_ 1
$god_ new_node $node_(0)
$node_(0) set X_ 300
$node_(0) set Y_ 0
$node_(0) set Z_ 0
$node_(0) set passive 1


set rt [$node_(0) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)

set a_(0) [new Agent/UWSink]
$ns_ attach-agent $node_(0) $a_(0)
$a_(0) attach-vectorbasedforward $opt(width)
$a_(0) cmd set-range $opt(range)
$a_(0) cmd set-target-x -20
$a_(0) cmd set-target-y -10
$a_(0) cmd set-target-z -10
$a_(0) cmd set-filename $opt(datafile)
$a_(0) cmd set-packetsize $opt(packet_size) ;# # of bytes


# ############################ node 1###########################(250,50,50)
set node_(1) [ $ns_ node 1]
$node_(1) set sinkStatus_ 1
$god_ new_node $node_(1)
$node_(1) set X_ 250
$node_(1) set Y_ -50
$node_(1) set Z_ -50
$node_(1) set passive 1

set rt [$node_(1) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)
$node_(1) set max_speed $opt(maxspeed)
$node_(1) set min_speed $opt(minspeed)
$node_(1) set position_update_interval_ $opt(position_update_interval)
set a_(1) [new Agent/UWSink]
$ns_ attach-agent $node_(1) $a_(1)
$a_(1) attach-vectorbasedforward $opt(width)
$a_(1) cmd set-range $opt(range)
$a_(1) cmd set-target-x -20
$a_(1) cmd set-target-y -10
$a_(1) cmd set-target-z -10
$a_(1) cmd set-filename $opt(datafile)
$a_(1) cmd set-packetsize 100 ;# # of bytes
#$node_(1) move
############################## node 2######################################## (350,60,60)
set node_(2) [ $ns_ node 2]
$node_(2) set sinkStatus_ 1
$node_(2) random-motion 1
$node_(2) set max_speed $opt(maxspeed)
$node_(2) set min_speed $opt(minspeed)
$node_(2) set position_update_interval_ $opt(position_update_interval)

$god_ new_node $node_(2)
$node_(2) set X_ 350
$node_(2) set Y_ -50
$node_(2) set Z_ -50
$node_(2) set passive 1

set rt [$node_(2) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)

set a_(2) [new Agent/UWSink]
$ns_ attach-agent $node_(2) $a_(2)
$a_(2) attach-vectorbasedforward $opt(width)
$a_(2) cmd set-range $opt(range)
$a_(2) cmd set-target-x -20
$a_(2) cmd set-target-y -10
$a_(2) cmd set-target-z -10
$a_(2) cmd set-filename $opt(datafile)
$a_(2) cmd set-packetsize $opt(packet_size) ;# # of bytes
#$node_(2) move



##################node 3 (350,50,50)
set node_(3) [ $ns_ node 3]
$node_(3) set sinkStatus_ 1
$node_(3) random-motion 1

$node_(3) set max_speed $opt(maxspeed)
$node_(3) set min_speed $opt(minspeed)
$node_(3) set position_update_interval_ $opt(position_update_interval)

$god_ new_node $node_(3)
$node_(3) set X_ 250
$node_(3) set Y_ -100
$node_(3) set Z_ -100
$node_(3) set passive 1

set rt [$node_(3) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)

set a_(3) [new Agent/UWSink]
$ns_ attach-agent $node_(3) $a_(3)
$a_(3) attach-vectorbasedforward $opt(width)
$a_(3) cmd set-range $opt(range)
$a_(3) cmd set-target-x -20
$a_(3) cmd set-target-y -10
$a_(3) cmd set-target-z -20
$a_(3) cmd set-filename $opt(datafile)
$a_(3) cmd set-packetsize $opt(packet_size) ;# # of bytes

#######################node 4 (350,0,-135)
set node_(4) [ $ns_ node 4]
$node_(4) set sinkStatus_ 1
$node_(4) random-motion 1

$node_(4) set max_speed $opt(maxspeed)
$node_(4) set min_speed $opt(minspeed)
$node_(4) set position_update_interval_ $opt(position_update_interval)

$god_ new_node $node_(4)
$node_(4) set X_ 350
$node_(4) set Y_ -105
$node_(4) set Z_ -105
$node_(4) set passive 1

set rt [$node_(4) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)

set a_(4) [new Agent/UWSink]
$ns_ attach-agent $node_(4) $a_(4)
$a_(4) attach-vectorbasedforward $opt(width)
$a_(4) cmd set-range $opt(range)
$a_(4) cmd set-target-x -20
$a_(4) cmd set-target-y -10
$a_(4) cmd set-target-z -20
$a_(4) cmd set-filename $opt(datafile)
$a_(4) cmd set-packetsize $opt(packet_size) ;# # of bytes


################node 5 (250,150,150)########################
set node_(5) [ $ns_ node 5]
$node_(5) set sinkStatus_ 1
$node_(5) random-motion 1

$node_(5) set max_speed $opt(maxspeed)
$node_(5) set min_speed $opt(minspeed)
$node_(5) set position_update_interval_ $opt(position_update_interval)

$god_ new_node $node_(5)
$node_(5) set X_ 250
$node_(5) set Y_ -150
$node_(5) set Z_ -150
$node_(5) set passive 1

set rt [$node_(5) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)

set a_(5) [new Agent/UWSink]
$ns_ attach-agent $node_(5) $a_(5)
$a_(5) attach-vectorbasedforward $opt(width)
$a_(5) cmd set-range $opt(range)
$a_(5) cmd set-target-x -20
$a_(5) cmd set-target-y -10
$a_(5) cmd set-target-z -20
$a_(5) cmd set-filename $opt(datafile)
$a_(5) cmd set-packetsize $opt(packet_size) ;# # of bytes


#node 6 (49,0,-250)

set node_(6) [ $ns_ node 6]
$node_(6) set sinkStatus_ 1

$node_(6) set max_speed $opt(maxspeed)
$node_(6) set min_speed $opt(minspeed)
$node_(6) set position_update_interval_ $opt(position_update_interval)

$god_ new_node $node_(6)
$node_(6) set X_ 350
$node_(6) set Y_ -170
$node_(6) set Z_ -170
$node_(6) set passive 1

set rt [$node_(6) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)

set a_(6) [new Agent/UWSink]
$ns_ attach-agent $node_(6) $a_(6)
$a_(6) attach-vectorbasedforward $opt(width)
$a_(6) cmd set-range $opt(range)
$a_(6) cmd set-target-x -20
$a_(6) cmd set-target-y -10
$a_(6) cmd set-target-z -20
$a_(6) cmd set-filename $opt(datafile)
$a_(6) cmd set-packetsize $opt(packet_size) ;# # of bytes



###############node 7 (48,0,-310)
set node_(7) [ $ns_ node 7]
$node_(7) set sinkStatus_ 1
$node_(7) random-motion 1

$node_(7) set max_speed $opt(maxspeed)
$node_(7) set min_speed $opt(minspeed)
$node_(7) set position_update_interval_ $opt(position_update_interval)

$god_ new_node $node_(7)
$node_(7) set X_ 250
$node_(7) set Y_ -220
$node_(7) set Z_ -220
$node_(7) set passive 1

set rt [$node_(7) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)

set a_(7) [new Agent/UWSink]
$ns_ attach-agent $node_(7) $a_(7)
$a_(7) attach-vectorbasedforward $opt(width)
$a_(7) cmd set-range $opt(range)
$a_(7) cmd set-target-x -20
$a_(7) cmd set-target-y -10
$a_(7) cmd set-target-z -20
$a_(7) cmd set-filename $opt(datafile)
$a_(7) cmd set-packetsize $opt(packet_size) ;# # of bytes

#node 8 (348,0,-360)
set node_(8) [ $ns_ node 8]
$node_(8) set sinkStatus_ 1
$node_(8) random-motion 1
$node_(8) set max_speed $opt(maxspeed)
$node_(8) set min_speed $opt(minspeed)
$node_(8) set position_update_interval_ $opt(position_update_interval)
$node_(8) set next_hop 7
$god_ new_node $node_(8)
$node_(8) set X_ 350
$node_(8) set Y_ -250
$node_(8) set Z_ -220
$node_(8) set passive 1

set rt [$node_(8) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)

set a_(8) [new Agent/UWSink]
$ns_ attach-agent $node_(8) $a_(8)
$a_(8) attach-vectorbasedforward $opt(width)
$a_(8) cmd set-range $opt(range)
$a_(8) cmd set-target-x -20
$a_(8) cmd set-target-y -10
$a_(8) cmd set-target-z -20
$a_(8) cmd set-filename $opt(datafile)
$a_(8) cmd set-packetsize $opt(packet_size) ;# # of bytes

#node 8 (348,0,-360)
set node_(9) [ $ns_ node 9]
$node_(9) set sinkStatus_ 1
$node_(9) random-motion 1
$node_(9) set max_speed $opt(maxspeed)
$node_(9) set min_speed $opt(minspeed)
$node_(9) set position_update_interval_ $opt(position_update_interval)
$god_ new_node $node_(9)
$node_(9) set X_ 300
$node_(9) set Y_ -250
$node_(9) set Z_ -220
$node_(9) set passive 1

set rt [$node_(9) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)

set a_(9) [new Agent/UWSink]
$ns_ attach-agent $node_(9) $a_(9)
$a_(9) attach-vectorbasedforward $opt(width)
$a_(9) cmd set-range $opt(range)
$a_(9) cmd set-target-x -20
$a_(9) cmd set-target-y -10
$a_(9) cmd set-target-z -20
$a_(9) cmd set-filename $opt(datafile)
$a_(9) cmd set-packetsize $opt(attack_packet_size) ;# # of bytes

#node 10 (348,0,-360)
set node_(10) [ $ns_ node 10]
$node_(10) set sinkStatus_ 1
$node_(10) random-motion 1
$node_(10) set max_speed $opt(maxspeed)
$node_(10) set min_speed $opt(minspeed)
$node_(10) set position_update_interval_ $opt(position_update_interval)
$god_ new_node $node_(10)
$node_(10) set X_ 290
$node_(10) set Y_ -250
$node_(10) set Z_ -220
$node_(10) set passive 1

set rt [$node_(10) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)

set a_(10) [new Agent/UWSink]
$ns_ attach-agent $node_(10) $a_(10)
$a_(10) attach-vectorbasedforward $opt(width)
$a_(10) cmd set-range $opt(range)
$a_(10) cmd set-target-x -20
$a_(10) cmd set-target-y -10
$a_(10) cmd set-target-z -20
$a_(10) cmd set-filename $opt(datafile)
$a_(10) cmd set-packetsize $opt(attack_packet_size) ;# # of bytes


#node 11 (300,-300,-250)
#Set the source node
set node_($total_number) [$ns_ node $total_number]
$god_ new_node $node_($total_number)
$node_($total_number) color "#ff0000"
$node_($total_number) set sinkStatus_ 1
$node_($total_number) set X_ 300
$node_($total_number) set Y_ -300
$node_($total_number) set Z_ -250
$node_($total_number) set-cx -300
$node_($total_number) set-cy -300
$node_($total_number) set-cz -250
$node_($total_number) set next_hop [expr $total_number - 1]
set rt [$node_($total_number) set ragent_]
$rt set control_packet_size $opt(routing_control_packet_size)


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 $opt(range)
$a_($total_number) cmd set-target-x -20
$a_($total_number) cmd set-target-y -10
$a_($total_number) cmd set-target-z -10
$a_($total_number) cmd set-filename $opt(datafile)
$a_($total_number) cmd set-packetsize $opt(packet_size) ;# # of bytes

# make nam workable
set node_size 30
for {set k 0} { $k<$opt(nn)} {incr k} {
$ns_ initial_node_pos $node_($k) $node_size
puts "size is $k"
}



set start_time 0.003
set opt(stop2) [expr $opt(stop) + 2000]
#$ns_ at $start_time "$a_(11) cbr-start"
$ns_ at $start_time "$a_(10) cbr-start"
$ns_ at 2.0 "$a_(9) cbr-start"
#$ns_ at $opt(stop).001 "$a_(11) terminate"
$ns_ at $opt(stop).002 "$a_(10) terminate"
$ns_ at $opt(stop).003 "$a_(9) terminate"
$ns_ at $opt(stop2).001 "$a_(0) terminate"
$ns_ at $opt(stop2).002 "$god_ compute_energy"
$ns_ at $opt(stop2).003 "$ns_ nam-end-wireless $opt(stop)"
$ns_ at $opt(stop2).004 "puts "NS EXISTING..."; $ns_ halt"
$ns_ at $opt(stop2).005 "Packet Send is "


puts $data "New simulation...."
puts $data "nodes = $opt(nn), maxspeed = $opt(maxspeed), minspeed = $opt(minspeed), random_seed = $opt(seed), sending_interval_=$opt(interval), width=$opt(width)"
puts $data "x= $opt(x) y= $opt(y) z= $opt(z)"
close $data
puts "starting Simulation..."
$ns_ run


*********************************************Trace
r -t 0.003000000 -Hs 10 -Hd -2 -Ni 10 -Nx 290.00 -Ny -250.00 -Nz
-220.00 -Ne 2000.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is
10.0 -Id 10.255 -It vectorbasedforward -Il 300 -If 0 -Ii 0 -Iv 0
s -t 0.003025000 -Hs 10 -Hd -1 -Ni 10 -Nx 290.00 -Ny -250.00 -Nz
-220.00 -Ne 2000.000000 -Nl MAC -Nw --- -Ma 0 -Md a000000 -Ms ffff0008
-Mt 0 -Is 10.0 -Id 10.255 -It vectorbasedforward -Il 300 -If 0 -Ii 0
-Iv 0
r -t 0.249691667 -Hs 9 -Hd -1 -Ni 9 -Nx 300.00 -Ny -250.00 -Nz -220.00
-Ne 1999.875639 -Nl MAC -Nw --- -Ma 0 -Md a000000 -Ms ffff0008 -Mt 0
-Is 10.0 -Id 10.255 -It vectorbasedforward -Il 300 -If 0 -Ii 0 -Iv 0
r -t 0.249716667 -Hs 9 -Hd -1 -Ni 9 -Nx 300.00 -Ny -250.00 -Nz -220.00
-Ne 1999.875639 -Nl RTR -Nw --- -Ma 0 -Md a000000 -Ms ffff0008 -Mt 0
-Is 10.0 -Id 10.255 -It vectorbasedforward -Il 300 -If 0 -Ii 0 -Iv 0
r -t 0.276358333 -Hs 7 -Hd -1 -Ni 7 -Nx 250.00 -Ny -220.00 -Nz -220.00
-Ne 1999.863639 -Nl MAC -Nw --- -Ma 0 -Md a000000 -Ms ffff0008 -Mt 0
-Is 10.0 -Id 10.255 -It vectorbasedforward -Il 300 -If 0 -Ii 0 -Iv 0
r -t 0.276383333 -Hs 7 -Hd -1 -Ni 7 -Nx 250.00 -Ny -220.00 -Nz -220.00
-Ne 1999.863639 -Nl RTR -Nw --- -Ma 0 -Md a000000 -Ms ffff0008 -Mt 0
-Is 10.0 -Id 10.255 -It vectorbasedforward -Il 300 -If 0 -Ii 0 -Iv 0
r -t 0.282465532 -Hs 11 -Hd -1 -Ni 11 -Nx 300.00 -Ny -300.00 -Nz
-250.00 -Ne 1999.860891 -Nl MAC -Nw --- -Ma 0 -Md a000000 -Ms ffff0008
-Mt 0 -Is 10.0 -Id 10.255 -It vectorbasedforward -Il 300 -If 0 -Ii 0
-Iv 0
r -t 0.282490532 -Hs 11 -Hd -1 -Ni 11 -Nx 300.00 -Ny -300.00 -Nz
-250.00 -Ne 1999.860891 -Nl RTR -Nw --- -Ma 0 -Md a000000 -Ms ffff0008
-Mt 0 -Is 10.0 -Id 10.255 -It vectorbasedforward -Il 300 -If 0 -Ii 0
-Iv 0
r -t 0.283025000 -Hs 8 -Hd -1 -Ni 8 -Nx 350.00 -Ny -250.00 -Nz -220.00
-Ne 1999.860639 -Nl MAC -Nw --- -Ma 0 -Md a000000 -Ms ffff0008 -Mt 0
-Is 10.0 -Id 10.255 -It vectorbasedforward -Il 300 -If 0 -Ii 0 -Iv 0
r -t 0.283050000 -Hs 8 -Hd -1 -Ni 8 -Nx 350.00 -Ny -250.00 -Nz -220.00
-Ne 1999.860639 -Nl RTR -Nw --- -Ma 0 -Md a000000 -Ms ffff0008 -Mt 0
-Is 10.0 -Id 10.255 -It vectorbasedforward -Il 300 -If 0 -Ii 0 -Iv 0
N -t 1.000000 -n 0 -e 1999.550000
N -t 1.000000 -n 1 -e 1999.550000

Last edited by rmanicavasagam@gmail.com; 11-26-2018 at 11:51 AM.
 
Old 11-26-2018, 10:15 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 21,952

Rep: Reputation: 5814Reputation: 5814Reputation: 5814Reputation: 5814Reputation: 5814Reputation: 5814Reputation: 5814Reputation: 5814Reputation: 5814Reputation: 5814Reputation: 5814
Quote:
Originally Posted by rmanicavasagam@gmail.com View Post
I am trying to simulate VBF using Aquasim. The VBF is working fine. I am trying to calculate the throughput and end-to-end delay. The generated trace file does not have any AGT row. All example scripts uses AGT to calculate send and receive packets.

Can anyone please let me know, how to calculate the throughput? I can submit any code or trace if required.
Read the "Question Guidelines" link in my posting signature. Basic research needs to be done first, before posting...there are LOTS of aquasim threads on this site that you can easily find. Further, when asking such things, you need to post your code, what you've done/tried so far, and what (if any) tutorials you've already followed, along with details about your system.
 
Old 11-27-2018, 05:31 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
@rmanicavasagam@gmail.com : Welcome to LQ.

Your simulation.tcl was edited. Didn't run with your code.
Code:
Line 127 : #-channelType $opt(chan) \         ;# commented out
         // Because of:  Can't specify both channel and channelType, error!

Line 491 : $ns_ at $opt(stop2).004 "puts \"NS Exiting...\"; $ns_ halt"    ;# edited
$ ns-aqua rmanicavasagam-VBF.tcl : The created trace file is about 45MB.
No packets were sent / received according to the existing awk / perl scripts.

Please see (and test) aquasim-examples-11.17.tar.gz
https://drive.google.com/file/d/1lmi...ew?usp=sharing
... Easy to find vbf simulations, where you can analyze the trace and get reported packets sent / received.
E.g. with "Avg_Tput.awk" :
Code:
$ awk -f Avg_Tput.awk vbf_example401.tr
       startTime:  1
        stopTime:  131
    receivedPkts:  177280
   avgTput[kbps]:  6298.97
And delay → "Avg_Del.awk" :
Code:
$ awk -f Avg_Del.awk vbf_example401.tr
 avgDelay[ms] overall:  129998
The ~240 awk and perl ns2 scripts https://drive.google.com/drive/folde...7T?usp=sharing

Please explain the difference from the vbf ex in aquasim-examples-11.17 to your simulation code.

-

Last edited by knudfl; 11-27-2018 at 05:48 PM.
 
1 members found this post helpful.
Old 11-27-2018, 05:57 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
@rmanicavasagam@gmail.com :

Important : Which OS are you using ?
Name, version, architecture please. Like Fedora 29 - x86_64.

The OS information is important because you cannot build a reasonable good executable aquasim 'ns' with a contemporary Debian or Ubuntu OS.


-
 
Old 11-28-2018, 03:35 PM   #5
rmanicavasagam@gmail.com
LQ Newbie
 
Registered: Nov 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
@rmanicavasagam@gmail.com :

Important : Which OS are you using ?
Name, version, architecture please. Like Fedora 29 - x86_64.

The OS information is important because you cannot build a reasonable good executable aquasim 'ns' with a contemporary Debian or Ubuntu OS.


-

Hi,
Thank you so much for your reply. I used your post for installing aquasim and it is working fine. Thank you for that post as well. I will work on the examples.
I am using ns2.37 and ubuntu 16.04.

Thank you,
Rajesh

Last edited by rmanicavasagam@gmail.com; 11-28-2018 at 03:36 PM.
 
Old 11-28-2018, 05:57 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
Re #5.

Aqua-Sim is ns-2.30, not "2.37" !

Ubuntu 16.04 : You can install a better "ns aquasim" executable than the one you can build with Ubuntu 16.04
→ e.g. aquasim-ns_2.30-2-ubuntu1010_i386.deb ( 1.4MB package )
https://drive.google.com/file/d/0B7S...ew?usp=sharing
... Provides /usr/local/bin/ns-aqua-1010

Download ... and install:
Code:
$ sudo gdebi Downloads/aquasim-ns_2.30-2-ubuntu1010_i386.deb
... Some 32bits dependencies will be installed too, if Ubuntu 16.04 - amd64.

Simulation :
Code:
$ ns-aqua-1010 vbf_example_3.tcl

Last edited by knudfl; 11-28-2018 at 05:58 PM.
 
Old 11-29-2018, 08:58 AM   #7
rmanicavasagam@gmail.com
LQ Newbie
 
Registered: Nov 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by knudfl View Post
Re #5.

Aqua-Sim is ns-2.30, not "2.37" !

Ubuntu 16.04 : You can install a better "ns aquasim" executable than the one you can build with Ubuntu 16.04
→ e.g. aquasim-ns_2.30-2-ubuntu1010_i386.deb ( 1.4MB package )
https://drive.google.com/file/d/0B7S...ew?usp=sharing
... Provides /usr/local/bin/ns-aqua-1010

Download ... and install:
Code:
$ sudo gdebi Downloads/aquasim-ns_2.30-2-ubuntu1010_i386.deb
... Some 32bits dependencies will be installed too, if Ubuntu 16.04 - amd64.

Simulation :
Code:
$ ns-aqua-1010 vbf_example_3.tcl
Hi,
You are correct it is ns2.30. I will try to install this aquasim as well.
Examples you gave me worked perfectly for throughput and delay.
Thank you so much for your help.
Thanks,
Rajesh
 
  


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
[SOLVED] Aquasim:How insert mac protocol to aquasim vaj-bor Linux - Software 35 03-15-2017 06:43 PM
Ns2 PUMA tace file shows no receiver with CBR packets at AGT on ubuntu 14.04 ankur_pareek Linux - Newbie 4 04-06-2016 10:24 AM
LXer: Tropic of Vector a blog devoted to Vector Linux Light, plus the Vector Linux LXer Syndicated Linux News 0 09-17-2009 01:30 PM
Agt-get??? tricky_linux Linux - Software 5 01-19-2004 12:52 PM

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

All times are GMT -5. The time now is 03:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration