LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 11-12-2015, 01:16 AM   #1
celiajohn
LQ Newbie
 
Registered: Nov 2015
Posts: 3

Rep: Reputation: Disabled
Invalid Command Resource/Energy while running leach protocol on ns2.34


Hi

I have installed ns2.34 on ubuntu 14.04 64 bit and am facing an error while running leach protocol( from leach+pegasis-ns234-files-2.tar.gz) on it. The error is given below

I have looked at the available solutions but none seem to work.

Please help.

Regards,
Celia


invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams {args} {
$self instvar energyLevel_ alarmLevel_
set energyLevel_ [lindex $args 0]
set alarmLevel_ [lind..."
(file "/home/celia/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/celia/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.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
(procedure "source" line 8)
invoked from within
"source mit/uAMPS/sims/uamps.tcl"
(file "tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig tcl/mobility/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 tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)
 
Old 11-12-2015, 05:37 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

Even if you do things right, you will not get much with Ubuntu 14.04 - x86_64.
The xgraph plot file leach.alive.txt is a one liner.
* The leach+pegasis-ns234-files-2.tar.gz works slightly better with CentOS 6.7 - i686.

So unless you are specifically going for PEGASIS, please use the dedicated 64bits patch.
I.e. leach_ns235-Jun2015.patch, for ns-allinone-2.35_gcc482.tar.gz .
See #11 for the build http://www.linuxquestions.org/questi...4175556129/#11

And http://www.linuxquestions.org/questi...gy-4175556129/
... for other details, like $ gawk -f leach__nodes-alive.awk leach.alive >> leach.alive.txt

Do not add any *PATH for 'ns' to .bashrc . Not required.
( /usr/local/bin/ns will do.)
The .bashrc can be edited. Or replaced with the original .bashrc :
https://drive.google.com/file/d/0B7S...ew?usp=sharing


-

Last edited by knudfl; 11-12-2015 at 05:39 AM.
 
  


Reply

Tags
leach, ns2



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
problem with running leach protocol in ns2.34 leach.er Mohamed69 Linux - Software 14 04-16-2018 07:10 AM
[SOLVED] erorr in leach.err (invalid command name "Resource/Energy) SAHO Linux - Software 26 01-15-2018 07:36 AM
Issue in Leach Protocol Installation : invalid command name "Resource/Energy" Hataki_Kakachi Linux - Software 26 01-02-2018 08:38 AM
invalid command"Resource/Energy" in leach.err file of exidus-pegasis-leach-patch2 flowing_river Linux - Software 0 03-16-2015 06:44 PM

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

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