getStatistics.cgi - Summary Server Get Request 

[ Manual ] [ Discussion] [ Interface ] [ Results] [ TOC ] [ Example ]

Manual

Usage

Parameters

SRCNODEID
DSTNODEID
FIRSTHOPNODEID
Required
Required
Optional
Together, these three parameters specify the path or paths of interest.  Each Surveyor machine is identified by a NODEID (see  getNodes.cgi).   SRCNODEID and DSTNODEID specify the end points of a requested path(s).  Each may be a single NODEID, a list of column-separated NODEIDs (using the delimiter "|"), a wildcard asterisk ("*") representing all NODEIDs, or a COI identifier (using the syntax: "coi:#").

FIRSTHOPNODEID may be used to disambiguate multiple paths between a source and a destination.  A FIRSTHOPNODEID indicates the first router downstream from SRCNODEID.  The default value for this field is "0", which indicates that the default path between SRCNODEID and DSTNODEID is desired.

TYPEP Optional Test packet type.  The default value for this field is "01", which indicates a default "best effort" test packet stream.
STAT_ID Required STAT_ID specifies which statistic or statistics are requested.  This field may be a single STAT_ID, a list of column-separated STAT_IDs (using the delimiter "|"), or a wildcard asterisk ("*") representing all STAT_IDs.  (See also  getStatisticTypes).
TS
TF
Required
Required
TS and TF specify the (inclusive) time interval of interest.  TS is the start time,  and TF is the final time.  TS and TF are in seconds since the Unix epoch (00:00 Jan 1, 1970 UTC).
GRAN Required GRAN, or granularity, requests statistics aggregated to the given number of seconds.  GRAN must currently be 60 seconds, so statistics are computed over successive one-minute intervals.
STRIDE Optional STRIDE is a skip value for sampling the data.  For example, setting STRIDE to 2 returns every other value at the specified GRAN from start time TS to finish time TF.
OUTPUT Optional Output type for the response; legitimate value are: TXT (default), HTML
DEBUG Optional If set, generate synthetic data for debugging purposes (useful for off-line debugging).

Discussion

getStatistics.cgi allows applications to make HTTP GET requests to retrieve one or more Surveyor summary statistics along one or more test paths.  Initially, the following statistics are available:  minimum delay, 50th percentile delay, 90th percentile delay, and percent packet loss.  A client may query for the available statistic types by using getStatisticTypes.cgi.

Statistics are generated for various aggregation intervals, indicated by the GRAN parameter.  Initially, one-minute aggregation intervals are made available and hence, GRAN must be set to "60".

Interface

The interface for getStatistics.cgi is the standard HTTP GET request. There are two main parts to the GET request:
 
 
CGI URL <SSS root>/getStatistics.cgi
Arguments SRCNODEID=#
&DSTNODEID=#
[&FIRSTHOPNODEID=#]
&TYPEP=#
&STAT_ID=#
&TS=#
&TF=#
&GRAN=60
[&STRIDE=#]
[&OUTPUT={TXT|HTML}]
[&DEBUG=#]

Each argument has an identifier and value (i.e.. SRCNODEID = value). The arguments are separated from the CGI URL by the "?" charcter and from each other by the "&" character.

Results

Upon making a HTTP GET request the application receives the following plain text output:
 
IPPM #The string "IPPM" is the start-of-data marker 
ErrorCode
SRCNODEID,DSTNODEID,FIRSTHOPID,TS, TF, STAT_ID, GRAN, STRIDE
data-for-TS
data-for-TS+(GRAN*STRIDE)
data-for-TS+2*(GRAN*STRIDE)
...
data-for-TF
-1 #The string "-1" is the end-of-data marker
Each line is terminated by a newline character ('\n').

ErrorCodes are the following:
 
OK 0
BAD_NODEID -1
BAD_TYPE -2
INVERTED_RANGE -3
UNAVAILABLE_GRANULARITY -4
BAD_FIRSTHOP -5
BAD_STRIDE_VALUE -6
BAD_TIMEVAL -7
BAD_TYPEP -8
INVALID_NOW_USAGE -9

Examples

http://sss.advanced.org/perl/getStatistics.cgi?SRCNODEID=1&DSTNODEID=2&STAT_ID=0&TS=936256605&TF=936256605&GRAN=60&STRIDE=1
http://sss.advanced.org/perl/getStatistics.cgi?SRCNODEID=14&DSTNODEID=1|2|3|4|5|6|7|8|9|10|11|12|13|14|29&STAT_ID=0&TS=936256605&TF=936256605&GRAN=60&STRIDE=1
http://sss.advanced.org/perl/getStatistics.cgi?SRCNODEID=*&DSTNODEID=1&STAT_ID=0&TS=936256605&TF=936257605&GRAN=60&STRIDE=2

To get HTML tablized output, set OUTPUT=HTML:
http://sss.advanced.org/perl/getStatistics.cgi?SRCNODEID=14&DSTNODEID=2&STAT_ID=0&TS=936256605&TF=936257605&GRAN=60&STRIDE=1&OUTPUT=HTML



Direct questions or comment to Ben Teitelbaum.