[collectd] ntpd plugin complaining [FIXED finally]
Luboš Staněk
lubek at users.sourceforge.net
Sun Nov 5 16:14:59 CET 2006
Hi Florian,
there is no need to thank so much.
I hope that we both are not the only users of the ntpd plugin.
I was confused by the IPv6 like error and our discussion about IPv6 and
ntpd. The time was short in fact. When I finished studying the ntpd
code, how it would send a response in my case, the next look-in at the
debug log and the plugin code revealed the truth.
I like collectd and I want to use it. It is the valuable administration
tool. I want this tool to be as foolproof as it can be to put it on
anywhere. It is the system service and it must be as safe as possible.
BTW I do not like to see the ntpd plugin collecting stats for the ntpd's
local time broadcast. You mentioned at several places that your time
resources are short. Should I implement the ServerPeer and
IgnoreSelected for the ntpd plugin?
Best regads,
Lubos
Florian Forster napsal(a):
> Hi Lubos,
>
> thank you very much for being so persistent and resolving this issue :)
>
> On Fri, Nov 03, 2006 at 10:39:55PM +0100, Lubo?? Stan??k wrote:
>> This part of the code should run only once in the polling loop.
>>
>> if (items_num == 0) /* first packet */
>> {
>> DBG ("*res_size = %i", pkt_item_len);
>> *res_size = pkt_item_len;
>> }
>>
>> I have repaired it this way (the last line is appended):
>>
>> items = realloc ((void *) *res_data,
>> (items_num + pkt_item_num) * res_item_size);
>> +items_num = items_num + pkt_item_num;
>
> this is of course a nasty bug :/ I've fixed it in commit `98a4d6de'
> which you can pull from the repository. I'll pack a new version later
> today.
>
>> I would recommend enlarging the peername[512] to peername[NI_MAXHOST]
>> therefore.
>
> Agreed. I've fixed this as well.
>
> Thanks again for the effort you've put into this :)
> Regards,
> -octo
More information about the collectd
mailing list