Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
This is Madhu. I am working on tcp/ip for wireless networks on Linux Redhat, on an opensource tool NS2, since i am a beginner i am facing a problem in showing the simulations on the NAM window. i hav installed Ns all-in-one 2.34 package. i am writing the code in an editor window and save it as .tcl, then if i open it in the nam window, the file name which i saved is not existing , by this problem i am unable to open the created file to simulate it, can anyone help me to solve this problem.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513
Rep:
Quote:
and save it as .tcl, then if i open it in the nam window
'nam' is not the tool for files.tcl . 'ns' is.
Please open a terminal window, and type : pwd <Enter>
The pwd command informs about your location. Probably /home/<your-user-name>/
If you saved file.tcl in say Documents/, either use a full path :
'ns Documents/file.tcl . Or use the cd command to change to
the directory with file.tcl : 1) cd Documents/ 2) ns file.tcl
The command 'ns file.tcl' may activate nam too.
Else run nam afterwards, to run a possible "out.nam" file : nam out.nam
And please try out some examples in ns-allinone-2.34/ns-2.34/tcl/ex/ ,
like 'ns ns-allinone-2.34/ns-2.34/tcl/ex/simple.tcl'
Or this one : cd ns-allinone-2.34/ns-2.34/tcl/ex/ && ns nam-example.tcl
( Etc. etc. : There are 400 examples ).
hi knudff,
i am doing wit the procedure which u mentioned but in the terminal window once i change the directory and type as ns file.tcl, i am getting it as ns command not found, so can u please tel me how can take the steps further.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513
Rep:
1) cd ns-allinone-2.34/ns-2.34/ ; su ; make install
2) cd ../nam-1.14/ ; make install
The two 'make install' commands will copy 3 files to /usr/local/ :
a) The man page 'ns.1'
b) /usr/local/bin/ns
c) /usr/local/bin/nam
.... So now you can type ns or nam anywhere :
the command is in a system path and will always be found.
I am doing with cd ../nam-1.14/;make install, but i am reporting with a message as permission denied, so what process can i do with. can u please send the complete prcess of writing the code and in which the file should be saved like .tcl or.tr or .nam, and how should i run it or simulate it in the nam window. how do we extract the saved code and simulate the file. please explain me.
yess i am getting the nam editor window once i do all the process, but wen i am trying to open the saved file the file is not shown in that path. i created my own folder named madhu, i have written the code in kedit and saved as example.tcl in madhu, one i open the nam editor window for simulation of that example.tcl i am unable to see the file example.tcl in nam window. like in nam window i go to file-open-home-madhu but in this madhu folder it shows all other files that i saved like pdf r any other document but i am unable to see the file saved as example.tcl . can you please tel me where am i doing mistake.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513
Rep:
Quote:
.. once I open the nam editor window for simulation of that example.tcl
I am unable to see the file example.tcl in nam ..
Nam can not be be used for files.tcl. See post # 3.
About the 'ns' command : Some files.tcl must be run inside ns-2.34
in the folder relevant for that file.
Like : cd ns-allinone-2.34/ns-2.34/tcl/ex/ && ns nam-example.tcl
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.