How can I use awk scripts to find the end-to-end delay from the .tr file?
I have finished my .tcl file for the wireless sensor network.
I tried to get the results from the .tr file using the awk scripts, but I did not get anything. Each time it gave an error "division by zero". Please can anyone help? I have the .tr file and awk script below .tr file: https://docs.google.com/file/d/0B3rL...lPVDNFcVk/edit awk script: Code:
# =================================================================== |
What I see in your code:
1) count set to 0 Code:
count = 0; Code:
for(i=0; i<=seqno; i++) { Code:
n_to_n_delay = n_to_n_delay/count; |
Besides the information from @bigrigdriver :
Not all the old awk scripts are actually usable as is with ns2 / any random trace file. All "end to end" scripts : en2end-delay.awk end-to-end.awk Endtoenddelay.awk End-to-End-Delay.awk delay-e2e.awk e2e.awk e2edelay.awk ... The scripts are available from `awk-and-perl_scripts_12.2014.tar.gz' https://drive.google.com/file/d/0B7S...ew?usp=sharing - |
thanks for your help, i used file ''perl"
Code:
#!/usr/bin/perl Code:
perl avgdelay.pl leach.tr Code:
Simulation Time = 276.70000 seconds |
There is not a packet to be dropped in my trace file. Is it normal?
|
Re #5.
You can do extra checks with the other available scripts, e.g. : droppackets.awk packetloss.pl packet-loss-ratio.awk packetloss.sh totalpacketsreceived.awk totalpacketssent.awk PacketDeliveryRatio.awk ? I don't know if your script is meant to show "packet to be dropped in trace .." ? Or if your trace file shows any packet drops ? - |
I use command:
Code:
ns ns-2.34/tcl/ex/wireless.tcl -sc ns-2.34/mit/uAMPS/sims/nodescen -rp leach -x 100 -y 100 -nn 101 -stop 600 -eq_energy 1 -init_energy 1 -filename LEACH1 -dirname leach_dir -topo ns-2.34/mit/uAMPS/sims/100nodes.txt -num_clusters 5 -bs_x 50 -bs_y 50 2> leach_dir/leach.err > leach_dir/leach.out https://docs.google.com/file/d/0B3rL...tkM004S0k/edit Is correct ? |
Re #7.
Please compare with other examples of "leach.tr". This one is with a default ./test , i.e. default settings in leach_test https://drive.google.com/file/d/0B7S...ew?usp=sharing - |
There is not a difference between my trace file and your trace file in #8. Awk files in #6 don't have a result which i want. Why does it like this? Help me!
|
Re #9.
I don't know. Sorry. |
Can u show me the meaning of fields in trace file?
Code:
s 11.007514174 _11_ AGT --- 968 rca 4016 [0 b000000 0 0] ------- [s 11 59 -1] |
|
Dear knudfl
Can u use awk files in #6 to run with your trace file (#8) and give me your result? Please. |
Energy trace for each node (WSN) in perl or awk
any one, have Energy trace for each node (WSN) in perl or awk for trace file tr
Thanks. |
All times are GMT -5. The time now is 08:55 AM. |