Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess as sp
- ip = "216.52.241.254"
- status,result = sp.getstatusoutput("ping -c1 -w2 " + ip)
- if status == 0:
- print("System " + ip + " is UP !")
- else:
- print("System " + ip + " is DOWN !")
- print(result)
Add Comment
Please, Sign In to add comment