For When You Can't Have The Real Thing
[ start | index | login ]
start > munin > CPU graph not scaling

CPU graph not scaling

Created by dave. Last edited by dave, 11 years and 347 days ago. Viewed 3,832 times. #1
[edit] [rdf]
labels
attachments
(9 May 2012)

Problem

I have more than 10 total cores (ie multiple sockets, cores, and/or hyperthreading) but my CPU graph only goes to 1000 (ie 10 cores).

Solution

Older (ie today I have 1.2.5-2.el5.rf from RPMforge) versions of munin-node had a cpu-calculation module that calculated CPUs like this:

NCPU=`expr \`grep '^cpu. ' /proc/stat | wc -l\` - 1`

The problem is that if you had more than 10 CPUs, you ended up with entries like cpu10 and cpu25 in /proc/stat which don't get matched by that regexp.

So the solution is to upgrade to a more modern version of munin.

If that isn't possible/practical, you can always modify the cpu plugin to calculate the value differently. After some playing around, I modified my plugin to calculate the CPU number as so:

NCPU=`expr \`grep '^processor' /proc/cpuinfo | wc -l\``
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt