[collectd] cpu plugin on macosx
octo at collectd.org
Sat May 30 19:21:54 CEST 2015
thank you very much for your fix, I've committed it to the
"collectd-5.5" branch (commit e0683047a42e217c352c2419532b8e029f9f3f0a).
On Fri, May 29, 2015 at 05:47:21PM -0400, Robert Viduya wrote:
> The code in cpu.c is incorrectly expecting the processor_info system
> call to return the wrong number of states (COLLECTD_CPU_STATE_MAX vs
> CPU_STATE_MAX). It’s also expecting the indexes into the array to
> match it’s internal indexes (COLLECTD_CPU_STATE_USER vs
> CPU_STATE_USER, COLLECTD_CPU_STATE_NICE vs CPU_STATE_NICE, etc.).
I believe that this problem got introduced when trying to avoid name
clashes with Mac OS X defines.
> I’ve made the following changes to make it work on osx, but I’m not
> sure if this breaks it on any other platform:
That should be fine, it's only touching Mac OS X specific code.
collectd – The system statistics collection daemon
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: Digital signature
More information about the collectd