Fix off by one in Linux interrupts collector (#721)
* Fix off by one in Linux interrupts collector * Fix off by one in CPU column handler. * Add test. * Enable interrupts in end-to-end test.
This commit is contained in:
parent
f6556e69ec
commit
ea250d73f4
4 changed files with 121 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ func parseInterrupts(r io.Reader) (map[string]interrupt, error) {
|
|||
}
|
||||
intName := parts[0][:len(parts[0])-1] // remove trailing :
|
||||
intr := interrupt{
|
||||
values: parts[1:cpuNum],
|
||||
values: parts[1 : cpuNum+1],
|
||||
}
|
||||
|
||||
if _, err := strconv.Atoi(intName); err == nil { // numeral interrupt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue