import subprocess
def __run__(params):
try:
p = subprocess.Popen(["ps", "-ely"], stdout=subprocess.PIPE)
out, err = p.communicate()
if ('garbd' in out):
return [0,'OK! Garbd is running!']
else:
return [2, 'CRITICAL: Garbd is not running, check the service!']
except Exception, e:
return [2, 'CRITICAL: {0}'.format(str(e))]