graph ns2
Hi all.
I'm just installed ns 2.31 in my cumputer:fedora 12 (this is the first time working with ns2 and fedora) but I don't know commands to run an example of tcl script and show the graph in my screen. plz help me. |
Welcome LQ.
I assume that you have run ./validate with few or no errors. And you can check nam : 1) cd nam-<version>/ , 2) ./nam .. to see the nam GUI open. http://www.linuxquestions.org/questi...lem-726993/#12 The command to run an example : ns2 example-Xx.tcl Some example files will open nam at once and show the simulation. Other examples will create a file : nam.out , which can be run with : nam nam.out ns 2 info : LQ Search → TagName = ns2 http://www.linuxquestions.org/questions/search.php http://www.linuxquestions.org/questi...2&pp=50&page=2 Examples and tutorial .. http://www.linuxquestions.org/questi.../ns2-781274/#2 ..... P.S. : ns-2.34 is the latest version. ..... |
Thanks very much for ur help,
But while I run ./nam it doesn't show the GUI: nam: [code omitted because of length] : no event type or button # or keysym while executing "bind Listbox <MouseWheel> { %W yview scroll [expr {- (%D / 120) * 4}] units }" invoked from within "if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} { bind Listbox <MouseWheel> { %W yview scroll [expr {- (%D)}] units } bind Li..." what is this error? |
Quote:
if you want to run nam <filename>.out |
The error : " [code omitted because of length] ,etc. "
EDIT : http://www.linuxquestions.org/questi...31-a-801695/#3 ...............About the patch 'tk-8.4-lastevent.patch' After the ns2, nam build : Test both in all different ways, you can think of. They are supposed to be statically build, i.e. only using the ns2 "tcl, tk version 8.4.14". So reinstalling the system tcl ( tk ) version 8.5.7 after the tests should usually do no harm. ..... |
to run tcl scripts, you can use the command ns...for example if you do have example.tcl you can run it as:
#ns example.tcl to run nam scripts, you can also run them as: #nam example.nam but incase your nam is connected to your tcl script it is better to call it from within your tcl script such as: exec nam example.nam & so as not to run two scripts. here you will only need to run the tcl scripts and if it does run properly the nam with its GUI will appear at the end so as you test out your example. regards NB: i too am a newbie but thanks to the forums you learn alot |
In case you are installing just package by package, i would advice for you to download ns-allinone 2.33 or depending on the version you want it comes with all the packages you need of ns, nam, tcl, tk this also helps you avoid such errors.
|
ns2 and nam
Hi all.
I have reinstalled ns2 and it shows me % when I tape ns in the shell. But I have got the same the problem with the graphic mode. I have tried many times to show an example of simulation but nothing appear. when I tape nam I always got this msg: nam: [code omitted because of length] : no event type or button # or keysym while executing "bind Listbox <MouseWheel> { %W yview scroll [expr {- (%D / 120) * 4}] units }" invoked from within "if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} { bind Listbox <MouseWheel> { %W yview scroll [expr {- (%D)}] units } bind Li..." Plz help because I need to show an example of simulation to begin working. Is it necessary to patch ns2? Thanks and regards. |
Yes, that is odd, nam-1.13 ( or 1.14 ) will not create
a working executable on Fedora 12. No problems with nam on any other modern Linux. EDIT : See post # 10. I just made a test compile of nam-1.14 , no ./install of the complete ns-allinone-2.34 . ( Is known to work perfect on Fedora 11.) Nam is a separate application, any version will do. Click my name, send an email, and I will attach a static 'nam' (version 1.14), that works on Fedora 12, to a return mail. ( filesize = 948 kB ). Suggest : 1) copy the new nam to /usr/local/bin/ Then it is in your path, and the command nam works. 2) And delete the corrupt nam-1.13/nam ..... P.S. : I guess, the best ns2 version for Fedora 12 is ns-allinone-2.34 . Fedora 11 : proplems with version 2.33 . But 2.34 works perfect. ..... |
About the 'nam' issues ..
http://www.linuxquestions.org/questi...king-793115/#9 cd tk8.4.18/ patch -p0 < tk-8.4-lastevent.patch http://bugs.gentoo.org/attachment.cgi?id=161242 http://bugs.gentoo.org/show_bug.cgi?id=225999 ..... |
hi Freinds
i install ns-2.34 & leach Protocol in ns2. i want see out graph leach but i'v this message after enter instruction ns leach.tcl: couldn't read file "mit/uAMPS/ns-leach.tcl": no such file or directory while executing "source.orig mit/uAMPS/ns-leach.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 mit/uAMPS/ns-leach.tcl" (file "leach.tcl" line 7) plz help; |
hi! for run ns2 tcl file >>> go to tcl path and
ns tclfilename.tcl for run Xgraph >>> write run command in TCL file if dont run Xgraph plz send me email(hmd_jfr@yahoo.com) |
when me execute leacltcl.tcl i'v This Message:
Usage: myleach.tcl mandatory arguments: [-x MAXX] [-y MAXY] optional arguments: [-cp conn pattern] [-sc scenario] [-nn nodes] [-seed seed] [-stop sec] [-tr tracefile] ??? |
xgraph font error
hi friend
when i run xgraph get me this error "Parameter LabelFont: can't translate `helvetica-10' into a font (defaulting to `fixed') X Error: BadFont (invalid Font parameter) Major opcode of failed request: 55 (X_CreateGC) Aborted (core dumped)" how can fix it? |
Post # 14, @Farshid : Welcome to LQ.
Is that when you run a command ( $ xgraph file ? ) or is it when you are closing xgraph ? Which version of Ubuntu are you using ? ? 1) $ cat /etc/issue <Enter> 2) $ uname -m <Enter> - |
All times are GMT -5. The time now is 01:11 AM. |