projects
/
vsorcdistro
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
28332bde441d3b0d58934a67ff4e08d3808dc966
[vsorcdistro/.git]
/
conectionmonitor.py
1
#!/usr/bin/python
2
import os
3
for i in range(3,17):
4
hostname = "192.168.25."+str(i) #example
5
response = os.system("ping -c 1 " + hostname +" > /dev/null")
6
7
#and then check the response...
8
if response == 0:
9
print hostname
10
# else:
11
# print hostname, 'is down!'