diff --git a/beat/core/stats.py b/beat/core/stats.py old mode 100644 new mode 100755 index 1e056b2534bc71eb4e110ce57a83923e1c049001..021d006bf2f6b9cb3130c841b79cf552b3c3d7c6 --- a/beat/core/stats.py +++ b/beat/core/stats.py @@ -280,6 +280,15 @@ def cpu_statistics(start, end): """ + if not end.has_key('system_cpu_usage'): + return { + 'user': 0.0, + 'system': 0.0, + 'total': 0.0, + 'percent': 0.0, + 'processors': 1, + } + if start is not None: user_cpu = end['cpu_usage']['total_usage'] - \ start['cpu_usage']['total_usage']