ping utility to test a server, that can also alert me?

holden j caufield

Diamond Member
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.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
while true; do
ping -c 1 SYSTEM || mail -s 'system down' EMAIL_ADDRESS < /MESSAGE/FILE
sleep 60
done

It'd probably be better to have a real system like nagios to do this though. :p