Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anybody know which command I can use in my Linux console, to check what the speed of the network of a costumer is? I have the network IP and gateway, is there anything I can do to perform a line check to see what the up and Down speed is with a Linux command?

share|improve this question
    
please could you clarify what it is you want to measure. Is it the overall network performance of that customer's box, and do you have access to it?, or are you on the recieving end somehow? What network do you want to measure, ie between what endpoints? – Petter H Jan 8 at 17:53

testing the download speed is usually quite easy, just download a big file with curl and see the speed column.

if you need upload speeds as well, there is a nice python script called 'tespeed':

https://github.com/Janhouse/tespeed

share|improve this answer

Here is an example: wget -O /dev/null http://cachefly.cachefly.net/100mb.test

share|improve this answer

Try iperf. You need 2 machines.

  • a server: iperf -s
  • a client: iperf -c IP-OF-THE-SERVER

You have many options with iperf. See its manpage for more information.

share|improve this answer

I use speedtest's cli

to install it:

wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py

chmod a+rx speedtest_cli.py

sudo mv speedtest_cli.py /usr/local/bin/speedtest-cli

sudo chown root:root /usr/local/bin/speedtest-cli

then you can use the "speedtest-cli" command to start the test and if you use: "speedtest-cli --share" then you'll get a link to share the result.

share|improve this answer

In order to test upload ou migh as well store the following code at any website, call it from a form and call it from a curl command:

<?php
 if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "<br>";
}
 else
{
$start = $_SERVER['REQUEST_TIME'];
$end=  time();
echo "Upload: " . $_FILES["file"]["name"] . "<br>";
echo "Type: " . $_FILES["file"]["type"] . "<br>";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>";
echo "Time:" . ($end - $start) . "<br>";
}

    if ( move_uploaded_file($_FILES["file"]["tmp_name"], "/a/path/you/set/for/upload" . $_FILES["file"]["name"]) ) {
        echo "Stored in: " ." /a/path/you/set/for/upload" . $_FILES["file"]["name"];
}
else {
echo "Could not save the file";
}

curl --form file=@test.img --form submit=submit http://your.website.com

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.