监控nis服务的python监控

监控nis服务的python监控:

vi a1.py

#!/usr/bin/python

import os

ret = os.popen('netstat -ntpl | grep ypbind').readlines()
if len(ret) == 0:
print "ypbind service is down"
os.system('service ypbind restart')

:wq

python a1.py

猜你喜欢

转载自blog.51cto.com/yangzhiming/2129780
今日推荐