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