Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,494
Rep:
Re #14, #15.
Your file ( Rach_k-gpsr_K.tcl ) is not very useful with no 'cbr-15-5.tcl' and 'scenario.ns_movements'.
Please upload the files to dropbox https://www.dropbox.com/ or 'Google Drive'.
And : Please tell which line(s) you edited, i.e. the line number(s).
One thing I can suggest is to set up GPSR-hls, it may be more robust with changes.
( If usable for your project.)
Remember ... you can have as many ns-allinone-2.xx as you want, at the same time.
GPSR-hls → → → /usr/local/bin/ns-hls ( Or whatever name you like for 'ns'.
I have tried gpsr-hls too, but it wasn't working. so switched to k-gpsr.
so here are the links for all the files i used. Scenario.ns_movements was generated by VanetMobiSim. https://www.dropbox.com/s/xgqfn5qo1wn0l3o/u.xml?dl=0
set opt(x) 670 ;# X dimension of the topography
set opt(y) 670 ;# Y dimension of the topography
set opt(cp) "./cbr100.tcl"
set opt(sc) "./grid-deploy10x10.tcl"
set opt(ifqlen) 50 ;# max packet in ifq
set opt(nn) 100 ;# number of nodes
set opt(seed) 0.0
set opt(stop) 250.0 ;# simulation time
In tcl file what i have changed is
Code:
set opt(x) 1001 ;# X dimension of the topography
set opt(y) 1001 ;# Y dimension of the topography
set opt(cp) "cbr-15-5.tcl"
set opt(sc) "scenario.ns_movements"
set opt(ifqlen) 50 ;# max packet in ifq
set opt(nn) 15 ;# number of nodes
set opt(seed) 5.0
set opt(stop) 1000.0 ;# simulation time
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,494
Rep:
Re #17.
Code:
$ ns235-gpsr-K-64 g1.tcl
Seeding Random number generator with 5.0
num_nodes is set 15
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
GPSR configuration file
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Load complete...
Starting Simulation...
SORTING LISTS ...DONE!
NS EXITING...
... That's with a 64bits OS ... PCLinuxOS 2016 - 64.
* trace.tr = 14.4MB .
... And Ubuntu 10.10 - 32bits : Same OK result, and again trace.tr 14.4MB .
ubuntu34@ubuntu:~/Downloads/ns-allinone-2.34/ns-2.34/gpsr$ ns-gpsr-keliu wireless-gpsr.tcl
num_nodes is set 100
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
GPSR configuration file
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Load complete...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 129.2
SORTING LISTS ...DONE!
NS EXITING...
but what the problem is, there is no variations in results, like Throughput, packet delivery ratio and all. I am getting negative and zero. This is the result, I am getting.
Code:
ubuntu34@ubuntu:~/Downloads/ns-allinone-2.34/ns-2.34/gpsr$ ns-gpsr-keliu g1.tclSeeding Random number generator with 5.0
num_nodes is set 15
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
GPSR configuration file
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Load complete...
Starting Simulation...
SORTING LISTS ...DONE!
NS EXITING...
ubuntu34@ubuntu:~/Downloads/ns-allinone-2.34/ns-2.34/gpsr$ awk -f all.awk trace.tr
cbr s:0 r:0, r/s Ratio:-nan, f:38184
avg_end_to_end_delay 0.0000
ubuntu34@ubuntu:~/Downloads/ns-allinone-2.34/ns-2.34/gpsr$ awk -f pdr.awk trace.tr
sent:38184 recieve:0, PDR:0.0000
ubuntu34@ubuntu:~/Downloads/ns-allinone-2.34/ns-2.34/gpsr$ awk -f tput.awk trace.tr
Average Throughput[kbps] = -0.00 StartTime=6.32 StopTime=0.00
Code:
ubuntu34@ubuntu:~/Downloads/ns-allinone-2.34/ns-2.34/gpsr$ ns-gpsr-keliu g4.tcl
Seeding Random number generator with 60.0
num_nodes is set 15
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
GPSR configuration file
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Load complete...
Starting Simulation...
SORTING LISTS ...DONE!
NS EXITING...
ubuntu34@ubuntu:~/Downloads/ns-allinone-2.34/ns-2.34/gpsr$ awk -f pdr.awk trace.tr
sent:36357 recieve:0, PDR:0.0000
ubuntu34@ubuntu:~/Downloads/ns-allinone-2.34/ns-2.34/gpsr$ awk -f tput.awk trace.tr
Average Throughput[kbps] = -0.00 StartTime=32.29 StopTime=0.00
ubuntu34@ubuntu:~/Downloads/ns-allinone-2.34/ns-2.34/gpsr$ awk -f all.awk trace.tr
cbr s:0 r:0, r/s Ratio:-nan, f:36357
avg_end_to_end_delay 0.0000
Re #22
Hello Mr. Knudfl,
Thank you for your generous help. I have tried default examples which is mentioned in #22, it isnt working. It is showing the following error.
Code:
ubuntu34@ubuntu:~/Downloads/keliu$ ns-gpsr-keliu wireless-gpsr.tcl
couldn't read file "../tcl/lib/ns-bsnode.tcl": no such file or directory
while executing
"source.orig ../tcl/lib/ns-bsnode.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source ../tcl/lib/ns-bsnode.tcl"
(file "wireless-gpsr.tcl" line 198)
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,494
Rep:
Re #23.
tcl/lib/ns-bsnode.tcl and tcl/mobility/com.tcl :
The default wireless-gpsr.tcl was meant to be run from ns-2.3x/gpsr/.
In that way you have tcl/ available outside the gpsr/ folder.
Alternatively you can have a folder tcl/{lib/, mobility/} outside the examples folder.
→
'wireless-gpsr.tcl' depends on three configuration files : gpsr.tcl, ns-bsnode.tcl, com.tcl.
* gpsr.tcl, ns-bsnode.tcl, com.tcl cannot be replaced with some random files.
Hi,I have corrected the above error. But what I am facing is unable to analyse the statastics like PDR,end-end delay, normalised routing load. The only result, I am getting is throughput, by the throughput2007.awk script.
Code:
ubuntu34@ubuntu:~/Downloads/ns-allinone-2.34/ns-2.34/gpsr$ awk -f end-to-end.awk trace.tr
Total Delay ms:0.000000
Total Sent AGT CBR Packets :0.000000
Total Drop RTR Packets :0.000000
Number of RTR received packets:0.000000
Number of Agent CBR received packets:0.000000
Average Delay ms:-nan
Packet Delivery ratio PDR -nan
The throughput in bits per second is 0.000000
The spectral Efficiency in b/s/Hz is 0.000000
ubuntu34@ubuntu:~/Downloads/ns-allinone-2.34/ns-2.34/gpsr$ awk -f Throughput2007.awk trace.tr
Average Throughput[kbps] = 11123.03 StartTime=59.14 StopTime=999.90
Average Throughput[kbps] = 11123.03 StartTime=59.14 StopTime=999.90
hello. i m also stuck in the same problem. i have tried both gpsr-hls and gpsr-keliu versions. tried many awk scripts to get the statistics like throughput,Packet delivery ratio etc but no success. Any success in analysing these statistics?
Re#27
thanks for reply. one more question.
In the trace which i got through gpsr-hls patched which i changed according to my scenario, all recieved packets are at RTR level and no packet is recieved at AGT level why this is happening ?? please help
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.