ping analyzer /

Filename Size Date modified Message
8 B
484 B
3.6 KB
2.8 KB
764 B
4.1 KB
This is a simple program for analyzing the output of the Unix 'ping' command
stored in a plain text file. The program reads the file and looks for the
"time" parameter for each ICMP request. Then, it calculates some statistical
data from that:
    - The maximum time value.
    - The minimum time value.
    - The average time value.
    - The standard deviation.
The program also draws a plot for all the request times, giving the user a
graphical view of the operation. For this, program uses the gnuplot-py libs.

The usage of ping-analyzer is quite easy. First, you should have a plain text
file with the output of a ping command execution. For example, you can do the
next in a GNU/Linux Bash shell:

$ ping -i 0.2 -c 10 > test_ping

That will store the ping output in the 'test_ping' file. If you open the file
it will looks like this:
PING ( 56(84) bytes of data.
64 bytes from ( icmp_req=1 ttl=48 time=47.8 ms
64 bytes from ( icmp_req=2 ttl=48 time=45.5 ms
64 bytes from ( icmp_req=4 ttl=51 time=44.9 ms
64 bytes from ( icmp_req=5 ttl=51 time=45.1 ms
64 bytes from ( icmp_req=6 ttl=51 time=44.0 ms
64 bytes from ( icmp_req=7 ttl=51 time=46.8 ms
64 bytes from ( icmp_req=8 ttl=51 time=46.8 ms
64 bytes from ( icmp_req=9 ttl=51 time=44.2 ms
64 bytes from ( icmp_req=10 ttl=51 time=43.9 ms

--- ping statistics ---
10 packets transmitted, 9 received, 10% packet loss, time 6664ms
rtt min/avg/max/mdev = 43.987/45.507/47.829/1.317 ms

Now, you can use pingstats to analyze the file. For that, you can call it like

$ python test_ping

Or you can call it without passing the file argument, then the program will ask
you for it:

$ python
Enter a file to analyze:

This program needs the Gnuplot libraries for Python to work properly. You can
obtain it easily installing them from the setuptools, as root or in a virtual
or isolated environment as a normal user:

# easy_install gnuplot-py

Or maybe you prefer to use pip:

# pip install gnuplot-py

You can test the application executing the file:

$ python

This program is completely free for any use. See LICENSE file attached.