You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

WiFiMon measures the performance of WiFi networks, as experienced by WiFiMon Software Probes, i.e. End Users (crowdsourced measurements) and/or WiFiMon Hardware Probes (measurements from fixed points within the network), by embedding JavaScript code in websites frequently visited by the users of the Wi-Fi network. These websites should be under the management of the WiFiMon administrator in order to embed the necessary JavaScript lines; an example of a frequently visited website for a campus network can be the main university site that is visited by students on a regular basis.

The JavaScript code and the files that are required for measuring the Wi-Fi performance are contained within the WiFiMon Test Server (WTS). After visiting a website including the aforementioned JavaScript lines, the end device triggers performance tests towards the WTS.

Based on time needed to exchange specific images and/or test data, the end devices calculate performance results and stream them to the WIFiMon Analysis Server (WAS), i.e. the main component that collects and processes information. Performance tests are triggered only after a web page has loaded so that browsing experience is not impacted by WiFiMon.

Performance results calculated by end devices, i.e. Download/Upload Rates and Round Trip Times (RTTs) depend on the connectivity between the monitored WiFi network and the WTS location. Thus, for accurate results, the WTS should be located as close as possible to the monitored Subnets. In contrast, there is no requirement for the WAS to be placed close to the monitored networks.

WiFiMon is currently using 3 JavaScript-based testtools to measure the performance of WiFi networks. These are (i) NetTest, (ii) Akamai boomerang and (iii) LibreSpeed speedtest.

In the remainder of this page we provide the details on:

  1. WTS installation: Installation of a web server, the testtools used by WiFiMon and the images that are used for monitoring
  2. The JavaScript code that is required to be embedded in the frequently visited websites

This guide presents the commands required to install the WTS in a Debian-based distribution (Debian, Ubuntu, etc.). Other distributions may also be considered by adjusting the following commands appropriately.

1. WiFiMon Test Server (WTS) Installation

The WTS may be installed along with the WAS using the Ansible playbook that is described in the WAS documentation.

2. Embed Scripts in your Website



The following paragraphs show the lines that should be included in the HTML code of the frequently-visited websites for each testtool. The FQDN of the WiFiMon Test Server (WTS) is denoted as WTS_FQDN, the FQDN of the WiFiMon Analysis Server (WAS) is denoted as WAS_FQDN and the name of the utilized testtool should be included in the testtool attribute.


2.1:  Measurements test tools



Example pages for each test tool are available in the "measurements" folder of the "wifimon" directory that was downloaded in the previous section.

2.1.1: NetTest

NetTest measurements require embedding the following lines of code in your website:



nettest.html

<html>
<head>
   <script type="text/javascript" src="https://WTS_FQDN/wifimon/js/nettest/jquery-3.6.1.min.js"></script>
   <script type="text/javascript" src="https://WTS_FQDN/wifimon/js/nettest/nettest-swfobject.js"></script>
   <script type="text/javascript" src="https://www.google.com/jsapi"></script>
   <script type="text/javascript" id="settings" hostingWebsite="https" agentIp="WAS_FQDN" agentPort="443" testtool="NetTest" testServerLocation="LOCATION" imagesLocation="https://WTS_FQDN/wifimon/images/" cookieTimeInMinutes="0.01"
            src="https://WTS_FQDN/wifimon/js/nettest/runtests.js" defer></script>
<!--meta http-equiv="refresh" content="30" -->
</head>
</html>

  • agentIP (required): Replace "WAS_FQDN" with the IP address (or domain name) of the WiFiMon Analysis Server.
  • Replace "WTS_FQDN" with the IP address (or domain name) of the WiFiMon Test Server.
  • imagesLocation (required): Public link to the folder where the images are downloaded to perform the NetTest measurements.
  • testtool (required): With this attribute, you specify a name for the testtool. WiFiMon Analysis Server relies on the value of this attribute to visualize measurements. The following assumptions are made: (i) for websites visited by WiFiMon Software Probes the value of the testtool attribute should be specified as "NetTest", while (ii) for websites visited by WiFiMon Hardware Probes the testtool attribute should be specified as "NetTest-x" where x is the description assigned to a particular WiFiMon Hardware Probe. Description can be a number, e.g. "5" or short text, e.g. "wifimon-5". Note that you must use separate websites for WiFiMon Software Probes and WiFiMon Hardware Probes.
  • testServerLocation (optional): This attribute specifies the location (or name) of the WiFiMon Test Server within the monitored network.
  • cookieTimeInMinutes (optional): Duration time (in minutes) to set the cookie in order to prevent repeated measurements and overload the WiFiMon Analysis Server. If empty, "1.5" is assumed, i.e. 90 seconds.
  • If your website already included the jquery.min.js, you have to delete the first line.
  • It is assumed that these lines are embedded in pages supporting HTTPS.

NOTE: Except for the 4th bullet, the rest of the bullets apply for both subsections 2.2 and 2.3. Thus, they will not be included in the following subsections.

2.1.2: Boomerang

Triggering boomerang measurements requires embedding the following lines of code in your website:
boomerang.html

<html>
<head>
       <script type="text/javascript" src="https://WTS_FQDN/wifimon/js/boomerang/jquery-3.6.1.min.js"></script>
       <script type="text/javascript" src="https://www.google.com/jsapi"></script>
       <script src="https://WTS_FQDN/wifimon/js/boomerang/boomerang.js" type="text/javascript"></script>
       <script src="https://WTS_FQDN/wifimon/js/boomerang/bw.js" type="text/javascript"></script>
       <script src="https://WTS_FQDN/wifimon/js/boomerang/rt.js" type="text/javascript"></script>
       <script type="text/javascript" id="settings" hostingWebsite="https" agentIp="WAS_FQDN" agentPort="443" testtool="boomerang" testServerLocation="LOCATION" imagesLocation="https://WTS_FQDN/wifimon/images/" cookieTimeInMinutes=""
                   src="https://WTS_FQDN/wifimon/js/boomerang/boomerang-trigger.js" defer></script>
</head>
</html>

  • testtool (required): With this attribute, you specify a name for the testtool. WiFiMon Analysis Server relies on the value of this attribute to visualize measurements. The following assumptions are made: (i) for websites visited by WiFiMon Software Probes the value of the testtool attribute should be specified as "boomerang", while (ii) for websites visited by WiFiMon Hardware Probes the testtool attribute should be specified as "boomerang-x" where x is the description assigned to a particular WiFiMon Hardware Probe. Description can be a number, e.g. "5" or short text, e.g. "wifimon-5". Note that you must use separate websites for WiFiMon Software Probes and WiFiMon Hardware Probes.

2.1.3: LibreSpeed Speedtest

Speedtest requires two steps.

Step 1: Create the following proxy HTML page in the "measurements" folder of the "wifimon" directory that was downloaed in the previous section:
speedtest.html

<!DOCTYPE html>
<html>
<body>
<iframe src="https://WTS_FQDN/wifimon/js/speedtest/speedworker.html" style="visibility: hidden;"></iframe>
<body/>
</html>

Step 2: Create the following HTML page with name "speedworker.html" in the "js/speedworker" folder of the "wifimon" directory that was downloaded in the previous section:

speedworker.html

<!DOCTYPE html>
<html>
<head>
<title>Speed worker</title>
    <script type="text/javascript" src="jquery-3.6.1.min.js"></script>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript" id="settings" hostingWebsite="https" agentIp="WAS_FQDN" agentPort="443" testtool="speedtest" testServerLocation="LOCATION" cookieTimeInMinutes="0.01"
         src="speedworker-post.js"></script>
</head>
</html>

  • testtool (required): With this attribute, you specify a name for the testtool. WiFiMon Analysis Server relies on the value of this attribute to visualize measurements. The following assumptions are made: (i) for websites visited by WiFiMon Software Probes the value of the testtool attribute should be specified as "speedtest", while (ii) for websites visited by WiFiMon Hardware Probes the testtool attribute should be specified as "speedtest-x" where x is the description assigned to a particular WiFiMon Hardware Probe. Description can be a number, e.g. "5" or short text, e.g. "wifimon-5". Note that you must use separate websites for WiFiMon Software Probes and WiFiMon Hardware Probes.

2.2: Combining Measurements in the Same Page

Including all three types of testtools (NetTest, Akamai Boomerang, LibreSpeed Speedtest) in your measurements requires injecting the following HTML lines in the "head" section of the website that is monitored by WiFiMon:

<iframe src="https://WTS_FQDN/wifimon/measurements/nettest.html" style="visibility: hidden;"></iframe>
<iframe src="https://WTS_FQDN/wifimon/measurements/boomerang.html" style="visibility: hidden;"></iframe>
<iframe src="https://WTS_FQDN/wifimon/js/speedtest/speedworker.html" style="visibility: hidden;"></iframe>

where nettest.html, speedworker.html, boomerang.html include the JavaScript lines that trigger the necessary tests. These files were detailed above.

  • No labels