LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-06-2014, 08:47 AM   #871
pon
Member
 
Registered: Aug 2014
Posts: 77

Rep: Reputation: Disabled

Hi Knudfl
Kindly take a relax look on this and help me on solution
on executing ./test
i got following err
Quote:
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/chase/ns234/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
I probably finding the answer for this error in following links:
http://www.linuxquestions.org/questi...2-34-a-870368/
[post #2]


and
http://www.linuxquestions.org/questi...368/page9.html
[post # 134]

when i run sudo gedit /etc/apt/sources.list
in sources.list file i m getting as follows,

Quote:
#deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release i386 (20130213)]/ precise main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://in.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ precise main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://in.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://in.archive.ubuntu.com/ubuntu/ precise universe
deb http://in.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://in.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://in.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
you told to add 'hardy' and post#134 says to add 'maverick' but in that places already i have precise
and also i am not seeing any lines in sources.list like
deb http://76.73.4.58/ubuntu/ ...
deb http://76.73.4.58/ubuntu/ ...

I m not getting exactly what to add and where to add

Thanks

Pon

Last edited by pon; 09-06-2014 at 08:51 AM.
 
Old 09-06-2014, 09:59 AM   #872
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
# 871 .

No old Ubuntu compilers will work on a contemporary Ubuntu.
So : No `hardy´ (or `maverick´) can be added.
! Do not use old instructions when you have Ubuntu 12.04.

How to build a »leach + ns234« that works ...
http://www.linuxquestions.org/questi...-4175504301/#2

Info : http://www.linuxquestions.org/questions/tags/pegasis/
. http://www.linuxquestions.org/questions/tags/leach/

-
 
1 members found this post helpful.
Old 09-06-2014, 10:07 AM   #873
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
#867, @pon.
Quote:
when i tried to execute uamps.tcl , it is showing following error
"uamps.tcl" is not a simulation file.
 
Old 09-09-2014, 03:51 AM   #874
pon
Member
 
Registered: Aug 2014
Posts: 77

Rep: Reputation: Disabled
Unhappy

hi i used pegesis patch, upon executing test in ns-2.34 directory i am getting error in pegasis.err . but in the following post knudfl mentioned to see err and output in mit/leach_sims/test_simulations/leach/,
mit/leach_sims/test_simulations/leach_2, but there are more files.there is one file leach.err-save in that i am seeing following
mac/chanel.cc: INITIALIZE THE LIST xListHead
SORTING LISTS ...DONE!, but upon executing ./test , there is no changes in this file.
Pls tell me exactly where to see output and error in pegasis patched ns-2.34. Are pegasis.err pegasis.out right to see?

Quote:
Originally Posted by knudfl View Post
# 471 : Well, you could 1) read the above thread.

2) Have a look in the mit/ folder.

3) Or use the find command : a) $ cd ns-allinone-2.34/
b) $ find ns-2.34/ -name "leach.err"
→ → ./mit/leach_sims/leach.err
b1) $ find ns-2.34/ -name "leach.out"
→ → ./mit/leach_sims/leach.out

If you are using the pegasis patch / files, then leach.err + leach.out
can be found in : mit/leach_sims/test_simulations/leach/,
mit/leach_sims/test_simulations/leach_2/

-
 
Old 09-09-2014, 04:30 AM   #875
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
Ref. #874 .

Selecting simulations : See `leach_test', line 4 - 5 :
#This is the algorithm that we are going to run. 1. leach 2. leach_c 3. pegasis
alg=<algorithm>

I.e. to run pegasis, edit line 5 to alg=pegasis

The results are : ns-allinone-2.34/ns-2.34/mit/leach_sims/ \
{ pegasis.alive, pegasis.alive.txt, pegasis.data, pegasis.data.txt,
pegasis.energy, pegasis.energy.txt, pegasis.err, pegasis.out }.

The file pegasis.err should be two lines :
mac/chanel.cc: INITIALIZE THE LIST xListHead
SORTING LISTS ...DONE!

* Please read post #870.

-
 
Old 09-09-2014, 05:49 AM   #876
pon
Member
 
Registered: Aug 2014
Posts: 77

Rep: Reputation: Disabled
i am getting err in pegasis.err, since more than 10 days i stuck in this.
invalid command name "Resource/Energy"
i am using ubuntu 12.04 and ns-2.34,the following quote suggested to have gcc-4.1.2
is it possible me to install gcc 4.1.2 ?
is it mandatory to get rid of this err. or is there anyother way? almost i read all threads in thread.


Quote:
Originally Posted by knudfl View Post
Post # 628, @rajamanjulasetty : Welcome to LQ.

That's a failed build. Better use gcc/g++ version 4.1.2 .

Please read posts #555, #566, #584.



-
Thanks
Pon
 
Old 09-09-2014, 06:00 AM   #877
pon
Member
 
Registered: Aug 2014
Posts: 77

Rep: Reputation: Disabled
@ #874 Mr.knudfl,

Already i have alg=pegasis only, i am seeing pegasis.err pegasis.out in mit/leach_sims. but there is no pegasis.alive, pegasis.alive.txt, pegasis.data, pegasis.data.txt,pegasis.energy, pegasis.energy.txt

my leach_test file
Quote:
#!/bin/bash
# This file runs a generic LEACH protocol simulation.

#This is the algorithm that we are going to run. Type leach, leach-c, stat-clus or pegasis
alg=pegasis
#dirname, filename =
# The directory and filename that we want our output to be written.
dirname="mit/leach_sims"
filename=$alg

#Topology
# This file is the scenario that we are going to
# This file can be editted manually if you are very careful to create
# a predefined topology. To generate a random topology go to the
# ./mit/uAMPS/sims directory and run 'ns genscen'.
topology_file="mit/uAMPS/sims/100nodes_random.txt"
 
Old 10-04-2014, 05:33 AM   #878
tsabran
LQ Newbie
 
Registered: Sep 2014
Posts: 8

Rep: Reputation: Disabled
Similar PEGASIS problem

Hi pon
I wonder, did you find any solution to the pegasis problem your facing? My pegasis.out generates incorrect output as the energy stays the same yet the data remains 0 and nodes stays 100.
Thanks!

Quote:
Originally Posted by pon View Post
@ #874 Mr.knudfl,

Already i have alg=pegasis only, i am seeing pegasis.err pegasis.out in mit/leach_sims. but there is no pegasis.alive, pegasis.alive.txt, pegasis.data, pegasis.data.txt,pegasis.energy, pegasis.energy.txt

my leach_test file
 
Old 10-30-2014, 08:40 AM   #879
NAYEFALDAUIS
LQ Newbie
 
Registered: Oct 2014
Posts: 4

Rep: Reputation: Disabled
Help in MIT code NS

pleas, can anyone make short describe for this files
ns-ranode.tcl
extras.tcl
ns-bsapp.tcl

thanks !
 
Old 10-30-2014, 11:57 AM   #880
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
Post #879, @NAYEFALDAUIS : Welcome to LQ.

* mit/rca/ns-ranode.tcl, mit/uAMPS/extras.tcl, mit/uAMPS/ns-bsapp.tcl
.. are configuration files for running a leach simulation.
Like all files.tcl, they are text files, easy readable.


A) mit/rca/ns-ranode.tcl : .. part of the MIT SPIN project.
. http://spinroot.com/spin/Workshops/w...0_paper_13.pdf
. https://drive.google.com/file/d/0B7S...ew?usp=sharing
. https://drive.google.com/file/d/0B7S...ew?usp=sharing

B) mit/uAMPS/extras.tcl : .. MIT uAMPS
. http://www-mtl.mit.edu/researchgroups/icsystems/uamps/
. https://www.google.com/webhp?hl=all&...+uAMPS+project
§1) Functions to calculate distances.
§2) Computational energy dissipation model
... for beamforming num signals of size bytes / signal.
§3) Miscellaneous printing (output) functions.

C) mit/uAMPS/ns-bsapp.tcl : .. MIT uAMPS
§1) Base Station Application.
§2) Helper Functions.
§3) Receiving Functions
§4) Sending Functions

-

Last edited by knudfl; 10-31-2014 at 06:54 AM.
 
1 members found this post helpful.
Old 12-11-2014, 03:09 AM   #881
reenkamal
LQ Newbie
 
Registered: Sep 2014
Posts: 14

Rep: Reputation: Disabled
problem in leach.out and leach.tr file

Hello every body
I have installed ns2.34 in ubuntu 14.04 and then i added leach patch into ns2.34.But when i run command ./leach_test,the generated leach.out and leach.tr simulation is only for 1.09 secs, whereas in ./leach_test file simulation time is set to 3600 secs.
Please help me asap.
thank you.
 
Old 12-11-2014, 04:09 AM   #882
NAYEFALDAUIS
LQ Newbie
 
Registered: Oct 2014
Posts: 4

Rep: Reputation: Disabled
Thumbs up thank you

Quote:
Originally Posted by knudfl View Post
Post #879, @NAYEFALDAUIS : Welcome to LQ.

* mit/rca/ns-ranode.tcl, mit/uAMPS/extras.tcl, mit/uAMPS/ns-bsapp.tcl
.. are configuration files for running a leach simulation.
Like all files.tcl, they are text files, easy readable.


A) mit/rca/ns-ranode.tcl : .. part of the MIT SPIN project.
. http://spinroot.com/spin/Workshops/w...0_paper_13.pdf
. https://drive.google.com/file/d/0B7S...ew?usp=sharing
. https://drive.google.com/file/d/0B7S...ew?usp=sharing

B) mit/uAMPS/extras.tcl : .. MIT uAMPS
. http://www-mtl.mit.edu/researchgroups/icsystems/uamps/
. https://www.google.com/webhp?hl=all&...+uAMPS+project
§1) Functions to calculate distances.
§2) Computational energy dissipation model
... for beamforming num signals of size bytes / signal.
§3) Miscellaneous printing (output) functions.

C) mit/uAMPS/ns-bsapp.tcl : .. MIT uAMPS
§1) Base Station Application.
§2) Helper Functions.
§3) Receiving Functions
§4) Sending Functions

-
thank you so much >>> relay very helpful
 
Old 12-11-2014, 04:29 AM   #883
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
← Ref. post #881 .

`leach_test' →
Line 25 : # stop is the time to stop the simulation if it is still running
Line 26 : stop=3600
( The latest update :
leach+pegasis-ns234-files-2.tar.gz by @exidus : stop=50 ).

As you can read in line 25 : 3600 (or 50) is just the maximum time.
* The files are ancient.
./test, ./leach_test may have run for a longer time 15 years ago.
Different version of ns2. Slower computers.
With ns-2.34 and a modern computer, and with default parameters :
It's 1 .. 2 seconds.

-

Last edited by knudfl; 12-11-2014 at 04:34 AM.
 
1 members found this post helpful.
Old 12-11-2014, 08:21 PM   #884
reenkamal
LQ Newbie
 
Registered: Sep 2014
Posts: 14

Rep: Reputation: Disabled
[QUOTE=knudfl;5282913]← Ref. post #881 .

Hello sir
I added leach+pegasis patch into ns2.34.firstly everything was going correct but soon i observed that in my trace file leach.tr number of received packets are double or even more than the number of packets sent.
Please tell me why this is happening.
thank you
 
Old 02-22-2015, 10:34 AM   #885
emprit
Member
 
Registered: Feb 2015
Location: jl. bogor 1 no 91, malang, jawa timur, indonesia
Distribution: any linux
Posts: 81

Rep: Reputation: Disabled
Quote:
Originally Posted by deepa_2111 View Post
@ forco,

eq_energy means that all nodes are allotted the same amount of energy (init_energy). I think the reason why your code is not printing values could be that all nodes are trying to transmit at the same time, leading to collisions and thereby huge energy expenditure. How many nodes do you have in the network ? If you have 100, max energy can only be 200.

Also, note that increasing no. of nodes to beyond 300 causes the LEACH code to stop working/run improperly.
i still confuse with eq_energy, u mean if i have 101node and i need all node get same amount of energy, so i must input eq_energy = 101?
 
  


Reply

Tags
leach, leach-warning50, ns2, ns2 ns234, pegasis



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:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
labview stopped at "init tmp resource files" on FC4 baosheng Linux - Software 2 09-28-2007 11:02 AM
ORiNOCO WLAN card not working - "failed to allocate resource" hauneboo Linux - Laptop and Netbook 1 11-29-2005 09:08 AM
What "kernel opts" allow PC to power down with "turning energy off"? kornerr Linux - General 1 03-10-2005 12:07 PM
nvidia insmod: "Device or resource busy" w/GeForce 4 MX KeithSpook Linux - Hardware 4 03-03-2004 12:21 PM

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

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