|Network Diagnostic Tool (NDT)|
Author: Seth Peery, Virginia Polytechnic Institute and State University
UPDATED: December 21, 2009
The open-source Network Diagnostic Toolkit (NDT) was originally developed to identify when network performance was sub-par and to give the user (or their admin) guidance on how to correct the problem, but its popularity as an Internet "speed test", typically embedded inside of a web application front-end that collects additional data, has grown in recent years. Notable examples of "early adopters" of NDT in this context include the Virginia Tech eCorridors Community Broadband Map and BroadbandCensus.com. NDT is well suited to this purpose, but it is important to note that in light of its original purpose, it collects additional data that sets it apart from other free and commercial "speed test" programs. Specifically, NDT seeks to determine why a network connection exhibits certain performance characteristics. In addition to measuring the familiar upload and download speeds of a user's connection, NDT also performs tests that can assess factors such as latency, packet loss, congestion, bad cables, and bottlenecks on the end-to-end path from client to server.
The variables are accessed by first obtaining a reference to the NDT applet itself, and then calling the appropriate functions to access the desired variables. Note that the applet must have completed its testing cycle before these variables will store meaningful values.
General Procedure for Integrating NDT into a Web Application
The section of the reference document will illustrate how to:
When reading through this section, please refer to the following examples:
Embedding the NDT Applet directly from MeasurementLab (recommended method):
Web developers that want to add an NDT test to their page may do so by simply copying and pasting the following code into the source of any .html, .htm, .php (...etc) page.
Note that width and height tags in all the examples that follow are shown for example only - you can change them to whatever suits your application.
<applet name="NDT" code=Tcpbw100.class codebase="http://ndt.iupui.donar.measurement-lab.org:7123" ARCHIVE="Tcpbw100.jar" width=400 height=400> </applet>If desired, you may add a parameter to the applet to instruct it to initiate a test immediately upon load:
<applet name="NDT" code=Tcpbw100.class codebase="http://ndt.iupui.donar.measurement-lab.org:7123" ARCHIVE="Tcpbw100.jar" width=400 height=400>
* Data type in this table refers to the underlying (native) data type of a variable. All data is returned to the client using the functions above as type String. In many instances this is sufficient, but should calculations need to be performed on the data, it will need to be converted back to its native data type.