Skip to content

Commit

Permalink
* linux/irqstats: Make --logarithmic and enhance information
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolai Langfeldt committed Jul 14, 2011
1 parent b87e77b commit e400618
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions plugins/node.d.linux/irqstats.in
Expand Up @@ -136,17 +136,25 @@ if (defined $ARGV[0] && $ARGV[0] eq 'config') {
print 'graph_title Individual interrupts',
defined($cpu) ? " on CPU $cpu\n" : "\n";
print <<EOM;
graph_args --base 1000 -l 0;
graph_args --base 1000 --logarithmic
graph_vlabel interrupts / \${graph_period}
graph_category system
graph_info Shows the number of different IRQs received by the kernel. High disk or network traffic can cause a high number of interrupts (with good hardware and drivers this will be less so). Sudden high interrupt activity with no associated higher system activity is not normal.
EOM
print join(' ', 'graph_order', map {"i" . $_->{irq}} @irqs), "\n";
for my $irq (@irqs) {
my $f = ($irq->{label} || $irq->{irq});
$f = $irq->{irq} if (length ($f) > 47);
print "i", $irq->{irq}, '.label ', $f, "\n";
print "i", $irq->{irq}, '.info Interrupt ', $irq->{irq}, ', for device(s): ', $irq->{label}, "\n"
if $irq->{label};
if ( $irq->{label} ) {
print "i", $irq->{irq}, '.info Interrupt ', $irq->{irq}, ', for device(s): ', $irq->{label}, "\n"
} elsif ( $irq->{irq} =~ /NMI/i ) {
print "i", $irq->{irq}, ".info Nonmaskable interrupt. Either 0 or quite high. If it's normaly 0 then just one NMI will often mark some hardware failure.\n";
} elsif ( $irq->{irq} =~ /LOC/i ) {
print "i", $irq->{irq}, ".info Local (pr. CPU core) APIC timer interrupt. Until 2.6.21 normaly 250 or 1000 pr second. On modern 'tickless' kernels it more or less reflects how busy the machine is.\n";
}

print "i", $irq->{irq}, ".type DERIVE\n";
print "i", $irq->{irq}, ".min 0\n";
print_thresholds("i$irq->{irq}");
Expand Down

0 comments on commit e400618

Please sign in to comment.