La Fibre

Télécom => Réseau => testdebit Comment tester son débit ? => Discussion démarrée par: underground78 le 28 août 2019 à 19:38:25

Titre: Nouveau test de débit par Ubiquiti
Posté par: underground78 le 28 août 2019 à 19:38:25
Bonsoir,

Pour une raison qui m'échappe un peu Ubiquiti a décidé de lancer (encore) un nouveau test de débit : http://speed.ui.com. ???

Exemple de résultat pour une connexion FTTH Free : http://speed.ui.com?result=5d66ba3023760600077263e8

J'ai vu des connexions vers divers serveurs hébergés chez Vultr :

Visiblement le test n'est disponible qu'en IPv4 (pour l'instant ?).
Titre: Nouveau test de débit par Ubiquiti
Posté par: ajds le 28 août 2019 à 22:03:51
 :D
Titre: Nouveau test de débit par Ubiquiti
Posté par: vivien le 28 août 2019 à 22:43:34
Il est possible d'héberger son propre serveur.

Ci-desous, le script pour installer un serveur : Docker obligatoire, Ubuntu 18.04 est recommandé.

Par défaut, c'est le port 80 qui est utilisé, mais il est possible de le modifier, toutefois dans de nombreuses entreprisen seuls deux ports sont ouverts : 80 et 443.

Je vais voir si il est pertinent que je propose un ou des serveurs de test de débit.


<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>#!/usr/bin/env bash
set -o nounset
set -o errexit

DEFAULT_SERVER_PORT="80"
SERVER_PORT=""

DEFAULT_SERVER_HOSTNAME="${HOSTNAME}"
SERVER_HOSTNAME=""

INSTALLATION_TOKEN=""
API_SERVER_URL="https://sp-dir.uwn.com"
DIRECTORY_SERVER_URL="wss://sp-dir.uwn.com/connect"
SPEEDTEST_IMAGE=${SPEEDTEST_IMAGE:-"ubnt/speedtest"}
SPEEDTEST_CONTAINER="ubnt-speedtest"
WATCHTOWER_CONTAINER="ubnt-speedtest-watchtower"

AUTH_HEADER="x-auth-token: ${INSTALLATION_TOKEN}"
ENDPOINT_IP="${API_SERVER_URL}/api/v1/ip"
ENDPOINT_INSTALL="${API_SERVER_URL}/api/v1/install"

if [ "x$@" != "x" ]; then
  API_KEY="$@"
fi

fail() {
  echo -e "ERROR: $1" &gt;&amp;2
  exit 1
}

# usage: confirm <question>
# Prints given question and asks user to type Y or N.
# Returns 0 if user typed Y, 1 if user typed N.
# Exits if user failed to type Y or N too many times.
# examples:
# confirm "Do you want to continue?" || exit 1

confirm() {
  local question="$1"
  for i in 0 1 2 3 4 5 6 7 8 9 10; do
    read -p "${question} [Y/N]" -n 1 -r
    echo
    if [[ ${REPLY} =~ ^[Yy]$ ]]; then
      echo "Yes"
      return 0
    fi
    if [[ ${REPLY} =~ ^[Nn]$ ]]; then
      echo "No"
      return 1
    fi
    echo "Please type Y or N."
  done
  fail "Too many failed attempts."
}

fetch_api_key() {
  # maybe no need to fetch api key
  if [ -n "${API_KEY:-}" ]; then
    echo "Using provided API Key: ${API_KEY}"
    return
  fi

  echo "Registering server..."
  API_KEY=$(
    curl -s -X POST \
      -H "${AUTH_HEADER}" \
      -H "Accept: text/plain" \
      -F url="http://${SERVER_HOSTNAME}:${SERVER_PORT}" \
      "${ENDPOINT_INSTALL}"
  )

  if [ -z "${API_KEY:-}" ]; then
    fail "Cannot authorize new server (API_KEY invalid)"
  fi

  if ! echo "${API_KEY}" | grep -E -q
'^[0123456789ABCDFHKLMNPQRSTUVWXYZ]+$'; then
    fail "Server generated invalid authentication key (API_KEY
${API_KEY})" &gt;&amp;2
  fi
}

pull_docker_images() {
  echo "Pulling docker images."

  docker pull "$SPEEDTEST_IMAGE"
  docker pull v2tec/watchtower
}

install_docker() {
  if ! which docker &gt; /dev/null 2&gt;&amp;1; then
    echo "Download and install Docker"
    export CHANNEL="stable"
    curl -fsSL https://get.docker.com/ | sh
  fi

  DOCKER_VERSION=$(docker -v | sed 's/.*version \([0-9.]*\).*/\1/');
  echo "Docker version: ${DOCKER_VERSION}"

  if ! which docker &gt; /dev/null 2&gt;&amp;1; then
    fail "Docker not installed. Please check previous logs. Aborting."
  fi
}

stop_docker_containers() {
  echo "Stopping docker containers."
  docker stop "${WATCHTOWER_CONTAINER}" 2&gt;/dev/null || true
  docker stop "${SPEEDTEST_CONTAINER}" 2&gt;/dev/null || true
}

remove_old_docker_containers() {
  echo "Removing docker containers."
  docker rm "${WATCHTOWER_CONTAINER}" 2&gt;/dev/null || true
  docker rm "${SPEEDTEST_CONTAINER}" 2&gt;/dev/null || true
}

ask_server_hostname() {
  PUBLIC_IP=`curl -fs -H "Accept: text/plain" "${ENDPOINT_IP}" | cut -f1
 || echo -n ""`
  if [ -n "${PUBLIC_IP:-}" ]; then
    DEFAULT_SERVER_HOSTNAME=${PUBLIC_IP}
  fi

  read -r -p "Please enter hostname or public IP.
[${DEFAULT_SERVER_HOSTNAME}]: " SERVER_HOSTNAME
  SERVER_HOSTNAME=${SERVER_HOSTNAME:-${DEFAULT_SERVER_HOSTNAME}}

  echo "Using hostname ${SERVER_HOSTNAME}"
}

ask_server_port() {
  read -r -p "Please enter HTTP port. [${DEFAULT_SERVER_PORT}]: "
SERVER_PORT
  SERVER_PORT=${SERVER_PORT:-${DEFAULT_SERVER_PORT}}

  if ! echo "${SERVER_PORT}" | grep -E -q '^[0-9]+$'; then
    echo -e "${SERVER_PORT} is not a valid port number." &gt;&amp;2
    ask_server_port
    return
  fi

  echo "Checking available HTTP port"
  if nc -z 127.0.0.1 "${SERVER_PORT}" &gt;/dev/null 2&gt;&amp;1; then
    echo -e "Port ${SERVER_PORT} is in use." &gt;&amp;2
    ask_server_port
    return
  fi
  echo "Using port ${SERVER_PORT}"
}

validate_server_info() {
  local result=$(
    curl -fs -X POST \
      -w "%{http_code}" \
      -o /dev/null \
      -H "${AUTH_HEADER}" \
      -F hostname="$SERVER_HOSTNAME" \
      -F port="$SERVER_PORT" \
      "${ENDPOINT_INSTALL}/validate"
  )

  case ${result} in
    200)
      return 0
      ;;
    400)
      echo "Please enter valid hostname and port"
      ;;
    401)
      fail "Authentication failed. Please make sure you have downloaded
the latest version of this installation script and try again"
      ;;
    403)
      echo "Server ${SERVER_HOSTNAME}:${SERVER_PORT} is already
registered. Please choose a different hostname and/or port"
      ;;
    409)
      echo "Server ${SERVER_HOSTNAME}:${SERVER_PORT} already exists."
      if confirm "Do you want to replace it with current installation?";
 then
        return 0
      fi
      ;;
    429)
      fail "Server limit reached. You can't have any more servers,
retire some and try again."
      ;;
    *)
      fail "Failed to connect to Speed Test API with an error code
${result:-"unknown"}"
  esac

  return 1
}

gather_server_info() {
  ask_server_hostname
  ask_server_port

  if ! validate_server_info; then
    gather_server_info;
  fi
}

start_docker_containers() {
  echo "Starting docker containers."

  docker run -d \
    --name "${WATCHTOWER_CONTAINER}" \
    --restart unless-stopped \
    -v /var/run/docker.sock:/var/run/docker.sock \
    v2tec/watchtower --label-enable --cleanup

  docker run -d \
    --name "${SPEEDTEST_CONTAINER}" \
    --publish "${SERVER_PORT}:8050" \
    -e API_KEY="${API_KEY}" \
    -e DIRECTORY_SERVER_URL="${DIRECTORY_SERVER_URL}" \
    -l "com.centurylinklabs.watchtower.enable=true" \
    --restart unless-stopped \
    "${SPEEDTEST_IMAGE}"

}

confirm_success() {
  echo "Waiting for Speed Test Server to start"
  local n=0
  local running=false
  until [ ${n} -ge 10 ]
  do
    sleep 3s
    running=true
    # env -i is to ensure that http[s]_proxy variables are not set
    # Otherwise the check would go through proxy.
    local status=`env -i curl -skL -H 'Accept: text/plain'
"http://${SERVER_HOSTNAME}:${SERVER_PORT}/diagnostics" | cut -f1`
    if [ "${status}" = "1" ]; then
      break
    fi
    echo "."
    running=false
    n=$((n+1))
  done

  docker ps

  if [ "${running}" = true ]; then
    echo "Speed Test Server is running"
  else
    echo ""
    echo "Server failed to start or it can't connect to the Speed Test
Network."
    echo "  - Make sure your installation script is up to date. You can
always download the latest version from https://speed-admin.ui.com"
    echo "  - Make sure URL http://${SERVER_HOSTNAME}:${SERVER_PORT} is
publicly accessible"
    echo "  - Contact our support with output of
http://localhost:${SERVER_PORT}/diagnostics and 'docker logs
${SPEEDTEST_CONTAINER}'"
    echo ""
    fail "Speed Test Server installation failed"
  fi
}

do_install() {
  install_docker
  pull_docker_images
  stop_docker_containers
  remove_old_docker_containers
  gather_server_info
  fetch_api_key
  start_docker_containers
  confirm_success
}

# wrapped up in a function so that we have some protection against only
getting
# half the file during "curl | sh"
do_install
</question></body></html>
Titre: Nouveau test de débit par Ubiquiti
Posté par: willemijns le 29 août 2019 à 06:22:21
tu as speedtest.fdossena.com aussi ;)

Un exemple sur https://webapps1.hpu.edu/speedtest/

ah y'a mieux http://speedtest.nmax.net/speedtest/ ou tout est visible
[TXT]   example-basic.html   24-Jan-2019 10:27    1.3K   
[TXT]   example-chart.html   24-Jan-2019 10:27    9.3K   
[TXT]   example-customSettings.html   24-Jan-2019 10:27    4.6K   
[TXT]   example-customSettings2.html   24-Jan-2019 10:27    3.6K   
[TXT]   example-gauges.html   24-Jan-2019 10:27    6.7K   
[TXT]   example-pretty.html   24-Jan-2019 10:27    4.1K   
[TXT]   example-progressBar.html   24-Jan-2019 10:27    4.6K   
[TXT]   example-telemetry-resultSharing.html   24-Jan-2019 10:27    8.0K   
[TXT]   example-telemetryEnabled.html   24-Jan-2019 10:27    4.3K   
Titre: Nouveau test de débit par Ubiquiti
Posté par: stylou08 le 26 septembre 2019 à 15:22:21
Il est possible d'héberger son propre serveur.

...
Je vais voir si il est pertinent que je propose un ou des serveurs de test de débit.


je viens de tester et pour ma part c'est celui qui fait le moins monter mes procs. ça serait intéressant de pouvoir y faire un test avec le "serveur anycast-FR" de la page https://testdebit.info/

Edit : grâce à celui ci, j'ai des résultats qui se rapprochent plus de la qualité de ma ligne (pas encore tout à fait mais un gros mieux). Je passe de 300 Mbps environ en down et up sur nperf  à plus de 650 Mbps en down à chaque test (pareil en up que sur nperf).

Édit 2 : je viens de voir que le site est en http, donc forcèment, proc mois utilisé et le résultat grimpe