开发者

How do i test the net speed from the command-line on a linux server(no gui)? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
开发者_JAVA技巧

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 9 years ago.

Improve this question

I am looking for ways to test the net speed on a linux box with no GUI from the command line. I am not interested in tools like bmon/iftop/wget/curl especially from the upload side of things, for download it is pretty easy with wget on different targets and servers(places). But i am more interested in the upload side of things, which is the most important part of a server's bandwidth. I want to test the upload speed on different servers and places around the world just like you could do it by visiting speedtest.net using a browser with flash. If that tool can handle download speeds too that way then all the better then.


I'm not aware of a way to do this without a cooperating remote server. If you upload data, it has to go somewhere... Sites like speedtest.net do exactly that (they have a data sink somewhere).

Provided you do have ssh access to a remote server with a download link somewhat faster than the upload link you want to test, you may achieve this rather simply with netcat :

On your remote server (let's assume IP 1.2.3.4) :

$ nc -kl 12345 > /dev/null

On the machine you want to test :

$ time nc 1.2.3.4 12345 < large-file
$ stat -c'%s' large-file

Divide the file size by the "real" time and you have an estimation of your speed.

Note that you only need to run nc once on the server, and it will accept any number of sequential tests. If you only want it to work once (for security reasons or whatever), omit the -k flag.


I took this from another post I found here and thought I would pass it on:

It looks like there is a tool available on sourceforge that uses speedtest.net from the terminal.

Terminal speedtest: http://sourceforge.net/projects/tespeed/


iperf is a tool designed for this.

You run it on both sides of the connection and it can measure bandwidth either way, with TCP or UDP, and has many tweakable parameters.


This is a great tool tespeed. It tests your upload and download speeds with great details.


I don't think that exists some command-line tool for this kind of test, but someone seems to have your same question, take a look at the solutions suggested there..


speed testing using iperf is advisable if you want a command line tool for that. Iperf is an awesome tool because of the following reasons:

  • It allows you to make parallel connections. It also can modify window
  • size It reports the gitter and dropped packets.
  • Refer the below link for the complete explanation.

Network speed test using iperf

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜