[Orca-dev] intr/s doubled bug in procallator on linux
Kowalski, Kenneth
Kenneth.Kowalski at xo.com
Tue Oct 7 09:45:02 PDT 2008
In procallator for linux, there is a bug which results in the
interrupts/sec being counted twice. The code sums over all values from
the intr line in /proc/stat instead of just using the second column
value.
I have checked this on multiple 2.6 kernels and a single 2.4 kernel.
>From the section 5 manpage for proc
intr 1462898
This line shows counts of interrupts serviced since boot time, for each
of the possible system interrupts. The first column is the total of
all interrupts serviced; each subsequent column is the total for a
particular interrupt.
intr from /proc/stat
intr 1346334722 1212510299 2 0 1 1 1 0 2 0 0 1 1 5 0 57 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 127773465 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6050887 0 0 0 0 0
The change below produces output that matches the sysstat utilities. I
added a start of line anchor also.
if ( $line =~ /^intr/ ) {
@dumb = split / /, $line;
$intr[$r] = $dumb[1];
# $i = 1;
# while ( $i < @dumb ) {
# $intr[$r] += $dumb[$i];
# $i++;
# }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/orca-dev/attachments/20081007/6c9d65cd/attachment.html>
More information about the Orca-dev
mailing list