============================ Usage ============================ After installing **NLM**, you can start monitoring network latency. Configuration ============================ Before running NLM, configure your settings in the `config.yaml` file. **Sample `config.yaml`:** .. code-block:: yaml "duration": 10800, # in seconds "ip_addresses": ["8.8.8.8"], "ping_interval": 1, # in seconds "latency_threshold": 200.0, # in ms "no_aggregation": False, "no_segmentation": False, "file": None, # Optional: Specify a ping result file to process "clear": False, # Set to True to clear all data "clear_results": False, # Set to True to clear results folder "clear_plots": False, # Set to True to clear plots folder "clear_logs": False, # Set to True to clear logs folder "yes": False, # Set to True to auto-confirm prompts The `config.yaml` file is autogenerated the first time that the program is run. It is saved in default directories based on your operating system. For Linux users: ``/home/username/.config/network_latency_monitor/config.yaml`` For Windows users: ``%APPDATA%\nlm\config.yaml`` For MacOS users: ``~/Library/Application Support/nlm/config.yaml`` Running the Program ============================ **Running from Source** If you have installed from source using `poetry`, then you can run the program using `poetry run`. To run the program with all default parameters (as obtained from `config.yaml`): .. code-block:: bash poetry run nlm **Running from Pip Installation** If you are running the program after installing it through `pip`, you can run it simply by: .. code-block:: bash nlm To view all command-line options and a simple guide, run .. code-block:: bash nlm --help This will run the program with default parameters as obtained from `config.yaml`. Usage Examples ~~~~~~~~~~~~~~ - Monitor two IP addresses for 1 hour with a 2-second interval between pings: .. code:: bash nlm 8.8.8.8 1.1.1.1 --duration 3600 --ping-interval 2 - Process an existing ping results file and disable data aggregation: .. code:: bash nlm --file results/ping_results_8.8.8.8.txt --no-aggregation - Clear all data (results, plots, logs) without confirmation: .. code:: bash nlm --clear --yes - Monitor a single IP address with a custom latency threshold: .. code:: bash nlm 8.8.4.4 --latency-threshold 150.0 - Regenerate the default ``config.yaml`` file: .. code:: bash nlm --regen-config - Disable segmentation of latency plots: .. code:: bash nlm 8.8.8.8 --no-segmentation - Monitor a single IP for 2 hours, with default settings: .. code:: bash nlm 8.8.8.8 --duration 7200 - Run the program with default parameters, but no output to the terminal: .. code:: bash nlm -q - Run the program with log-level information printed to the terminal: .. code:: bash nlm -v - Run the program with debug-level logs printed to the terminal: .. code:: bash nlm -vv - Clear only the plots folder: .. code:: bash nlm --clear-plots