What Do I Do With This Huge Data On My Command Line Interface

Hi,

I have been trying to get information on how to process the output of a tcl file (aodv and leach protocol using mannasim) which I got on my command line Iinterface. Actually, I don't even know the keywords to search as I am new to this and other minor attempts haven't yielded positive results., I know there is usually a trace file but I can't see any. All I see is on my command line.

I also observe that it took the space on the entire screen and I can't copy the output from the start ( I could only copy from node 19 out of 30 nodes) because of the huge number of output lines.

The last thing I havent been able to figure ou is whether temperature is equivalent to energy Iin mannasim as mannasim has only temperature and carbon dioxide?


Thanks


Similar Content



How Do I Edit Mannasim Tcl File To Generate Mobile Nodes For WSN Protocols

Hi,

I intend to use mannasim script generator tool to create mobile nodes for routing protocols like aodv, leach , dsdv and dsr.

To be best of my knowledge, WSN nodes in mannasim are assumed to be static but I would like to know if there is a resource available which explains how the tcl code can be modified to achieve node mobility.

I have tried searching google but I haven't gotten satisfying search result.

It seems is better to ask an experienced ns2/mannasim user.

Be sure your kind response is valued

How Do I Go About Evaluating Energy Efficiency In Aodv And Leach Protocol.

Hi,

I am interested in evaluating the energy efficiency for aodv and leach protocol. I havent been able to get through with mannasim because of this error:

ns:
[code omitted because of length]
: invalid command name "DataGenerator/TemperatureDataGenerator"
while executing
"DataGenerator/TemperatureDataGenerator set sensing_interval_ 0.0"

Do anyone have a link that could be of help? Also I would appreciate if anyone has a file/link in which energy efficiency of this two protocols have been evaluated on ns2.

Be sure your contribution is highly valued

Thanks

Command Output To File On The Same Line

I know that '>' and '>>' will redirect output to a file

However, how does one keep this output on the same line as the previous line?

'echo -n' will stop a trailing new line but for terminal redirection?

Error In Mannasim Generated Tcl File

hi ,
i have integrated mannasim with ns2.35 on 32 bit ubuntu 12.04 and on 13.04 also. generated leach.tcl on desktop. but while simulating got an error: meta size 2844 is too large(max-1000).

pl help.
very urgent

Search For A Character In Specific Word In File And Replace It In The Word

Hi all ,
I have a requirement where I have a file. Contents of the file are :
#comments
VAR="abg"
RES=123
#comments
IC6790ABG="https://www.abc.com"
IC5678-vg="https://www.bhy.com"
IC-gy_567:78="https://www.gyt.com"
#comments
The variable names can not have characters like - , : so
in this file I have to find words starting with IC and replace characters like - ,:
I want to change only the variable name , not the whole line.
I have used SED command

sed -i '/^IC/s/[^0-9 a-z A-Z _]*//g' file

when I am using this command , it is replacing the whole line
output becomes :

#comments
VAR="abg"
RES=123
#comments
IC6790ABGhttpswwwabccom
IC5678vghttpswwwbhycom
ICgy56778httpswwwgytcom
#comments


But I want the output like this :

#comments
VAR="abg"
RES=123
#comments
IC6790ABG="https://www.abc.com"
IC5678vg="https://www.bhy.com"
ICgy_56778="https://www.gyt.com"
#comments

How can I get the desired output , thanks for your help in advance .

No Data Sent In Pegasis.out (NS2)

Hi all,

I was wondering did anyone try running PEGASIS simulation on NS-2.34? I am using Ubuntu 10.04 and I tried running it with the LEACH+PEGASIS patch from exidus, but the pegasis output does not seem right, although the leach output seems fine.
As seen there is not data sent and the nodes alive stays 10 (used only 10 nodes) with energy still intact. Any input/thoughts are appreciated, thanks!

Code:
Creating sensor nodes... - uAMPS.tcl
0 1 2 3 4 5 6 7 8 9 (10 == BS) - uAMPS.tcl
*** NOTE: no connection pattern specified. - wireless.tcl
Loading scenario file... - wireless.tcl
Node 0: (3.6149593552644173,36.078549379519444)
Node 1: (58.871299055810688,72.899243455798938)
Node 2: (66.192033079542227,78.762060347368035)
Node 3: (26.408279047537725,13.096542662520214)
Node 4: (69.871280002347788,8.1301262174407611)
Node 5: (59.175824494648644,20.065448163107714)
Node 6: (23.120326699279399,59.510628627385309)
Node 7: (35.061642916436142,75.71922716485301)
Node 8: (10.49768087011654,98.860375722339555)
Node 9: (28.928238399759049,88.984149177085683)
Max Distance for this Simulation is 113.0
Load complete... - wireless.tcl
Starting Simulation... - wireless.tcl
BS received info: (3.6149593552644173 36.078549379519444 2) from Node 0  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 1 - mit/uAMPS/ns-bsapp.tcl
BS received info: (58.871299055810688 72.899243455798938 2) from Node 1  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 2 - mit/uAMPS/ns-bsapp.tcl
BS received info: (66.192033079542227 78.762060347368035 2) from Node 2  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 3 - mit/uAMPS/ns-bsapp.tcl
BS received info: (26.408279047537725 13.096542662520214 2) from Node 3  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 4 - mit/uAMPS/ns-bsapp.tcl
BS received info: (69.871280002347788 8.1301262174407611 2) from Node 4  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 5 - mit/uAMPS/ns-bsapp.tcl
BS received info: (59.175824494648644 20.065448163107714 2) from Node 5  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 6 - mit/uAMPS/ns-bsapp.tcl
BS received info: (23.120326699279399 59.510628627385309 2) from Node 6  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 7 - mit/uAMPS/ns-bsapp.tcl
BS received info: (35.061642916436142 75.71922716485301 2) from Node 7  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 8 - mit/uAMPS/ns-bsapp.tcl
BS received info: (10.49768087011654 98.860375722339555 2) from Node 8  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 9 - mit/uAMPS/ns-bsapp.tcl
BS received info: (28.928238399759049 88.984149177085683 2) from Node 9  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 10 - mit/uAMPS/ns-bsapp.tcl

At 10: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 20: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 30: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 40: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 50: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 60: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 70: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 80: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 90: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 100: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 110: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 120: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 130: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 140: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 150: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 160: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 170: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 180: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 190: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 200: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 210: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 220: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 230: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 240: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 250: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 260: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 270: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 280: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 290: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 300: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 310: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 320: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 330: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 340: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 350: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 360: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 370: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 380: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 390: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 400: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 410: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 420: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 430: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 440: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 450: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 460: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 470: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 480: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 490: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 500: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 510: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 520: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 530: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 540: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 550: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 560: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 570: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 580: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 590: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 600: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


Simulation complete. - mit/uAMPS/stats.tcl

num_nodes is set 11
mac/channel.cc: sendUp - Calc highestAntennaZ_ and distCST_
mac/channel.cc: highestAntennaZ_ = 1.5,  distCST_ = 160.8

Removing Multiple Lines From Cell Data In A .csv File

I am trying to process some .csv files with Linux as follows:

Some fields have data with newline characters embedded, like so:

"Bob Smith
531 Pennsylvania Avenue
Washington, DC"

(I verified the existence of the " via Wordpad. The file is too large to easily edit in Wordpad to get all the data for each row on a single line).

what linux command would I use on the files to get the data in each cell on one line?

I have tried:

1. awk -v RS="" '{gsub (/\n/,"")}1' file > newfile

but the cell data was still being read in as if "531 Pennsylvania Avenue" was a brand new row in the CSV file.

2. Command 1 followed by awk -v RS="" '{gsub (/\r/,"")}1' newfile > finalFile

but that resulted in all of the data in the file being put onto a single line.

3. awk -v RS="" '{gsub (/\r\n/,"")}1' file > newFile

But that result was the same as attempt number 2.

How can I preprocess the file so that:

"Bob Smith
531 Pennsylvania Avenue
Washington, DC"

is read as a single field on a single line as part of the row it should be associated with, like

"Bob Smith 531 Pennsylvania Avenue Washington, DC"

How To Search All Sub-directories For A File Or Command Line In A File In Ubuntu?

Hello--

I'm trying to locate a file or a command line in a file on my hard drive. I am running Ubuntu 12.05.4 linux. Is there a grep command that will search the whole tree from root down to all the sub-directories?

Thank You.

How To Patch GPSR Routing Protocol To Ns-2.35

Hi,
I have patched GPSR to ns-2.35 using keliu' code. It works fine with given tcl file. I need to move nodes according to mine own mobility scenario and compare them to AODV protocol.
I have two problems
1. I don't understand what this command in gpsr.tcl file means Code:
proc gpsr-create-mobile-node { id args } {
         .........................	
if [info exists opt(energy)] {
	$node addenergymodel [new $opt(energy) $node 10 0.5 0.2]}
         .............

What are these figures (0.5, 0.2), are these energy consumed in reception and transmission or some thing else.

Secondly I want move mobile node created using proc defined in gpsr.tcl file according to my own mobility plan e.g. Code:
 $ns_ at 0.000000000000 "$node_(0) setdest 144.816950690450 20.073824649527 0.324133202939"
$ns_ at 0.000000000000 "$node_(1) setdest 93.957720171475 192.140808646867 1.452613500562"
$ns_ at 12.158688172971 "$node_(23) setdest 113.137798368154 39.443538618334 0.902003496971"
$ns_ at 14.805074599534 "$node_(2) setdest 152.227654369397 20.766089279052 1.742469780423"

But when I run simulation it gives error like this:[QUOTE]Load complete...
Starting Simulation...
ns: _o18 setdest 144.816950690450 20.073824649527 0.324133202939:
(_o18 cmd line 1)
invoked from within
"_o18 cmd setdest 144.816950690450 20.073824649527 0.324133202939"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o18" line 2)
(SplitObject unknown line 2)
invoked from within
"_o18 setdest 144.816950690450 20.073824649527 0.324133202939"
[\QUOTE]
Urgent help is needed please

Awk - Process A Set Of Records If Field $5 Of Line 01 Is 'W', Otherwise Copy Set To O

Hi guys,

I am looking to write a script where I need to process many sets of transactions.
I want to process the set if $ 1 == "01" field $5 = "W", and $ 1 == "07" field $3 = "YY" otherwise copy set to output.

Example of the input file:

Code:
01 08 77 78  W  9890
02 08 66 68 0 8554
07 08  YY  85 9 7545
01 08 99 87 X 8787
04 09 85 85 4 8758
09 87 88 78 7 6584
10 84 ZZ 99 8 9887

A new set is always starting with $1 == "01".
Script should only process first set because its 5th value is "W" and put "MATCHED" in the end.
and copy the unmatched set "X" as it is to output.

Code:
Example of output file:
 01 08 77 78 W 9890
02 08 66 68 0 8554
07 08 YY 85 9 7545
MATCHED 
 01 08 99 87 X 8787
04 09 85 85 4 8758
09 87 88 78 7 6584
10 84 ZZ 99 8 9887 

and so on..
thanks for your help