Return to site

Set ping for limited pings, os x

broken image
broken image

This allows me to open a small text file and at a glance see the specific times a particular IP address was inaccessible. So every instance of the above line is a ping failure and all successful pings will NOT be recorded to the file. If any individual ping results in a “Request timed out” the batch file will specifically look for “Lost = 1” in the ping results, and when found, will append the following string (with current date and time) to a new line in a text file: So what I want to do is look for the “Lost =1” and when I find it, I want to append it to a text file along with a time stamp.Īfter concatenating many Google searches along with some trial and error, I’ve come up with a batch file that will ping a particular IP address once per second.

broken image

Packets: Sent = 1, Received = 0, Lost = 1 (100% loss), The result will be this (assuming 10.1.1.1 is inaccessible):