Detecting Wi-Fi disconnects

Discussion in 'Networking Issues' started by Natey2, Aug 26, 2013.

  1. Natey2

    Natey2 Serious Server Member

    To test how reliable the Wi-Fi connections to my new router are:

    Can I just write a script that pings (and logs the results to a file) my Wi-Fi devices from my main computer (wired to the router), and look in those logs (after a couple of days) for connection problems?
     
  2. sim0n

    sim0n Reformed Router Member

    If its any help, and you're running linux, I recently did just that for an issue I was having. Though I only had it run for a day while I was working out the kinks.
    Code:
    #!/bin/bash
    ping -c 2 192.168.0.10 &&  echo $(date +%Y%m%d%H%M) "pc is online" >> ~/ping_log.txt || echo $(date +%Y%m%d%H%M) "pc not responding to ping" >> ~/ping_log.txt
    set to run every 5 minutes via cron (I tried to fit the command directly into the crontab but it didn't like the the way I formed the echoes or the quotes or something)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice