This file is indexed.

/usr/share/munin/plugins/interrupts is in munin-node 1.4.6-3ubuntu3.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/sh
# -*- sh -*-

: << =cut

=head1 NAME

interrupts - Plugin to monitor the number of interrupts and context
switches on a system.

=head1 CONFIGURATION

No configuration

=head1 AUTHOR

Idea and base from Ragnar Wisløff.

=head1 LICENSE

Unknown license

=head1 MAGIC MARKERS

 #%# family=auto
 #%# capabilities=autoconf

=cut

. $MUNIN_LIBDIR/plugins/plugin.sh

if [ "$1" = "autoconf" ]; then
	if [ -r /proc/stat ]; then
		echo yes
		exit 0
	else
		echo no
		exit 0
	fi
fi

# If run with the "config"-parameter, give out information on how the
# graphs should look. 
 
if [ "$1" = "config" ]; then
	# The title of the graph
	echo 'graph_title Interrupts and context switches'
	# Arguments to "rrdtool graph". In this case, tell it that the
	# lower limit of the graph is '0', and that 1k=1000 (not 1024)
	echo 'graph_args --base 1000 -l 0'
	# The Y-axis label
	echo 'graph_vlabel interrupts & ctx switches / ${graph_period}'
	# Graph category
	echo 'graph_category system'
	# Graph information
	echo 'graph_info This graph shows the number of interrupts and context switches on the system. These are typically high on a busy system.'
	echo 'intr.info Interrupts are events that alter sequence of instructions executed by a processor. They can come from either hardware (exceptions, NMI, IRQ) or software.'
	echo 'ctx.info A context switch occurs when a multitasking operatings system suspends the currently running process, and starts executing another.'
	# The fields. "label" is used in the legend. "label" is the only
	# required subfield. 
	echo 'intr.label interrupts'
	echo 'ctx.label context switches'
	# Specify type
	echo 'intr.type DERIVE'
	echo 'ctx.type DERIVE'
	# Set max (should always be done with counters) Note: this is max
	# per second.
	echo 'intr.max 100000'
	echo 'ctx.max 100000'
	echo 'intr.min 0'
	echo 'ctx.min 0'

	print_warning intr
	print_critical intr
	print_warning ctx
	print_critical ctx

	# Last, if run with the "config"-parameter, quit here (don't
	# display any data)
	exit 0
fi

# The real work

awk '$1 == "intr" { print "intr.value " $2 }
     $1 == "ctxt" { print "ctx.value " $2 }' /proc/stat