a guest Feb 13th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import subprocess as sp
- ip = "126.96.36.199"
- status,result = sp.getstatusoutput("ping -c1 -w2 " + ip)
- if status == 0:
- print("System " + ip + " is UP !")
- print("System " + ip + " is DOWN !")
RAW Paste Data