[PATCH] Re: [syslog-ng] time_sleep()

Vaibhav Goel vgoel at cucbc.com
Wed Apr 26 23:26:58 CEST 2006


That did the trick.  I was going through the code and I suspected that
was the problem in cfg-grammar.y but I am no code monkey so I let it be
;-)

Thanks again for your help.  Now I hope that this parameter will help
bring down the CPU load on one of my loghosts (it has a whole bunch of
parallel connections).

Thanks,

-----Original Message-----
From: syslog-ng-bounces at lists.balabit.hu
[mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Roberto Nibali
Sent: April 26, 2006 2:19 PM
To: Syslog-ng users' and developers' mailing list
Subject: Re: [PATCH] Re: [syslog-ng] time_sleep()

ADDENDUM:

> The grammar was missing an entry, the attached patch should fix it. 
> Please try and report back if this solves the problem for you.

And my patch was missing the documentation update, which I've obtained 
by fraud from the marvellous syslog-ng-2 tree.

>
------------------------------------------------------------------------
> 
> --- syslog-ng-1.6.10/src/cfg-grammar.y	2006-03-14
00:34:13.000000000 +0100
> +++ syslog-ng-1.6.10-ratz/src/cfg-grammar.y	2006-04-26
22:58:20.000000000 +0200
> @@ -631,6 +631,7 @@
>  	| KW_USE_DNS '(' yesno ')'		{ configuration->use_dns
= $3; }
>  	| KW_TIME_REOPEN '(' NUMBER ')'		{
configuration->time_reopen = $3; }
>  	| KW_TIME_REAP '(' NUMBER ')'		{
configuration->time_reap = $3; }
> +	| KW_TIME_SLEEP '(' NUMBER ')'		{
configuration->time_sleep = $3; }
>  	| KW_LOG_FIFO_SIZE '(' NUMBER ')'	{
configuration->log_fifo_size = $3; }
>  	| KW_GC_BUSY_THRESHOLD '(' NUMBER ')' 	{
configuration->gc_busy_threshold = $3; }
>  	| KW_GC_IDLE_THRESHOLD '(' NUMBER ')'	{
configuration->gc_idle_threshold = $3; }

And attached is the better version for Bazsi to apply if he's inclined 
to do so. This is about the third time I've chased down a parser-based 
bug, so I wonder if using (f)lex/yacc for this really pays off ;)?

Considering my state of mind, I reckon I could be really off the track 
with this patch as well ...

Cheers,
Roberto Nibali, ratz
-- 
echo 
'[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' |
dc




More information about the syslog-ng mailing list