diff options
author | bouyer <bouyer@pkgsrc.org> | 2001-02-08 09:12:58 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2001-02-08 09:12:58 +0000 |
commit | 864027385a0d43d0986aa926658228d3809ebd87 (patch) | |
tree | eb9362c89359d6c6baa662a403cb57915940e906 /net | |
parent | 3dc19a8679dd47e8024bac230b562474db526c04 (diff) | |
download | pkgsrc-864027385a0d43d0986aa926658228d3809ebd87.tar.gz |
Print 0 when the number of IRQs has become negative instead of nothing (which
confuses mrtg).
Diffstat (limited to 'net')
-rw-r--r-- | net/mrtg/files/sys2mrtg | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/mrtg/files/sys2mrtg b/net/mrtg/files/sys2mrtg index 46776492f56..167e0001965 100644 --- a/net/mrtg/files/sys2mrtg +++ b/net/mrtg/files/sys2mrtg @@ -73,11 +73,15 @@ if ($cmd eq irq) while (<CMDOUT>) { chop $_; - if (m|^(\w+)[\t\s]+(\d+)|) + if (m|^(\w+)[\t\s]+(-?\d+)|) { + $val = $2; + if ($val < 0) { + $val = 0; + } if ($1 eq $irqname) { - print "$2\n"; + print "$val\n"; } } } |