Version: v1.1

Type: Full Script

Category: Networking

License: GNU General Public License

Description: php page that runs a bash script to check for responses from a list of hosts/nodes bash script included ;)

# accecpts a file as a list of nodes to ping to check for responses


# reads the file and for each item in the file, tries 
# to ping it, if it gets a response awk $7 (which is 
# % of packet loss) determines if the node is OK or 
# got No Response

for i in $( /bin/cat $myList ); 
	echo $i ;
	ping $i -n -c 1 -w 1 | grep packet | awk '$7 == "0%" {print " OK"}
;$7 =="100%" {print "   ...Did Not Respond!"}' 

# make sure your 'ping' line is only one(1) line
# funny how there is more comments in here then code, hey?
# ;)