This Python-based tool continuously monitors network performance by measuring latency, jitter, and stability. It adapts test frequency and parameters based on real-time network conditions, ensuring efficient performance analysis.
- Dynamic Adjustments: Test intervals, packet count, and sampling frequency adapt based on network quality and stability.
- Comprehensive Scoring: Calculates quality and stability scores for latency and jitter.
- Logging and Alerts: Provides real-time logs and alerts for critical network failures.
- Customizable Settings: Configurable thresholds and test parameters.
-
Python 3.10 or later
Ensure Python is installed. Verify with:python --version
-
ping_statsBinary
The tool requires theping_statsutility in your PATH. Confirm its availability:which ping_stats
-
Clone the repository:
git clone <repository_url> cd <repository_name>
-
Install required packages:
pip install -r requirements.txt
Run the tool using the following command:
sudo env "PATH=$PATH" python3 monitor.pyExplanation:
sudois necessary because theping_statsutility requires superuser privileges to send ICMP packets and access network interfaces.env "PATH=$PATH"ensures the script has access to the current user's PATH environment, including the location ofping_statsand dependencies, assudoby default resets the PATH.
- Logs are saved to
network_monitor.login the current directory. - Real-time output is displayed in the terminal.
Terminate the program gracefully with Ctrl+C.
The project includes unit tests to validate core functionalities. Run the tests using:
pytest -v test_monitor.pyEnsure all dependencies for testing (pytest, pytest-mock) are installed.
-
ping_stats not found in PATH:
Ensureping_statsis installed and available in your system PATH. -
Permission Errors with
sudo:
The tool requiressudoprivileges for certain commands. Update yoursudoersfile if necessary. -
Network Performance Issues:
Adjust thresholds and sampling parameters insettings.tomlto better suit your environment.