Hi,

I was a bit surprised when Ganglia reported that a couple of my clusters
have a grand total of zero CPUs.

Seems monitor-core/gmond/machines/linux.c uses a buggy method
to determine the number of processors in a x86 machine; it counts
the number of lines starting with "cpu" in /proc/stat and subtracts
one. Works fine for 2.4 kernels, breaks for 2.2 kernels on single-CPU
machines. In the latter case, /proc/stat only contains a single
"cpu" line.

A tentative fix would be to instead count the number of lines
starting with "processor" in /proc/cpuinfo.

Comments, anyone?

-- 
Leif Nixon                                    Systems expert
------------------------------------------------------------
National Supercomputer Centre           Linkoping University
------------------------------------------------------------

Reply via email to