mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add a stats module with an uptime function
This commit is contained in:
parent
dc9e7da5ef
commit
9fe924e89a
1 changed files with 11 additions and 0 deletions
11
salt/modules/stats.py
Normal file
11
salt/modules/stats.py
Normal 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]
|
Loading…
Add table
Reference in a new issue