Ticket #736 (closed defect: duplicate)

Opened 3 months ago

Last modified 3 months ago

cpu plugin has too strict limits

Reported by: feiner.tom Assigned to: 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

16-11-2009 20:13:09 changed by feiner.tom

  • status changed from new to closed.
  • version changed from 1.2.5 to 1.2.6.
  • resolution set to duplicate.

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)