ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
I've lately successfully patched LTE as far as I think but I've two basic problems,first is that the trace file of a program that I'm running is empty secondly I get the following error when I run the code:
Code:
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
invalid command name "Session/RTP::debug_"
while executing
"Session/RTP::debug_ set 1"
("for" body line 9)
invoked from within
"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 ..."
(file "/home/dba/Desktop/lte.tcl" line 54)
as per the instructions in the file tcl-object.tcl I've added the line "Session/RTP::debug_ set 0" in the ns-default file but it's not working and also there's no nam simulation that I can see.The program that I ran was:
Code:
set ns [new Simulator]
set nf [open lte.tr w]
$ns trace-all $nf
set nf [open lte.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
Session/RTP::debug_ set 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 $nf
close $nf
exec nam lte.nam &
exit 0
}
$ns run
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Session/RTP::debug_
see tcl-object.tcl in tclcl for info about this warning.
ns: finish: couldn't execute "nam": no such file or directory
while executing
"exec nam out.nam &"
(procedure "finish" line 6)
invoked from within
"finish"
I did sir that's why I don't understand why is it giving this error.I installed ns-allinone-2.33 which has nam 1.13,I don't remeber any error during installation of nam.Do you still advise to install nam 1.14?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516
Rep:
# 5.
A nam build will most often fail. And the failing build is ignored,
like the other applications not required for the 'ns' build.
You will only be stopped at "./install" when tcl tk otcl tclcl ns-2.* fails.
Nam is an "extra application". Actually any nam version can be used.
Nam version 1.13 and 1.14 are identical, so far concerns Linux.
( 1.14 has an edit for 'Sun OS'. Ref. the file nam-1.14/CHANGES.html )
OK Sir I'll install nam again and see what happens,I have one more question from you, you once had written somewhere that if one has to install more than 1 versions of NS2 he should not add it to path.You told me the procedure for installing more than one versions of NS2 in post#4 in the following link:
I did follow those instructions but due to certain errors I had to reinstall NS2.Currently I have an LTE patched ns-2.33 which is added to path, In case I have to install more versions do I have to delete all lines from the .bashrc file under the heading of PATH or LD_LIBRARY_PATH as well.My bashrc has the following code,just in case:
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516
Rep:
# 7
Quote:
In case I have to install more versions do I have to delete all lines from the .bashrc file
No entries are required to .bashrc or .bash_profile. Never.
Also when you have one only ns-allinone-2.xx install.
So you can just delete the added lines.
The ns executable is hard coded to know the path for its libraries.
And the "ns-allinone-2.xx xgraph" never works.
( Get xgraph : sudo apt-get install xgraph ).
Executable 'ns's : Copy all 'ns' to a different name, 'ns-lte' etc.,
and then copy all the new renamed "ns-*" to /usr/local/bin/ .
All LTE examples work OK with $ ns-lte example.tcl .
Sir I followed your instructions and eyana.tcl is working thankfully (although along with the warnings I told you about).The other two files I have are not working as yet but I'll see to them InshaAllah.
Following two links can be used for downloading tracegraph:
I got it from the first link I beleive and read the instructions from the second.There's a visual trace analyzer available for NS2 also, if tracegraph doesn't work fine I beleive I should move to that(provided it works).Visual trace analyzer can be downloaded from the following link:
Thankyou Sir, it's patched except I have one problem and that is in case I run certain examples one of which is http://eurane.ti-wmc.nl/eurane/test_tcp.tcl.txt it gives me an error : can't open file idealtrace. I did search for the solution and in the link http://lists.ti-wmc.nl/pipermail/ns-...er/000081.html it is mentioned that idealtrace should be the same directory as tcl, now does that mean I have to save idealtrace in tcl folder or I have to save it in the ns-allinone-2.30 folder where tcl8.4.13 is present.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516
Rep:
# 12
"the same directory as tcl" : Here it means the current directory.
I think all the "eurane examples" will do fine in any location.
( Like /home/dba/eurane-examples/ )
test_tcp.tcl.txt, line 109, 110, 111 :
$bs setErrorTrace 0 "idealtrace"
$bs setErrorTrace 1 "idealtrace"
$bs loadSnrBlerMatrix "SNRBLERMatrix"
→ → that's current directory for 'idealtrace' and 'SNRBLERMatrix'
( http://eurane.ti-wmc.nl/eurane/SNRBLERMatrix.gz )
If the file had said e.g.: $bs setErrorTrace 0 ../idealtrace
.. or : $bs setErrorTrace 0 umts/idealtrace
.. then a specific "test_tcp.tcl location" would have been required.
( But then again, lines 109-111 would have been easy to edit.)
I put the whole path which went something like $bs setErrorTrace 0 "/home/dba/X/idealtrace" etc. and it worked.Thankyou Sir!
Do you know if nam simulates umts because if I add any of the lines such as "set nf [open out.nam w]" and in the finish proc "exec nam out.nam" it says
Code:
nam cannot recognize the trace file lo.nam
Please make sure that the file is not empty and it is a nam trace
But may be hs-dsch.tcl will show how to get a nam result in the other examples.
Other info : http://eurane.ti-wmc.nl/eurane/EURAN...ls_itpp.tar.gz
> EURANE_multi_cells_itpp/simulation_scripts/ReadmeFirst.txt
> EURANE_multi_cells_itpp/code/ ns-eurane-113-itpp.diff Readme.txt
I will report back, if any interesting simulations in 'eurane.multi.cells.itpp'.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.