[SOLVED] how to calculate throughput using TCPSTAT command?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
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,
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.
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,
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.