LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-20-2014, 11:10 AM   #676
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599

# 675 .
Quote:
I have checked for ns-pegasis executable file in ns-2.34/ folder, but it is absent
The package "pegasis-ns-2.34-ubuntu10_i386.deb" provides /usr/local/bin/ns-pegasis .
The command $ dpkg -L <package-name> will show.
( I.e. $ dpkg -L pegasis-ns )

There is not supposed to be any file by name 'ns-pegasis' in ns-2.34/ .

-

Last edited by knudfl; 01-20-2014 at 02:58 PM.
 
1 members found this post helpful.
Old 01-20-2014, 02:49 PM   #677
mhmdmahdi
Member
 
Registered: Nov 2013
Location: Indonesia
Distribution: Ubuntu 12.04
Posts: 41

Rep: Reputation: 22
Quote:
Originally Posted by keepwalking123 View Post
@mhmdmahdi, hey i tried as u said..but it gives error as ns-pegasis:command not found.I hav checked for ns-pegasis execution file in ns2.34 folder but it is absent.i think the error is due to it only.i have installed exidus-pegasis-leach-ns234-patch.2 not the your package i.e. pegasis-ns-2.34-ubuntu10_i386.deb. Is it for leach protocol? and is it give correct output of leach protocol..if yes..please provide that package here and also tell me steps to install it..please i have spent lots of days to get correct output but still facing problems..please help..
please install the package "pegasis-ns-2.34-ubuntu10_i386.deb" first before you made a change on leach_test file.
the package created by Sir Knudfl, and can be found on post #584 here: http://www.linuxquestions.org/questi...68/page39.html

Credit to Knudfl who created the package
 
Old 01-20-2014, 11:56 PM   #678
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@mhmdmahdi
actually my OS is ubuntu 12.04 and the package seems like for ubuntu 10.so is it compatible to my OS?
 
Old 01-21-2014, 01:33 AM   #679
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@mhmdmahdi and @knudfl
hello i just installed pegasis-ns-2.34-ubuntu10_i386.deb package in my ubuntu 12.04 OS and warnings are gone now. but in leach.output the simulation stops at 50 only though 95 nodes are still alive.what is the reason behind it? here is some snapshot of output file please check it and tell me.help please..
Attached Files
File Type: txt leach1.out.txt (8.6 KB, 20 views)
 
Old 01-22-2014, 10:20 AM   #680
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Hmmm ... Am not very sure if what he said is right. If you are using LEACH, even in a big network, nodes will belong to clusters whose CH is within the line of sight distance (~ 87 units).
Maybe he has some other algorithm or ideas in mind.

Quote:
Originally Posted by mhmdmahdi View Post
yes, i agree with you. but i don't know, my prof. asked me to analyse that.
he said multi-hop will be useful in a big size network.. still need to prove his opinion right or wrong.
thanks for your answer anyway
 
Old 01-22-2014, 11:24 AM   #681
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@deepa
hey deepa..can u check my output file in post #679..n tell me is it correct output? why m asking is coz though still 95 nodes are alive..simulation stops..wht is the problem here?
 
Old 01-23-2014, 06:40 AM   #682
michou_87
LQ Newbie
 
Registered: Feb 2012
Posts: 7

Rep: Reputation: Disabled
HELP

Quote:
Originally Posted by sonatasin View Post
this is my code to select a vice cluster head among cluster nodes, according to their energy, the cluster head chooses among its member , the node with the highest energy . this is the code

# Set the TDMA schedule and send it to all nodes in the cluster.
set TDMA $clusterNodes_
set Ei 0
set nodeID [$self nodeID]
set element $nodeID

foreach element $TDMA {

set E [[$self getER] query]
puts " energy est $E "
if { $Ei < $E } {
set Ei $E

}
}
set SCH $element
puts " le vice cluster de CH $chID est $SCH "

-->the result (energy nodes of each cluster are equal)
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
energy est 1.4088472606115843
the vice cluster head of CH 7 is 23
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
energy est 1.3976149376339855
the vice cluster head of CH 10 is 42
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
energy est 1.4792380219880841
the vice cluster head of CH 25 is 53
energy est 1.3267670010478381
energy est 1.3267670010478381
energy est 1.3267670010478381
energy est 1.3267670010478381
the vice cluster head of CH 56 is 27
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
energy est 1.5025911961133158
the vice cluster head of CH 59 is 88
please, I want to extract residual energy, node alive and dead node, so how can I add the script in wireless.tcl. Please help me
 
Old 01-24-2014, 02:06 AM   #683
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
hello,how can i get node's distance from base station..please anyone can help me??pleaseeeee....
 
Old 01-24-2014, 05:01 AM   #684
michou_87
LQ Newbie
 
Registered: Feb 2012
Posts: 7

Rep: Reputation: Disabled
Hi;
I install leach in ns2.34, and when I simulate ./leach_test I got this error in leach.err:
no such variable
(read trace on "env(RCA_LIBRARY)")
invoked from within
"source $env(RCA_LIBRARY)/ns-ranode.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 9)
invoked from within
"source.orig mit/uAMPS/sims/uamps.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/sims/uamps.tcl"
(file "/home/cheima/ns-allinone-2.34/ns-2.34/tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig /home/cheima/ns-allinone-2.34/ns-2.34/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 /home/cheima/ns-allinone-2.34/ns-2.34/tcl/mobility/$opt(rp).tcl"
(file "/home/cheima/ns-allinone-2.34/ns-2.34/ns-234-leach/tcl/ex/wireless.tcl" line 187)
I change the uamps.tcl but I got the same problem, I don't know why. Please help me I'm stuck.
 
Old 01-24-2014, 01:11 PM   #685
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
@keepwalking123,

Please upload your leach.out ?
This looks like a mofified version of leach.out.

Quote:
Originally Posted by keepwalking123 View Post
@deepa
hey deepa..can u check my output file in post #679..n tell me is it correct output? why m asking is coz though still 95 nodes are alive..simulation stops..wht is the problem here?
 
Old 01-24-2014, 01:12 PM   #686
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
@michou_87,
This has already been asked far too many times in this forum, and replied to as well. Please refer earlier posts in this thread.

Quote:
Originally Posted by michou_87 View Post
Hi;
I install leach in ns2.34, and when I simulate ./leach_test I got this error in leach.err:
no such variable
(read trace on "env(RCA_LIBRARY)")
invoked from within
"source $env(RCA_LIBRARY)/ns-ranode.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 9)
invoked from within
"source.orig mit/uAMPS/sims/uamps.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/sims/uamps.tcl"
(file "/home/cheima/ns-allinone-2.34/ns-2.34/tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig /home/cheima/ns-allinone-2.34/ns-2.34/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 /home/cheima/ns-allinone-2.34/ns-2.34/tcl/mobility/$opt(rp).tcl"
(file "/home/cheima/ns-allinone-2.34/ns-2.34/ns-234-leach/tcl/ex/wireless.tcl" line 187)
I change the uamps.tcl but I got the same problem, I don't know why. Please help me I'm stuck.
[COLOR="Silver"]

Last edited by deepa_2111; 01-24-2014 at 01:13 PM.
 
Old 01-24-2014, 01:14 PM   #687
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Do you want the actual distance or the communication distance ?

Quote:
Originally Posted by keepwalking123 View Post
hello,how can i get node's distance from base station..please anyone can help me??pleaseeeee....
 
Old 01-25-2014, 10:41 AM   #688
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@ Deepa
hi, what is the distance parameter i.e in between CH and node in leach.out file? is it actual distance or communication distance?
why i m asking because m not clear in difference between them.actually i know that energy consumption is directly proportional to distance.but is it physical or communication distance then?
 
Old 01-27-2014, 12:50 AM   #689
michou_87
LQ Newbie
 
Registered: Feb 2012
Posts: 7

Rep: Reputation: Disabled
@nmmn134
Hi, I also install exidus-pegasis_ns-234-leach.tar of exidus but I got this problem in leach.err:
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/cheima/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/cheima/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
"source /home/cheima/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 30)
invoked from within
"source.orig mit/uAMPS/sims/uamps.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/sims/uamps.tcl"
(file "/home/cheima/ns-allinone-2.34/ns-2.34/tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig /home/cheima/ns-allinone-2.34/ns-2.34/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 /home/cheima/ns-allinone-2.34/ns-2.34/tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)

please help me I'm very stuck please
 
Old 01-27-2014, 01:15 AM   #690
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@deepa
hi deepa, actually i want to modify leach protocol now.so can u please tell me which files i need to modify along with ns-leach.tcl? please..and how can i understand exact flow of program so that i can modify code..help please..
 
  


Reply

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


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:"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 09:43 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
Open Source Consulting | Domain Registration