Read-only mirror of https://github.com/armasuissewt/pingi — armasuisse W+T. Issues & pull requests at the source.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Adrian Schneider a31325bd0d
Merge pull request #1 from armasuissewt/poetrygithub
Use poetry to setup github action
2021-06-12 17:09:04 +02:00
.github/workflows Fix action script 2021-06-12 17:05:02 +02:00
LICENSE Initial commit 2021-05-31 16:18:49 +02:00
pingi.py Fix import error 2021-06-11 23:19:56 +02:00
pyproject.toml Script can be stopped by key press 2021-06-11 17:09:01 +02:00
README.md Update README.md 2021-06-11 17:12:20 +02:00
test_pingi.py write ping times into file 2021-06-11 15:01:52 +02:00

pingi

pingi is a command line tool which is able to measure continuously the ping reply time.

How to use it

The user has the possibility to choose the ping destination address or ip -d, the ping interval -i in seconds and the file path -o containing the detailed ping measure records. In the following example, the script sends every 0.5 seconds a ping to the host www.srf.ch. The detailed results can be found in the file abcd.csv.

> python pingi.py -d "www.srf.ch" -i 0.5 -o abcd.csv
pingi: www.srf.ch , interval [s]: 0.5
..........   22:12:58 -> Success rate = 100.0  , Avg. ping reply [s] = 0.04225916862487793
..........   22:13:04 -> Success rate = 100.0  , Avg. ping reply [s] = 0.039688634872436526
..........   22:13:09 -> Success rate = 100.0  , Avg. ping reply [s] = 0.03984115918477376
...

After every 10th ping, the program prints an intermediate (trivial) statistic. The script can be stopped by pressing the key q.