LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-14-2013, 04:12 AM   #31
Ndia
LQ Newbie
 
Registered: May 2013
Posts: 23

Rep: Reputation: Disabled

This is what I added to .bashrc in home/user/.bashrc

NS_HOME=/home/user/ns-allinone-2.35
export PATH=$NS_HOME/nam-1.15:$NS_HOME/tcl8.5.10/unix:$NS_HOME/tk8.5.10/unix:$NS_HOME/bin:$PATH
export LD_LIBRARY_PATH=$NS_HOME/tcl8.5.10/unix:$NS_HOME/tk8.5.10/unix:/$NS_HOME/otcl-1.14:$NS_HOME/lib:$LD_LIBRARY_PATH
export TCL_LIBRARY=$NS_HOME/tcl8.5.10/library

I also discovered there is .bashrc in etc folder,where should I place the environmental variables?

and when I put the command echo path I get the following:
$ echo path
path

does this indicate its correct or?

Your kind and prompt response is highly regarded

Thanks
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 06-14-2013, 07:23 AM   #32
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 17,049

Rep: Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459
# 31 .

The echo command will "echo" any text you write :
$ echo path : Is a text to be echoed.

Please read post #30 : The command to show your PATH is $ echo $PATH

-
 
Old 06-14-2013, 08:48 AM   #33
Ndia
LQ Newbie
 
Registered: May 2013
Posts: 23

Rep: Reputation: Disabled
Thanks so much knudfl ,I can finally run .tcl scripts
 
Old 08-22-2013, 07:02 AM   #34
zadi
LQ Newbie
 
Registered: Aug 2013
Posts: 21

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Ref. post # 6

sudo apt-get install \
libx11-dev libxmu-dev libxmu-headers libxt-dev libtool g++-4.1

If you want to use nam-1.11 ( any nam can be used ) :
http://bugs.gentoo.org/attachment.cgi?id=161242
cd ns-allinone-2.29.3/tk-8.4.11/
patch -p0 < tk-8.4-lastevent.patch

Edit some 'Makefile.in' :
otcl-1.11/, line 7 : CC = gcc-4.1
tclcl-1.17/, line 40 : CC = gcc-4.1
tclcl-1.17/, line 41 : CPP = g++-4.1
ns-2.29/ , line 36 : CC = gcc-4.1
ns-2.29/ , line 37 : CPP = g++-4.1
nam-1.11/, line 44 : CC = gcc-4.1
nam-1.11/, line 45 : CPP = g++-4.1

Do 'make clean' in otcl-1.11/ and next delete the 'Makefile'.
Now ./install will work.
..
I don't understand this step.. Do 'make clean' in otcl-1.11/ and next delete the 'Makefile'.
Now ./install will work.

instruction make clean in otcl 1.11 gives me
make: *** No rule to make "clean" target. Stop.?? Plz help

Last edited by zadi; 08-22-2013 at 07:36 AM.
 
Old 08-22-2013, 10:26 AM   #35
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 17,049

Rep: Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459
Post #34, @ zadi :

Better tell what you are trying to do.
( The quoted instructions are old, not used any more.)
? Are you trying to install ns-allinone-2.29.3 ?
? And which OS are you using :
1) $ uname -m <Enter>
2) $ cat /etc/*release* <Enter>

-
 
Old 08-22-2013, 12:22 PM   #36
zadi
LQ Newbie
 
Registered: Aug 2013
Posts: 21

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Post #34, @ zadi :

Better tell what you are trying to do.
( The quoted instructions are old, not used any more.)
? Are you trying to install ns-allinone-2.29.3 ?
? And which OS are you using :
1) $ uname -m <Enter>
2) $ cat /etc/*release* <Enter>

-
i use ubuntu 10.04 *86* i want to install ns2 v 2.29.2 or 2.29.3 for P2P simulation

Last edited by zadi; 08-22-2013 at 12:24 PM.
 
Old 08-22-2013, 03:11 PM   #37
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 17,049

Rep: Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459
# 36 .

Is it "bittorrent-p2p" ?

Anyway, building ns-allinone-2.29.3 goes like this :

Prerequisites : $ sudo apt-get install g++-4.1
( ns-allinone-2.29.2 requires gcc-3.4 or earlier.)

Example with the bittorrent.patch :
$ cd ns-allinone-2.29/ns-2.29/
$ patch -p1 < bittorrent.patch
$ cd ../
$ export CC=gcc-4.1 CXX=g++-4.1 && ./install

-
 
Old 08-22-2013, 06:39 PM   #38
zadi
LQ Newbie
 
Registered: Aug 2013
Posts: 21

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 36 .

Is it "bittorrent-p2p" ?

Anyway, building ns-allinone-2.29.3 goes like this :

Prerequisites : $ sudo apt-get install g++-4.1
( ns-allinone-2.29.2 requires gcc-3.4 or earlier.)

Example with the bittorrent.patch :
$ cd ns-allinone-2.29/ns-2.29/
$ patch -p1 < bittorrent.patch
$ cd ../
$ export CC=gcc-4.1 CXX=g++-4.1 && ./install

-
yeeeeeeeeesss thanks thanks thanks thanks next step paths plz

Last edited by zadi; 08-22-2013 at 07:24 PM.
 
Old 08-23-2013, 05:12 AM   #39
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 17,049

Rep: Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459
# 38 .

Next step :
1) Make a copy of the executable 'ns' to a new name : 'ns-bittorrent'.
.. To have a backup, and to make sure it isn't mixed up with your other 'ns's.
2) $ sudo cp ns-bittorrent /usr/local/bin/
.. Then your executable 'ns-bittorrent' is in a `system PATH'.
.. And you can do $ ns-bittorrent bt_flashcrowd_flow.tcl <option> <option>
etc. etc.

-
 
Old 08-23-2013, 09:31 AM   #40
zadi
LQ Newbie
 
Registered: Aug 2013
Posts: 21

Rep: Reputation: Disabled
I'm surprised since the installation was just yesterday but when I type ns in the terminal does not give the percentage after the instalaton I am
Quote:
Originally Posted by knudfl View Post
# 38 .

Next step :
1) Make a copy of the executable 'ns' to a new name : 'ns-bittorrent'.
.. To have a backup, and to make sure it isn't mixed up with your other 'ns's.
2) $ sudo cp ns-bittorrent /usr/local/bin/
.. Then your executable 'ns-bittorrent' is in a `system PATH'.
.. And you can do $ ns-bittorrent bt_flashcrowd_flow.tcl <option> <option>
etc. etc.

-
I'm surprised ./yesteday the installation was just but when I type ns in the terminal does not give the percentage % after the instalaton I taped
$ gedit ~/.bashrc
# LD_LIBRARY_PATH
OTCL_LIB=/home/umesh/ns-allinone-2.29/otcl-1.11
NS2_LIB=/home/simulator/ns-allinone-2.29/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:
$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/simulator/ns-allinone-2.29/tcl8.4.11/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/simulator/ns-allinone-2.34/bin:/home/simulator/ns-allinone-
2.29/tcl8.4.11/unix:/home/simulator/ns-allinone-2.29/tk8.4.11/unix
NS=/home/simulator/ns-allinone-2.29/ns-2.29/
NAM=/home/simulator/ns-allinone-2.29/nam-1.11/
export PATH=$PATH:$XGRAPH:$NS:$NAM
is it just .?because its does not give the %
 
Old 08-23-2013, 10:36 AM   #41
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 17,049

Rep: Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459
# 40 .
Quote:
.. after the instalaton I typed
$ gedit ~/.bashrc
# LD_LIBRARY_PATH
OTCL_LIB=/home/umesh/ns-allinone-2.29/otcl-1.11
.
.
None of that is required. Do not write anything in .bashrc .
Unless it's a computer where you have no administrator permissions.

The "You must add <...> to .bashrc" is an 18 year old text.
At that time you didn't bring your own computer at the University.
And : You already have another ns2 version I think.

The right location for the executable 'ns' is /usr/local/bin/,
which is where it's installed when you do $ cd ns-2.29/ && sudo make install.

About nam : One 'nam' will do for all ns2 versions.
(The ns-allinone-2.29 supplied nam doesn't work unless modified.)
Please use a reliable binary nam. Post #4 here ..
http://www.linuxquestions.org/questi...0-04-a-842109/
$ cd nam-*/ && sudo cp nam /usr/local/bin/

Xgraph : $ sudo apt-get install xgraph
( No ns2 xgraph works without patching.)

-

Last edited by knudfl; 08-23-2013 at 11:21 AM.
 
Old 08-23-2013, 05:30 PM   #42
zadi
LQ Newbie
 
Registered: Aug 2013
Posts: 21

Rep: Reputation: Disabled
I'll jur you're the god of ns2 thank you
 
Old 08-23-2013, 05:44 PM   #43
zadi
LQ Newbie
 
Registered: Aug 2013
Posts: 21

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 40 .

None of that is required. Do not write anything in .bashrc .
Unless it's a computer where you have no administrator permissions.

The "You must add <...> to .bashrc" is an 18 year old text.
At that time you didn't bring your own computer at the University.
And : You already have another ns2 version I think.

The right location for the executable 'ns' is /usr/local/bin/,
which is where it's installed when you do $ cd ns-2.29/ && sudo make install.

About nam : One 'nam' will do for all ns2 versions.
(The ns-allinone-2.29 supplied nam doesn't work unless modified.)
Please use a reliable binary nam. Post #4 here ..
http://www.linuxquestions.org/questi...0-04-a-842109/
$ cd nam-*/ && sudo cp nam /usr/local/bin/

Xgraph : $ sudo apt-get install xgraph
( No ns2 xgraph works without patching.)

-
I downloaded bt_flashcrowd_star.tcl, how to simulate
 
Old 08-23-2013, 08:53 PM   #44
zadi
LQ Newbie
 
Registered: Aug 2013
Posts: 21

Rep: Reputation: Disabled
Quote:
Originally Posted by zadi View Post
I downloaded bt_flashcrowd_star.tcl, how to simulate
where is the problem plz

peertis@peertis-laptop:~$ ns /home/peertis/Bureau/peertis/bt_flashcrowd_flow.tcl 4 44 4 couldn't read file "bittorrent/bittorrent_default.tcl": no such file or directory
while executing
"source.orig bittorrent/bittorrent_default.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 bittorrent/bittorrent_default.tcl"
(file "/home/peertis/Bureau/peertis/bt_flashcrowd_flow.tcl" line 38)
 
Old 08-24-2013, 12:44 AM   #45
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 17,049

Rep: Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459
# 44 .
Quote:
"bittorrent/bittorrent_default.tcl": no such file or directory
bt_flashcrowd_star.tcl : Please run from ns-allinone-2.29/ns-2.29/.

Works OK here :
Code:
$ cd ns-allinone-2.29/ns-2.29/
$ ./ns-bittorrent bt_flashcrowd_flow.tcl 4 44 4
bittorrent/results_flash_flow_100MB_N_P_4_C_500.0Bps_seed_44_1377322065
Received piece without request
.
.
Note : There are three tcl files in the package "p2p.rar" (f09ba8b90d6b.rar)
http://www.codeforge.com/dlpre/15764...d6b.rar__.html
bt_flashcrowd_flow.tcl, bt_flashcrowd_star.tcl,
and the "Traffic source generator" file 'cbrgen_star.tcl'.

-
 
  


Reply

Tags
bittorrent-p2p, mannasim, mannasim-ns235, 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 Problem Second GCC-Pass(or gettext sanity check problem) hoes Linux From Scratch 0 09-04-2005 10:20 AM
Sound Card problem(every time i install linux i have diffirent hardware problem) jacka1l Linux - Newbie 7 08-11-2005 06:10 AM
Lan configuration problem - NFS boot problem - RX&TX packets errors 242VDM242 Linux - Networking 4 11-25-2004 01:35 PM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM
Not as much of a Solaris problem rether hardware Ultra 10 problem (video card) neo77777 Solaris / OpenSolaris 7 06-24-2003 08:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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