Use os.getloadavg output directly

This commit is contained in:
David Lindquist 2013-07-27 11:43:43 -07:00
parent 9f5c3ccc3d
commit 6fde4930b3

View File

@ -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():