- Dec 30, 1999
- 6,324
- 10
- 81
We've got a test server that is randomly losing connectivity. I need to constantly ping it, about every minute or so and if it could alert me via email when it goes down that'd be great, free is better.
while true; do
ping -c 1 SYSTEM || mail -s 'system down' EMAIL_ADDRESS < /MESSAGE/FILE
sleep 60
done