Skip to content

biyiklioglu/ping-exp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

pingexp.py: Ping one or more destinations and graph the results.

Requirements:
	Python 2.6
	Matplotlib

Ping-exp pings the passed targets, collects and then graphs the results.

Usage: ./pingexp.py [-t TARGET [-w FILE ] | -r FILE ] [-i INTERVAL] [-c COUNT]
	  [-l] [-o FILE]"
-t TARGET: Specify the ping target information. TARGET string is 'ID,FQDN,TOS'
	   (see below). Cannot be used with -r.
-w FILE: Write the results to FILE. Only valid with -t.
-r FILE: Read results from FILE. Cannot be used with -t.
-i INTERVAL: Time in seconds between pings. Default .2 seconds.
-c COUNT: Number of pings to transmit. Default 400.
-o FILE: Name of a file to output a PNG of the graph to.
-l: Plot a line graph instead of a scatter plot.

TARGET: Experiment identifier,host or IP to ping,TOS field value.

By default the program will load the Matplotlib graph viewer to display the
graph. This viewer allows you to zoom in on interesting parts of the graph.
Passing -o will cause a PNG file to be written instead of starting the
Matplotlib viewer.

The TOS value is the value to be used for the entire TOS byte. Newer RFCs
redefine the TOS byte as two fields: DSCP and ECN.

TOS examples:
Set the minimize delay bit: 16
Set the maximize throughput bit: 8
Most traffic on the Internet uses 0 so if you are not testing TOS/DSCP related
stuff just use 0.

Examples:

#1) Ping Google and Yahoo 100 times, .2 seconds between pings. Generate a line
graph.

pingexp.py -t Google,www.google.com,0 -t Yahoo,www.yahoo.com,0 -c 100 -i .2 -l

#2) Same as above instead of graphing save the results to results.data.

pingexp.py -t Google,www.google.com,0 -t Yahoo,www.yahoo.com,0 -c 100 -i .2 -w results.data

#3) Load results.
pingexp.py -r results.data

Releases

No releases published

Packages

No packages published

Languages