LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-30-2015, 02:35 PM   #1
rajes4india
Member
 
Registered: Aug 2011
Location: Germany
Posts: 35

Rep: Reputation: Disabled
Question how to calculate throughput using TCPSTAT command?


Hi Friends,

How to calculate throughput of the particular interface using "tcpstat" command. Is there any options available inbuilt or any logic for that.

my scenario:

By using CURL am posting a file to remote server. Before starting post i have started "tcpstat -i eth5 -f " udp and src port 22334". by using the above tcpstat option am able to capture like below,

Time:1427743264 n=127 avg=230.07 stddev=232.78 bps=46750.40
Time:1427743269 n=172 avg=198.94 stddev=200.50 bps=54747.20


But i want to calculate the throughput of the link. in my scenario i want to calculate the total bandwidth taken for posting the file. my file size is 2Mb.

thanks in advance.

--Rajesh
 
Old 03-31-2015, 09:07 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by rajes4india View Post
Hi Friends,
How to calculate throughput of the particular interface using "tcpstat" command. Is there any options available inbuilt or any logic for that. my scenario:

By using CURL am posting a file to remote server. Before starting post i have started "tcpstat -i eth5 -f " udp and src port 22334". by using the above tcpstat option am able to capture like below,

Time:1427743264 n=127 avg=230.07 stddev=232.78 bps=46750.40
Time:1427743269 n=172 avg=198.94 stddev=200.50 bps=54747.20


But i want to calculate the throughput of the link. in my scenario i want to calculate the total bandwidth taken for posting the file. my file size is 2Mb.
You can easily write a script to add numbers together, or perform any other mathematical operation. So, what have you done/tried of your own so far? You've been registered here for four years now, and asked about performing similar calculations two years ago:
http://www.linuxquestions.org/questi...le-4175455990/

Have you not progressed any in two years?? Can you not apply what you were told previously in this situation, by making a change to it? We will be happy to assist you, but we're not going to write your scripts for you. So show us what effort you've put into this so far, post your script, and tell us where you're stuck.
 
Old 03-31-2015, 09:35 AM   #3
rajes4india
Member
 
Registered: Aug 2011
Location: Germany
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
You can easily write a script to add numbers together, or perform any other mathematical operation. So, what have you done/tried of your own so far? You've been registered here for four years now, and asked about performing similar calculations two years ago:
http://www.linuxquestions.org/questi...le-4175455990/

Have you not progressed any in two years?? Can you not apply what you were told previously in this situation, by making a change to it? We will be happy to assist you, but we're not going to write your scripts for you. So show us what effort you've put into this so far, post your script, and tell us where you're stuck.
HI TB0ne,

thanks for replying back.

Little misunderstanding here, Yes in did scripting for calculating the each column , basically i did adding columns of Time, Packet count , bps. But i am not sure about the exact formula for calculating the throughput using the above three parameters. Basically i want to calculate the Bandwidth taken for the particular time period. like below in the link. https://www.switch.ch/network/tools/tcp_throughput/.

my assumption is

total BPS
--------- or total bps / total time * packet count.
total TIME


i know how to script the formula. i want to make sure the above formula will give the accurate throughput . let me know if you have something on this. really appreciated.

thanks for the help.
 
Old 03-31-2015, 12:59 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by rajes4india View Post
HI TB0ne,
Little misunderstanding here, Yes in did scripting for calculating the each column , basically i did adding columns of Time, Packet count , bps. But i am not sure about the exact formula for calculating the throughput using the above three parameters. Basically i want to calculate the Bandwidth taken for the particular time period. like below in the link. https://www.switch.ch/network/tools/tcp_throughput/.

my assumption is

total BPS
--------- or total bps / total time * packet count.
total TIME

i know how to script the formula. i want to make sure the above formula will give the accurate throughput . let me know if you have something on this. really appreciated.
There are over 96,000 hits in Google for "how to calculate tcp throughput", which gives you the formula you need. So if you can find the formula, and know how to script it, that's all you need, isn't it??? This is the second hit in Google:
http://bradhedlund.com/2008/12/19/ho...istance-links/

Did you try to look this up? There are also many other formulas that appear with that search...you don't say what language you want to script this in, what you've done/tried on your own so far, or what parameters you want to measure, so there's not much more detail anyone can give you.

But, since you say you know how to script it, what you need, and know how to find the formula(s) you want, it seems you've got all the pieces.

Last edited by TB0ne; 03-31-2015 at 01:00 PM.
 
  


Reply



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
how to calculate throughput,delay,routingload vishalpolara Linux - Newbie 2 01-04-2013 12:54 AM
how to calculate throughput and delay characteristics for HCCA stud17 Linux - Newbie 1 11-09-2011 02:59 PM
calculate throughput in ns-2.34 sukrutha Linux - Newbie 0 09-18-2011 08:23 AM
tools available for Bandwidth/throughput measurement from command line manasi86 Linux - Software 3 04-09-2009 12:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:29 PM.

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
Open Source Consulting | Domain Registration