mirror of
https://github.com/munin-monitoring/muninlite.git
synced 2024-11-03 13:31:02 +01:00
7c8bd1e394
git-svn-id: svn://svn.code.sf.net/p/muninlite/code/muninlite@1 35caa317-6b62-4e8a-81c0-b04f0c356266
23 lines
1.0 KiB
Plaintext
23 lines
1.0 KiB
Plaintext
config_interrupts() {
|
|
echo "graph_title Interrupts & context switches"
|
|
echo "graph_args --base 1000 -l 0"
|
|
echo "graph_vlabel interrupts & ctx switches / \${graph_period}"
|
|
echo "graph_category system"
|
|
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."
|
|
echo "intr.label interrupts"
|
|
echo "ctx.label context switches"
|
|
echo "intr.type DERIVE"
|
|
echo "ctx.type DERIVE"
|
|
echo "intr.max 100000"
|
|
echo "ctx.max 100000"
|
|
echo "intr.min 0"
|
|
echo "ctx.min 0"
|
|
}
|
|
fetch_interrupts() {
|
|
IINFO=$(cat /proc/stat)
|
|
echo "ctx.value" $(echo "$IINFO" | grep "^ctxt" | cut -d\ -f2)
|
|
echo "intr.value" $(echo "$IINFO" | grep "^intr" | cut -d\ -f2)
|
|
}
|