RE: [syslog-ng] time_sleep()
Here you go: 1 # syslog-ng configuration file.$ 2 #$ 3 # This should behave pretty much like the original syslog on RedHat Linux 9.$ 4 # But it could be configured a lot smarter.$ 5 #$ 6 # See syslog-ng(8) and syslog-ng.conf(5) for more information.$ 7 $ 8 options {$ 9 sync (0);$ 10 time_reopen (10);$ 11 log_fifo_size (1000);$ 12 long_hostnames (on);$ 13 use_dns (yes);$ 14 use_fqdn (no);$ 15 create_dirs (no);$ 16 owner(mdirect);$ 17 group(mdirect);$ 18 keep_hostname (yes);$ 19 log_msg_size(20480);$ 20 time_sleep(30);$ 21 };$ 22 $ 23 $ 24 #source s_sys {$ 25 # pipe ("/proc/kmsg" log_prefix("kernel: ")); unix-stream ("/dev/log"); internal();$ -----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Roberto Nibali Sent: April 26, 2006 10:41 AM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] time_sleep() Vaibhav Goel wrote:
Still can't figure this one out. So far, I have compiled and installed 1.6.9 and 1.6.10 and keep getting the same error.
Anyone?!?!?
One thing that sometimes bites people is a stupid control character inside a config file. Could you post the output of following command, please? cat -An mpt-status.c | head -25 Reducing the config file to a bare reproducable set of entries would help us as well. Regards, Roberto Nibali, ratz -- echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc _______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
Hello,
Here you go:
The grammar was missing an entry, the attached patch should fix it. Please try and report back if this solves the problem for you. Thanks and best regards, Roberto Nibali, ratz -- echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc --- 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; }
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 diff -ur syslog-ng-1.6.10/doc/sgml/syslog-ng.xml syslog-ng-1.6.10-ratz/doc/sgml/syslog-ng.xml --- syslog-ng-1.6.10/doc/sgml/syslog-ng.xml 2006-02-23 18:42:54.000000000 +0100 +++ syslog-ng-1.6.10-ratz/doc/sgml/syslog-ng.xml 2006-04-26 23:12:48.000000000 +0200 @@ -1400,6 +1400,12 @@ <entry>60</entry> </row> <row> + <entry>time_sleep()</entry> + <entry>number</entry> + <entry>The time to wait in milliseconds between each invocation of the poll iteration.</entry> + <entry>0</entry> + </row> + <row> <entry>sync()</entry> <entry>number</entry> <entry>The number of lines buffered before they are written to file.</entry> diff -ur syslog-ng-1.6.10/src/cfg-grammar.y syslog-ng-1.6.10-ratz/src/cfg-grammar.y --- 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; }
participants (2)
-
Roberto Nibali
-
Vaibhav Goel