From 0dde712144864e7f1c7363eda12b3704b21fa215 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 9 Dec 2013 02:30:51 +0100 Subject: [PATCH] Forgot another split... --- cstatsd/stats-machine | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cstatsd/stats-machine b/cstatsd/stats-machine index 6abee04..cb237af 100755 --- a/cstatsd/stats-machine +++ b/cstatsd/stats-machine @@ -106,7 +106,7 @@ while True: if openvz_burst: # Sigh, OpenVZ... let's use 'free', since that apparently -does- understand OpenVZ. - lines = subprocess.check_output(["free", "-b"]) + lines = subprocess.check_output(["free", "-b"]).splitlines() _, ram_total, ram_used, ram_free, _, ram_buffers, ram_cached = lines[1].split() _, _, _, ram_available = lines[2].split() ram_percent = 1.0 * (ram_total - ram_available) / total * 100