X-Git-Url: https://git.josue.xyz/?p=vsorcdistro%2F.git;a=blobdiff_plain;f=scripts%2Fconectionmonitor.py;h=2bfbb71ee85c686441e6c57df2690ab785b35325;hp=28332bde441d3b0d58934a67ff4e08d3808dc966;hb=577629227563587789e88ba9ac2c85013c643d08;hpb=741ddd9f014681c0f1a5ea3448067f7dafbb2c0c diff --git a/scripts/conectionmonitor.py b/scripts/conectionmonitor.py index 28332bd..2bfbb71 100755 --- a/scripts/conectionmonitor.py +++ b/scripts/conectionmonitor.py @@ -1,11 +1,10 @@ #!/usr/bin/python import os -for i in range(3,17): - hostname = "192.168.25."+str(i) #example +print "Raspberry Pi UP!" +for i in range(2,16): + hostname = "rpi"+str(i) response = os.system("ping -c 1 " + hostname +" > /dev/null") - -#and then check the response... +#Check the response... if response == 0: print hostname -# else: -# print hostname, 'is down!' +