get_AccessTech()
get_avgrtt()
get_Bad_cable()
get_c2sspd()
get_clientIP()
get_congestion()
get_CurRTO()
get_CurRwinRcvd()
get_cwndtime()
get_DupAcksOut()
get_host()
get_javaVer()
get_jitter()
get_loss()
get_MaxRTT()
get_MaxRwinRcvd()
get_mismatch()
get_natStatus()
get_optimalRcvrBuffer()
get_osArch()
get_osName()
get_osVer()
get_Ping()
get_rcvrLimiting()
get_s2cspd()
get_SACKsRcvd()
get_TimeStamp()
get_WaitSec()
isReady()
get_errmsg()
run_test()
Connection Properties
Upload speed
Download speed
Latency (Ping)
Jitter
Packet loss
Timeouts
Congestion
Testing server
Client IP
Client operating system
Timestamp
Access Technology
IntroductionThe 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 latest release of NDT now provides the ability for web developers to use Javascript to retrieve the values of variables from within a running instance of the NDT applet (Tcpbw100) and use the values of these variables elsewhere in their web applications. In this way, the value added information beyond upload and download speed that NDT collects during a test can be made available to front-end web applications, such as mapping and data collection interfaces. 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 ApplicationThe 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>
Deploying the applet in this way guarantees that you'll always have the latest updates, and you won't have to worry about building it from source. Additionally, by using the above URL, your clients will be routed by MeasurementLab to the closest available NDT server to their location. If you want to retrieve data from the applet, even though it's being served from a remote location, you can still use the API functions below in your page's JavaScript to access the same values you would if you were running your own instance of the applet.
|
* 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.