The Network Ping Monitor is a Python-based tool designed to continuously monitor network latency by pinging a specified host and visualizing the response times in real-time. This tool is particularly useful for network administrators, IT professionals, and anyone needing to monitor and analyze the stability and performance of their network connections. The script provides a live graph of ping response times and includes various statistics like average, minimum, maximum, and current response times, as well as standard deviation, to help identify and analyze network issues.
The tool was inspired by mtr tool but it lacks graph visualisation of pings.
I did some research, tried to find ready tool. Here is short summary of what I've found.
But no one solution I've found satisfied my requirements. So I wrote my own solution.
The Network Ping Monitor stands out by providing comprehensive statistics, including timeouts and packet loss, along with a dynamic, real-time graphing capability within a GUI. This makes it particularly user-friendly and informative for monitoring and analyzing network performance.
pip install matplotlib
)pip install numpy
)git clone git@github.com:vitovt/ping_graph.git
cd ping_graph
matplotlib
and numpy
.OR
requirements.txt
:
pip install -r requirements.txt
Run the script from the command line, specifying the host to ping as an argument:
python network_ping_monitor.py [host]
Replace [host]
with the hostname or IP address you want to monitor (e.g., google.com
).
host
: The hostname or IP address to ping.-W
, --timeout
: Timeout in milliseconds for each ping request. Default is 150 milliseconds.-i
, --interval
: Interval between pings in seconds. Default is 0.1 second.-D
, --dead_timeout
: Execution timeout in milliseconds for each ping command. Default is 500 milliseconds. Maximum is 10,000 milliseconds. Must be greater than or equal to timeout
.-6
, --ipv6
: Use IPv6 address for the ping.-W
, --timeout
: This is the timeout value for each individual ping request. If a ping response takes longer than this value, it is considered a timeout, and the response time is recorded as the timeout value.-D
, --dead_timeout
: This is the maximum time allowed for the ping
command to execute. If the ping
command takes longer than this value, it is forcibly terminated, and the response time is recorded as the dead_timeout
value. This ensures that the script does not hang indefinitely if the network is down or the host is unreachable.python network_ping_monitor.py google.com
This command will start pinging google.com
and open a window displaying the live graph and statistics.
[GPLv3]
Contributions to the Network Ping Monitor are welcome. Please read the contributing guidelines before submitting pull requests.
For support, feature requests, or any queries, please open an issue in the GitHub repository.