Add a stats module with an uptime function

This commit is contained in:
Thomas S Hatch 2011-03-11 13:41:25 -07:00
parent dc9e7da5ef
commit 9fe924e89a

11
salt/modules/stats.py Normal file
View file

@ -0,0 +1,11 @@
'''
Module for returning statistics about a minion
'''
import subprocess
def uptime():
'''
Return the uptime for this minion
'''
return subprocess.Popen(['uptime'],
stdout=subprocess.PIPE).communicate()[0]