Scripting in Bash

Simple Ping Monitor – Windows

Just a simple script thrown together to record the time and date of an outage on a server using ping from a Windows machine. You can view the data in Excel from this script if you set excel to separate the file using carriage returns.

echo Monitoring Server see output.txt for logged entries
echo Ctrl + C to Cancel
echo %time% %date% >>output.txt && ping -n 1 | find "time" | find "Re" >>output.txt
timeout 5 >> nul
GOTO ping

Leave a Reply

Your email address will not be published. Required fields are marked *