LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-27-2015, 06:06 AM   #1
najat
Member
 
Registered: Apr 2015
Posts: 58
Blog Entries: 1

Rep: Reputation: Disabled
Nam execution


Hello,
I' ve already install the ns-2.29.
But when i want to execute nam.
I have this error :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 {[string equal [tk windowingsystem] "classic"]
|| [string equal [tk windowingsystem] "aqua"]} {
bind Listbox <MouseWheel> {
%W yview scroll [expr {..."


How can i install it?
 
Old 04-27-2015, 06:20 AM   #2
najat
Member
 
Registered: Apr 2015
Posts: 58

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Hello,
When i execute this command :
najat@najat-laptop:~/ns-allinone-2.29$ nam
I got the nam window but when i execute this code:

set ns [new Simulator]
#Open the nam trace file
set nf [open out.nam w]
$ns namtrace-all $nf
#Define a 'finish' procedure
proc finish {} {
global ns nf
$ns flush-trace
#Close the trace file
close $nf
#Execute nam on the trace file
exec nam a out.nam &
Create two nodes
set n0 [$ns node]
set n1 [$ns node]
#Create a duplex link between the nodes
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
#Call the finish procedure after 5 seconds of simulation time
$ns at 5.0 "finish"
#Run the simulation
$ns run

exit 0
}

I don't have the nam graph -a out.nam
 
Old 04-27-2015, 07:08 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,483

Rep: Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633
Re #1.

The "ns-allinone-2.xx/nam-1.** will often fail.
Please use a nam package, see post #2 here
http://www.linuxquestions.org/questi...-4175524760/#2


Re #2.

Your code is supposed to be like the old Marc Greis example1.tcl.
-
Attached Files
File Type: txt example1.tcl.txt (582 Bytes, 14 views)
 
  


Reply


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
ns: stop: couldn't execute "nam": permission denied while executing "exec nam Niraj Mishra Linux - Newbie 1 11-08-2014 06:57 AM
[SOLVED] ns2.29 -nam Ndia Linux - Software 1 05-26-2013 03:20 AM
Zoom in NAM barthunder52 Linux - Software 0 09-14-2012 12:59 AM
NAM is not working Nemi Ubuntu 3 03-19-2010 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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