From d959e9a88e377b2a7fea219865cd7757e01f953d Mon Sep 17 00:00:00 2001 From: zhaoyoushuai Date: Fri, 9 Jun 2017 11:24:10 +0800 Subject: [PATCH] fix 60_stats_per_cpu_core.py bug --- common/60_stats_per_cpu_core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/60_stats_per_cpu_core.py b/common/60_stats_per_cpu_core.py index d8fffb0..fabcbd0 100755 --- a/common/60_stats_per_cpu_core.py +++ b/common/60_stats_per_cpu_core.py @@ -15,7 +15,9 @@ def get_cpu_core_stat(num): except: continue - output = handler.read().strip().split()[1:] + output = handler.read().split('\n')[0] + output = output.split(' ')[1:10] + if len(output) != 9: continue