< Ping Visualization and Analysis >

Ping Analysis

Background / Motivation

Ping Analysis

The internet connection is unreliable. One day data runs at full speed and the next day you have several connection losses. I am not able to fix the internet connection but at least I can log the ping times and visualize the live results.

For a deeper analysis of the logs one can use a professional spreadsheet program. (MS Excel, OpenOffice/LibreOffice Calc, ...)
If you are interested in more sophisticated alternatives please refer to solutions like Cacti or Smoke Ping.

Logging and Visualization

First, you have to start the ping command on your computer. There is a shell script for Linux/Unix (and Mac?) and a script for Windows in the archive to download. It creates a log file in the subdirectory "logs" with the name of the current date, eg. 2012-12-31.txt Then you can start the index.html file for the visualization of the ping answers.
You can even use an automatic refresh of the page to be always up to date.

The program is mainly for people with an internet connection that is not running constantly. If you live in the city, have a cable connection, and are not connected by WiFi you might not see any exciting peaks in the logging.

Examples

A visualition of 21 November 2012 with different configuration values.

Interval Refresh No. of Results Width of Bars Height of Bars OS of Log File
Example 5 sec no 300/800 3px 100% Linux
Example 5 sec no 400/800 2px 100% Linux
Example 5 sec x3 (15 sec) 200/800 4px 150% Linux

Configuration

Before starting you have to adjust the file "configuration.js" in the "system" folder to your own needs and operating system. To edit the file you can use a simple text editor.

var strSystem = "ix"; The ping logfile is from Linux/Unix/Mac ("ix") or Windows ("win")
var intNumberResults = 300; The default number of (most recent) results shown in visualization.
var intInterval = 5; The interval between the ping requests (for statistics)
Linux command: ping [destination] -i 5
Windows: does not support this command, default might be 1 sec?
var intBarWidth = 3; The pixel size (width) of bars in visualization chart.
var intBarHeight = 100; The percentage size (height) of bars in chart.
A ping reply of 25ms equals a 25 pixel bar height (=100%)
var intFileSearch = 7; The default value of days to look back for older files.
var intRefreshRate = 0; Automatic refresh of page off (0) or a multiplier to intInterval.

Bugs / To Do List

  • Fix "Cross Origin Request"-Policy in Internet Explorer/Edge and Google Chrome. The log-files won't load in these browser because they don't allow to load data from file://-protocol. :( Firefox works for the moment (10/2016). (HTML5 offers file support but has to be implemented.)
  • lighten the bloated source code
  • add timestamp to Windows log file
  • When starting without a defined log-filename, the program uses UTC-time to find the current file. This is no big problem in Europe or Africa (UTC +1 to +3 hours). But in Asia and America (UTC +/- 6 to 12 hours) one might get an error message that the "current" file was not found. Still you can click on the filename in the list of found files.
  • If you use the automatic refresh on constant cable connections with low ping times (ca. 20ms) you won't see any statistics in the upper chart. This might cause some confusion.

Download

You can download and use the program for free from the download page.

Related topics:

Rate page:  
  2.98/5 Points (42 Ratings)
2.98/5 42