LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-07-2013, 03:08 PM   #1
bhutrashruti
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
NS: command to execute throghput.awk in redhat linux


I am using redhat linux for ns2.34 and i have throughput.awk script. I am unable to run the same in redhat linux. However the same script is working in fedora.Pleas let me know the exact command for execution.Thanx.

The script is:
BEGIN {
recvdSize = 0
startTime = 400
stopTime = 0
}

{
event = $1
time = $2
node_id = $3
pkt_size = $8
level = $4

# Store start time
if (level == "AGT" && event == "s" && pkt_size >= 512) {
if (time < startTime) {
startTime = time
}
}

# Update total received packets' size and store packets arrival time
if (level == "AGT" && event == "r" && pkt_size >= 512) {
if (time > stopTime) {
stopTime = time
}
# Rip off the header
#hdr_size = pkt_size % 512
#pkt_size -= hdr_size
# Store received packet's size
recvdSize += pkt_size
}
}

END {
printf("Average Throughput[kbps] = %.2f\t\t StartTime=%.2f\tStopTime=%.2f\n",(recvdSize/(stopTime-startTime))*(8/1000),startTime,stopTime)
}
 
Old 05-07-2013, 03:28 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,322

Rep: Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470
Quote:
Originally Posted by bhutrashruti View Post
I am using redhat linux for ns2.34 and i have throughput.awk script. I am unable to run the same in redhat linux. However the same script is working in fedora.Pleas let me know the exact command for execution.Thanx.
...and maybe if you told us WHY you're unable to run it, what error(s) you're getting, when and where, we might be able to help. Also, you don't say what version of Fedora or Red Hat that you're running.

Unless you provide details and ask a clear question, no one can help you.
 
Old 05-07-2013, 08:46 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,417

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Also, make it easier for us to read that by using CODE tags https://www.linuxquestions.org/quest...do=bbcode#code
 
Old 05-08-2013, 09:19 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Moved: This thread is more suitable in <Software> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply


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
expect execute linux command Xris718 Programming 11 04-27-2012 01:55 AM
linux grep or awk command - how to search for string + execute couta Linux - Newbie 10 09-03-2011 02:58 AM
[SOLVED] Using bash command to execute output of awk sylye Programming 12 04-03-2011 05:37 AM
shell command using awk fields inside awk one71 Programming 6 06-26-2008 05:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:03 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration