Re: [ns] problem in wired-cum-wireless scenario

2007-11-01 Thread bilge kartal

  Hi,
Following code is a part of awk script.I asign first coloum as event.
$1=event and second coloum as time=$2 and so on.
I didn understand your problem.But segmentation fault generalyy appear when
there is a problem of value format and the variable.
You can count and you can find suitable which is which? Check your trace
file. awk take every value as a complete until a space.
xxx yyy kkk
xxx=$1
yyy=$2
kkk=$3

if ( event == "s" )
{
if ( node == "12" ){print time, energy >> "12.tr"}
}


I hope this help.
Good luck
Bilge


On 1 Nov 2007 12:22:09 -, harpreet <[EMAIL PROTECTED]> wrote:
>
>
>
> > hi
> > i am working on wired-cum-wireless script.. my script work alright when
> there are only 3 mobile nodes. but when u increase the mobile numbers.. this
> gives me segmentation fault core dump.. i am using
> >
> > #
> >   $ns_ node-config -addressType hierarchical
> >   AddrParams set domain_num_ 4
> >
> >   AddrParams set cluster_num_ {1 1 1 1}
> >
> >   AddrParams set nodes_num_ { 3 7 6 4 }
> >
> >
> > set w1 [$ns_ node 0.0.0]
> > set w2 [$ns_ node 1.0.0]
> >
> >
> >   $ns_ node-config -adhocRouting $opt(adhocRouting) \
> >  -llType $opt(ll) \
> >  -macType $opt(mac) \
> >  -ifqType $opt(ifq) \
> >  -ifqLen $opt(ifqlen) \
> >  -antType $opt(ant) \
> >  -propInstance $prop \
> >  -phyType $opt(netif) \
> >  -channel [new $opt(chan)] \
> >  -topoInstance $topo \
> > -energyModel $opt(energymodel)\
> > -rxPower $opt(p_rx)\
> > -txPower $opt(p_tx)\
> > -idlePower $opt(p_idle)\
> > -initialEnergy $opt(initialenergy)\
> >  -wiredRouting ON \
> >  -agentTrace ON \
> >  -routerTrace ON \
> >  -macTrace OFF
> >
> > $ns_ node-config -wiredRouting OFF
> >
> > set aux 0
> > for {set j 1} {$j <5} {incr j} {
> > for {set h 1} {$h <26} {incr h} {
> > set aux1 [expr $j+1]
> > set direction $aux1.0.$h
> > set numbero_nodo $aux
> > incr aux
> > set node_($numbero_nodo) [$ns_ node $direction]
> > $node_($numbero_nodo) base-station [AddrParams addr2id [$host($j)
> node-addr]]
> > }
> > }
> >
> > #===
> >  to provide the addressing to mobile nodes.. can u please guide me how
> to remove this error..
> other problem i am facing is when i change the routing protocol to aodv
> the number of packet send and received and dropped reduced to only tens(i am
> using 3 mobile for this)  some time 10 to 30.and all throughput and
> results shows weared results.. and works alright when we change aodv with
> aodv+...
> if anybody know any perl or awk script to draw the energy graph please
> send me that as well
> i need to sort out this problem soon.. if anybody know who to remove this
> error please help me
>
> thanks in advance..
>


[ns] problem in wired-cum-wireless scenario

2007-11-01 Thread harpreet

  
> hi 
> i am working on wired-cum-wireless script.. my script work alright when there 
> are only 3 mobile nodes. but when u increase the mobile numbers.. this gives 
> me segmentation fault core dump.. i am using 
>
> #
>   $ns_ node-config -addressType hierarchical
>   AddrParams set domain_num_ 4  
>   
>   AddrParams set cluster_num_ {1 1 1 1}   
>  
>   AddrParams set nodes_num_ { 3 7 6 4 }
>
>
> set w1 [$ns_ node 0.0.0]
> set w2 [$ns_ node 1.0.0]
>
>   
>   $ns_ node-config -adhocRouting $opt(adhocRouting) \
>  -llType $opt(ll) \
>  -macType $opt(mac) \
>  -ifqType $opt(ifq) \
>  -ifqLen $opt(ifqlen) \
>  -antType $opt(ant) \
>  -propInstance $prop \
>  -phyType $opt(netif) \
>  -channel [new $opt(chan)] \
>  -topoInstance $topo \
> -energyModel $opt(energymodel)\
> -rxPower $opt(p_rx)\
> -txPower $opt(p_tx)\
> -idlePower $opt(p_idle)\
> -initialEnergy $opt(initialenergy)\
>  -wiredRouting ON \
>  -agentTrace ON \
>  -routerTrace ON \
>  -macTrace OFF
>
> $ns_ node-config -wiredRouting OFF
>
> set aux 0
> for {set j 1} {$j <5} {incr j} {
> for {set h 1} {$h <26} {incr h} {
> set aux1 [expr $j+1]
> set direction $aux1.0.$h
> set numbero_nodo $aux
> incr aux
> set node_($numbero_nodo) [$ns_ node $direction]
> $node_($numbero_nodo) base-station [AddrParams addr2id [$host($j) node-addr]]
> }
> }
>
> #===
>  to provide the addressing to mobile nodes.. can u please guide me how to 
> remove this error..
 other problem i am facing is when i change the routing protocol to aodv the 
number of packet send and received and dropped reduced to only tens(i am using 
3 mobile for this)  some time 10 to 30.and all throughput and results shows 
weared results.. and works alright when we change aodv with aodv+...  
if anybody know any perl or awk script to draw the energy graph please send me 
that as well
i need to sort out this problem soon.. if anybody know who to remove this error 
please help me

thanks in advance..