summaryrefslogtreecommitdiffstats
path: root/glances/glances.py
diff options
context:
space:
mode:
authorAlessio Sergi <al3hex@gmail.com>2014-01-04 01:40:00 +0100
committerAlessio Sergi <al3hex@gmail.com>2014-01-04 01:40:00 +0100
commit6acd6cc6caf2df7e30eb2291b6d3a447e3555271 (patch)
tree3e8c0f516e0eb1a76a9f5cd25b7c34c4edf1f7d6 /glances/glances.py
parente35239ead18bdbb5dbca5ff6be4a797917b3a147 (diff)
Add missing softirq stat against total CPU usage
Diffstat (limited to 'glances/glances.py')
-rw-r--r--glances/glances.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/glances/glances.py b/glances/glances.py
index 2e65ad7b..8ee9a620 100644
--- a/glances/glances.py
+++ b/glances/glances.py
@@ -1496,6 +1496,9 @@ class GlancesStats:
if hasattr(self.cputime_new, 'irq'):
self.cpu['irq'] = (self.cputime_new.irq -
self.cputime_old.irq) * percent
+ if hasattr(self.cputime_new, 'softirq'):
+ self.cpu['softirq'] = (self.cputime_new.softirq -
+ self.cputime_old.softirq) * percent
self.cputime_old = self.cputime_new
self.cputime_total_old = self.cputime_total_new
except Exception: