statistics: Exit loop as soon as MemAvailable found
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
6aae62542c
commit
6b7e917a8e
|
@ -16,6 +16,7 @@ def get_os_stats(eventtime):
|
||||||
for line in data.split('\n'):
|
for line in data.split('\n'):
|
||||||
if line.startswith("MemAvailable:"):
|
if line.startswith("MemAvailable:"):
|
||||||
msg = "%s memavail=%s" % (msg, line.split()[1])
|
msg = "%s memavail=%s" % (msg, line.split()[1])
|
||||||
|
break
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
return (False, msg)
|
return (False, msg)
|
||||||
|
|
Loading…
Reference in New Issue