Monitor Wi-Fi connectivity by constant curl or ping requests to selected destinations. Monitor DNS servers for host resolving.
Designed and tested on macOs. Uses commands from terminal dig, curl, ping
- logs wi-fi network name;
- Periodically do
curl/pingrequests to listed destination; - If destination is not reachable checks response from DNS using
dig; - You can specify individual timeouts for each destination;
- uses asyncio as backend to manage multiple simultaneous requests;
Designed and tested on macOs. Uses commands from terminal dig, curl, ping. Check that your user have necessary permissions to run this commands.
conda create --name python313 python=3.13
conda activate python313
pip install -r requirements.txt- modify settings in
utils.pyfile
# default variables
CNT_PINGS = 2
CNT_CURLS = 1
TIMEOUT_S = 10 # cancel request that takes to long to response
SLEEP_S = 20 # sleep time between requests
...
DNS_SERVERS = [
'8.8.8.8',
'172.20.10.1',
]
REQUESTS = [
Request.curl("google.com", sleep_s = 45),
Request.curl("yandex.ru"),
Request.curl("mail.ru",),
Request.curl("github.com"),
Request.curl("stackoverflow.com"),
Request.curl("habr.com/ru/feed"),
Request.curl("https://www.youtube.com/"),
Request.curl("https://outline.mlrnd.ru/"),
Request.ping("127.0.0.1"), # loopback address
]- run script with python:
python main.py- Example of saved logs:


