From bd775a7ed33e8daf98e6dc867e82d788057b73e3 Mon Sep 17 00:00:00 2001 From: Florian N Date: Wed, 5 Feb 2014 16:07:00 -0500 Subject: [PATCH] a bit of code cleanup --- main/views.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/main/views.py b/main/views.py index 61122f4..0097353 100755 --- a/main/views.py +++ b/main/views.py @@ -178,22 +178,6 @@ def get_mem(): return data -#def getcpu_usage(): -# try: -# pipe = os.popen("ps aux |" + "awk {'sum+=$3;print sum'} |" + "tail -n 1") -# data = pipe.read().strip() -# pipe.close() - -# cpu_free = (100 - float(data)) -# cpu_used = {'free': cpu_free, 'used': float(data)} -# data = cpu_used - -# except Exception,err: -# data = str(err) -# -# return data - - def get_cpu_usage(): try: pipe = os.popen("ps aux --sort -%cpu,-rss")