[collectd] cpu plugin on macosx

Florian Forster octo at collectd.org
Sat May 30 19:21:54 CEST 2015

Hi Robert,

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

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.

Best regards,
collectd – The system statistics collection daemon
Website: http://collectd.org
Google+: http://collectd.org/+
GitHub:  https://github.com/collectd
Twitter: http://twitter.com/collectd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20150530/3d7bfc10/attachment.sig>

More information about the collectd mailing list