mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Use os.getloadavg output directly
This commit is contained in:
parent
9f5c3ccc3d
commit
6fde4930b3
@ -124,11 +124,10 @@ def loadavg():
|
||||
|
||||
salt '*' status.loadavg
|
||||
'''
|
||||
comps = "%.2f %.2f %.2f" % os.getloadavg()
|
||||
load_avg = comps.split()
|
||||
return {'1-min': _number(load_avg[0]),
|
||||
'5-min': _number(load_avg[1]),
|
||||
'15-min': _number(load_avg[2])}
|
||||
load_avg = os.getloadavg()
|
||||
return {'1-min': load_avg[0],
|
||||
'5-min': load_avg[1],
|
||||
'15-min': load_avg[2]}
|
||||
|
||||
|
||||
def cpustats():
|
||||
|
Loading…
Reference in New Issue
Block a user