interrupts and usb_fiq #1007

pull/1039/merge
nicolargo 2017-01-29 17:15:22 +01:00
parent 12412caf56
commit 12b75d44d9
2 changed files with 11 additions and 3 deletions

1
NEWS
View File

@ -9,6 +9,7 @@ Bugs corrected:
* Autodiscover error while binding on IPv6 addresses (issue #1002)
* GPU plugin is display when hitting '4' or '5' shortkeys (issue #1012)
* Interrupts and usb_fiq (issue #1007)
Version 2.8
===========

View File

@ -94,6 +94,7 @@ class Plugin(GlancesPlugin):
if not LINUX or not self.stats or not self.args.enable_irq:
return ret
if max_width is not None and max_width >= 23:
irq_max_width = max_width - 14
else:
@ -173,12 +174,18 @@ class GlancesIRQ(object):
Return the IRQ sum number
IRQ line samples:
1: 44487 341 44 72 IO-APIC 1-edge i8042
1: 44487 341 44 72 IO-APIC 1-edge i8042
LOC: 33549868 22394684 32474570 21855077 Local timer interrupts
FIQ: usb_fiq
"""
splitted_line = line.split()
# sum interrupts on all CPUs
return sum(map(int, splitted_line[1:(self.cpu_number + 1)]))
# Correct issue #1007 on some conf (Raspberry Pi with Raspbian)
if len(splitted_line) < self.cpu_number + 1:
ret = 0
else:
# sum interrupts on all CPUs
ret = sum(map(int, splitted_line[1:(self.cpu_number + 1)]))
return ret
def __update(self):
"""