Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Dear sir
Although at no of places many types awk files are available, but i am requesting you please give me awk script for packet loss and total throughput for my attached .tr file.I want to calculate throughput between node 4 and 0
There is a problem in attachment so please have a look some sample lines of tr file ....
Dear sir
I had tried with no of script but not getting satisfactory output. With some script output is available but not mapped with trace file, with some script there is no output even manually i checked the codes. Please find the attached copy of script i have used....
regards
There is still some problem in attachment ....how can i share script i have used.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
@Aabha, please have a look at the <thr> scripts in "awk-and-perl_scripts_12.2014.tar.gz" https://drive.google.com/file/d/0B7S...ew?usp=sharing
... One of the scripts may be usable for your particular ns2 trace file.
avg_throughput.awk
avg_throughput-zigbee.awk
avg_thr_wirelss.awk
chainThroughput.pl
e2ethroughput.awk
flow-thr.awk
genthroughput.awk
instantThroughput.awk
instantThroughputStll.awk
Lianghui-throughput.pl
myflowcalcall_throu.awk
thr_drop_delay.awk
thr-one.pl
Throughput2007.awk
throughput-8.pl
throughput-9.pl
throughput_newtrace.awk
throughput.pl
thruput.awk
updown-link-thr.pl
wireless-thr.awk
.... If no success, you can read the files to get ideas for your awk code.
CODE Tags : [code]code text[/code] .
Please do not use PHP code tags, awk code is not php code.
So hopefully one of the other scripts mentioned will help, but I thought I would shed some light on the one you were using.
After taking out any cruft which is not being used your script looks like:
After this it is greater than nxt_time_instance and hence the bytes_recvd is later added up but will never be displayed as the script has no way to get back into
the 'else' part of the script where the printf statement is generating output.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.