Skip to content

Stores and visualizes internet Download and Upload Speeds as data series.

License

Notifications You must be signed in to change notification settings

redskate/speedtestweb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

speedtestweb

Stores and visualizes internet Download and Upload Speed data graphically, without PUB. These scripts are based on https://github.com/sivel/speedtest-cli and http://dygraphs.com/download.html The project is ready to be an eclipse project (used on a mac computer) but you can just unzip it and use it as described below.

You need

  1. A mysql database
  2. A web server

Installation step 1

Create a mysql schema "ISPEED" and a table using:

CREATE TABLE log (
timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
distance float DEFAULT NULL COMMENT 'km',
testfrom text,
hostedby text,
ping float DEFAULT NULL COMMENT 'msec ping time',
downloadspeed float DEFAULT NULL COMMENT 'in Mbit/s',
uploadspeed float DEFAULT NULL COMMENT 'in Mbit/s',
PRIMARY KEY (timestamp)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

Then add a user on ISPEED (SELECT, INSERT)

Installation step 2

Install or take a web server (I took an apache web server), define a virtual server to contain a documentRoot=/path/to/speedtestweb/

<VirtualHost *:20000> ServerName cerere:20000 DocumentRoot "/Users/you/Documents/workspace/speedtest" ErrorLog /private/var/log/apache2/servername_20000_semweb.local.err TransferLog "/private/var/log/apache2/servername_20000_access.log"

<Directory "/path/to/speedtest">
    Order allow,deny
    Allow from all
    AllowOverride All
    Options +Indexes +FollowSymLinks +ExecCGI +Includes
    Require all granted
</Directory>

Installation step 3

Adapt parameters inside utilities.php if needed
$DB_HOST='127.0.0.1:3306';
$DB_UNAME='speeduser';
$DB_PWORD='the rightmysqlISPEEDpassword';

Installation step 4

crontab to call the datasampler.php at reboot:

Add line in crontab -e: /usr/bin/php /path/to/speedtest/src/php/datasampler.php > /tmp/datasampler.log

Use inside your browser (see your DB historized measurements graphically):

Start the web server and call: http://yourwebserver/src/php/dataserver.php

Visualize last 100 datapoints:
http://yourwebserver/src/php/dataserver.php?last=100
Visualize last 200 datapoints and reload every minute:
http://yourwebserver/src/php/dataserver.php?last=200&reload=60

Example of what you should get:

![Alt Example of dataserver.php graphical output](https://github.com/redskate/speedtestweb/blob/master/images/picexample.png "Example of dataserver.php graphical output")

ENJOY!

About

Stores and visualizes internet Download and Upload Speeds as data series.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages