LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 08-30-2011, 01:09 AM   #1
Madhu S H
LQ Newbie
 
Registered: Aug 2011
Location: Bangalore
Posts: 21

Rep: Reputation: Disabled
ns2 not saving correctly


Hi guys,

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.

Regards
Madhu S H
 
Old 08-30-2011, 01:47 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
not a networking problem. moved to Linux - Software. Please use useful and informative thread titles in future.
 
Old 08-30-2011, 03:16 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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 ).

..
 
Old 08-30-2011, 04:58 AM   #4
Madhu S H
LQ Newbie
 
Registered: Aug 2011
Location: Bangalore
Posts: 21

Original Poster
Rep: Reputation: Disabled
ns not saving correctly

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.

Regards
Madhu
 
Old 08-30-2011, 09:44 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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.

.
 
Old 08-30-2011, 11:56 PM   #6
Madhu S H
LQ Newbie
 
Registered: Aug 2011
Location: Bangalore
Posts: 21

Original Poster
Rep: Reputation: Disabled
ns not saving correctly

Hi,

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.

Regards
Madhu
 
Old 08-31-2011, 12:07 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
The 'make install' command requires root privileges.


1) su 2) Enter password 3) make install
 
Old 08-31-2011, 12:40 AM   #8
Madhu S H
LQ Newbie
 
Registered: Aug 2011
Location: Bangalore
Posts: 21

Original Poster
Rep: Reputation: Disabled
ns not saving correctly

HI,

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.

Regards
Madhu
 
Old 08-31-2011, 01:18 AM   #9
Madhu S H
LQ Newbie
 
Registered: Aug 2011
Location: Bangalore
Posts: 21

Original Poster
Rep: Reputation: Disabled
ns not saving correctly

Hi please give me some solutions sir, i am in trouble. i am unable to run the file.
 
Old 08-31-2011, 03:51 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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

.
 
Old 08-31-2011, 04:25 AM   #11
Madhu S H
LQ Newbie
 
Registered: Aug 2011
Location: Bangalore
Posts: 21

Original Poster
Rep: Reputation: Disabled
ns not saving correctly

So now how can i run with the simulation, any other steps to be done
 
Old 08-31-2011, 04:59 AM   #12
Madhu S H
LQ Newbie
 
Registered: Aug 2011
Location: Bangalore
Posts: 21

Original Poster
Rep: Reputation: Disabled
ns not saving correctly

HI Knudfl,

Thanks alot, I got the simulation output. Thank you.\


Regards
Madhu
 
  


Reply



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
Differences between LEACH results on ns2.1b5 and ns2.35 deepa_2111 Linux - Software 15 05-16-2013 05:53 PM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM
weight throwing protocol using ns2 code,diffusion based protocol using ns2 code rajrupa Linux - Networking 1 05-27-2010 03:39 AM
[SOLVED] Wicd won't install correctly/run correctly (64-bit Slackware 13) bgraybr Slackware 3 04-01-2010 06:57 PM
[SOLVED] mozilla bookmarks not saving correctly. unix1adm Linux - Newbie 10 01-27-2009 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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