Register
It is currently Thu Apr 24, 2014 12:17 am

Server Monitoring


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Sun Jun 13, 2010 1:29 pm   

Joined: Fri May 16, 2008 4:58 am
Posts: 94
I'd like to monitor the computers on my home network and using

Code:
#!/bin/bash

for i in 10.0.0.1
do
ping -c 1 $i &> /dev/null

if [ $? -ne 0 ]; then
        echo "$i is down"

elif [ $? -ne 0 ]; then
        echo "$i is up"
fi
done


However i'm stuck with the old 'only notify on change' thing again ie I only want the status to be echo'd if it's changed from the previous one.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP