forked from Janhouse/tespeed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
87 lines (56 loc) · 3.11 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Tespeed (terminal speedtest) - Copyright 2012 Janis Jansons ([email protected])
This is a new Tespeed version written in Python (for the purpose of learning it).
The old one was written in PHP years ago and wasn't really made for general
public (was fine tuned and possibly working only on my server).
Even though the old version didn't work on most boxes, it somehow got
almost 17 000 downloads on Sourceforge. I guess some people could use this
(those who hate Flash, JavaScript, has GUI-less servers, etc.) so I'll
try to make this one a bit better working in time.
Let's call this version 1.0-alpha
Of course, this script could not work like this without the best speed
testing site out there - http://www.speedtest.net/
Support them in any way you can (going to their website and clicking on
ads could probably make them a bit happier). :)
Requirements:
This script requires lxml and argparse Python2 modules.
Install python-lxml and python-argparse (Debian) or python2-lxml and
python2-argparse (Archlinux).
Usage:
tespeed.py [-h] [-ls [LISTSERVERS]] [-w] [-s] [-mib] [-n [SERVERCOUNT]] [server]
TeSpeed, CLI SpeedTest.net
positional arguments:
server Use the specified server for testing (skip checking
for location and closest server).
optional arguments:
-h, --help show this help message and exit
-ls [LISTSERVERS], --list-servers [LISTSERVERS]
List the servers sorted by distance, nearest first.
Optionally specify number of servers to show.
-w, --csv Print CSV formated output to STDOUT.
-s, --suppress Suppress debugging (STDERR) output.
-mib, --mebibit Show results in mebibits.
-n [SERVERCOUNT], --server-count [SERVERCOUNT]
Specify how many different servers should be used in
paralel. (Defaults to 1.) (Increase it for >100Mbit
testing.)
What the script does:
* Loads config from speedtest.net (http://speedtest.net/speedtest-config.php).
* Gets server list (http://speedtest.net/speedtest-servers.php).
* Picks 5 closests servers using the coordinates provides by speedtest.net
config and serverlist.
* Checks latency for those servers and picks one with the lowest.
* Does download speed test and returns results.
* Does upload speed test and returns results.
* Optionally can return CSV formated results.
TODO:
* Add more error checking.
* Make it less messy.
* Send found results to speedtest.net API (needs some hash?) and get the link
to the generated image.
* Store the measurement data and draw graphs.
* Measure the speed for the whole network interface (similar like it was in the
old version of Tespeed).
* Start upload timer only after 1st byte is read.
* Figure out the ammount of data that was transfered only when all threads were
actively sendong/receiving data at the same time. (Should provide more precise
test results.)