[collectd] jcollectd dispatches type_instance values with length more than 64 characters

Florian Forster octo at verplant.org
Mon Jul 6 14:43:39 CEST 2009


Hi Amit,

On Wed, Jul 01, 2009 at 03:43:07PM +0530, Amit Gupta wrote:
> Is there any particular reason to limit the length of type_instance to
> 64 characters?.

no, any “reasonable size” will do. Since the value_list_t data structure
is used in quite some places, increasing the limit will increase the
memory consumption, but I don't think that'd be a big issue for most
people.

I sincerely hope that changing the `DATA_MAX_NAME_LEN' define in
src/plugin.h is all there is to it, because I've always paid close
attention to use that define rather than hard-coding some numeric value.
I didn't try this yet, though.

I've run into that limit myself, too, with interface names under
Microsoft Windows. What would be a reasonable limit for your needs?

I think allocating memory on the heap for those names is not a good
idea, because those data structures really are used a lot and usually
don't live long.

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090706/492f646d/attachment.pgp 


More information about the collectd mailing list