|
From: Yves <yme...@pe...> - 2005-01-14 15:04:04
|
> Works!
OK, thanks a lot to you for the feedback and help :)
Yves
>
> Tim.
>
>
> On Fri, 14 Jan 2005 15:48:54 +0100 (CET), Yves <yme...@pe...>=
wrote:
>> > I did a diff between version 104.1 (the last working version on my
>> > production environment) and 104.8, and found that in log_reader.c,
>> > function log_reader you changed (104.8 first)
>> > 502c501
>> > < while(0 < (r=3Dread(log_fd[i]->fd,tmp,10))) {
>> > ---
>> >> while(10 =3D=3D (r=3Dread(log_fd[i]->fd,tmp,10))) {
>> >
>> > tmp[r] =3D '\0';
>> > log_fd[i]->file_pos +=3Dr;
>> > log_fd[i]->buffer =3D g_string_append(log_fd[i=
]->buffer,tmp);
>> > if(strchr(tmp,'\n')) break;
>> > if((LOG_FD_CLIENT_SOCKET !=3D log_fd[i]->type)=
&& (r!=3D 10))
>> break;
>> > }
>> > if((r>0) && (r<10)) {
>> > tmp[r] =3D '\0';
>> > log_fd[i]->file_pos +=3Dr;
>> > log_fd[i]->buffer =3D g_string_append(log_fd[i=
]->buffer,tmp);
>> > }
>> >
>> > As a result, the last part of the line gets added twice to the buffe=
r,
>> > and this results in invalid lines. That last 'if' block should not b=
e
>> > there, I think.
>>
>> I agree with you.
>> Could you test without that 2nd "if" block ?
>> If it works, consider this as the fix.
>> I made that modif because of a bug with the perfparsed server.
>>
>> I will then release perfparse-0.104.8ym3 on my web site, but except Ti=
m who worked on
>> that version, it's better to upgrade from 0.104.X to 0.104.9 than from=
0.104.x to
>> 0.104.8ym3 and then from 0.103.8ym3 to 0.104.9.
>>
>> > So it's not a problem of wrong input from Nagios.
>>
>> I thought so, but with nagios 2.0 in beta, you cannot be sure that it =
is not a bug of
>> Nagios. For example, with Nagios-2.0a1, sending a kill signal to reboo=
t it would crash
>> it.
>>
>> Thanks for the feedback and the tips.
>> Yves
>>
>> --
>> - Homepage - http://ymettier.free.fr - http://www.logicacmg.com -
>> - GPG key - http://ymettier.free.fr/gpg.txt -
>> - Maitretarot - http://www.nongnu.org/maitretarot/ -
>> - Perfparse - http://perfparse.sf.net/ -
>>
>>
>> -------------------------------------------------------
>> The SF.Net email is sponsored by: Beat the post-holiday blues
>> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
>> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
>> _______________________________________________
>> Perfparse-users mailing list
>> Per...@li...
>> https://lists.sourceforge.net/lists/listinfo/perfparse-users
>>
>
>
--=20
- Homepage - http://ymettier.free.fr - http://www.logicacmg.com -
- GPG key - http://ymettier.free.fr/gpg.txt -
- Maitretarot - http://www.nongnu.org/maitretarot/ -
- Perfparse - http://perfparse.sf.net/ -
|