Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#736 closed defect (duplicate)

cpu plugin has too strict limits

Reported by: feiner.tom Owned by: holger
Priority: normal Milestone:
Component: deb package Version: 1.2.6
Severity: normal Keywords:
Cc:

Description

Forwarded form: http://bugs.debian.org/554003

Package: munin-node
Version: 1.2.5-1
Severity: normal
Tags: patch

Hi,

the cpu munin plugin configures its DERIVE fields with min and max.
Minimum is set to 0, and maximum is set to 100*numcpus. It gets its
values from /proc/stat.

The problem is that if your system is mostly in one state (e.g. idle)
then the derived values over time sometimes are slightly larger than the
configured max. For instance it might be 100.12 instead of 100 for one
second of idling.

Munin-update/rrd then throws away these data points.

A nice example of what happens can be found at
http://asteria.noreply.org/~weasel/cpu-week.png

An easy fix is to slightly raise the configured max:

--- /usr/share/munin/plugins/cpu 2009-03-13 14:10:06.000000000 +0100
+++ /usr/local/bin/munin-cpu 2009-11-02 11:48:21.000000000 +0100
@@ -47,6 +47,7 @@

SYSWARNING=expr $PERCENT '*' 30 / 100
SYSCRITICAL=expr $PERCENT '*' 50 / 100
USRWARNING=expr $PERCENT '*' 80 / 100

+ MAX=$(($MAX * 120 / 100))

echo 'graph_title CPU usage'
echo "graph_order system user nice idle" $extinfo
echo "graph_args --base 1000 -r --lower-limit 0 --upper-limit $graphlimit"

If you agree with the fix then seeing this in a stable point release
would be nice. It makes the cpu graphs pretty pointless at the moment.

Cheers,
weasel

Change History (1)

comment:1 Changed 5 years ago by feiner.tom

  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from 1.2.5 to 1.2.6

Closing as it's already been fixed both in trunk in r2352, and backported to munin 1.2.6 for debian since version 1.2.6-14 (http://munin.projects.linpro.no/browser/branches/debian/squeeze/tags/1.2.6-14/debian/patches/610-plugin-cpu-fix-max.patch)

Note: See TracTickets for help on using tickets.