[syslog-ng] Tuning help?

Cole Tuininga cole.tuininga at gmail.com
Wed Nov 21 19:51:15 CET 2007


I have a FreeBSD 5.4 system running syslog-ng 2.0.5 - there's no load on it.

If I run the following perl code:

** Begin Code **
use Sys::Syslog qw(:DEFAULT setlogsock);

# start some logging
setlogsock 'unix';
openlog('task', 'pid', 'daemon');
syslog 'info', 'starting';

$txt = 'blah';

for (1..8) {
        syslog 'debug',  $_. ' len('. length($txt) . ') '. $txt;
        $txt = "$txt $txt";
}
for (1..100) {
        syslog 'debug',  $_. ' len('. length($txt) . ') '. $txt;
        $txt = "$txt bleargh";
}
** End Code **

I seem to be dropping a random message or two during the second loop.
I've tried tuning the syslog-ng conf file several different ways
without luck.

The relevant pieces of the current iteration of the conf file are:

options {
    long_hostnames(off);
    flush_lines(1);
    time_reopen(10);
    time_reap(600);
    log_fifo_size(4096);
};

source src {
    unix-dgram("/var/run/log" log_msg_size(65536) log_fetch_limit(5));
    unix-dgram("/var/run/logpriv" perm(0600) log_msg_size(65536)
log_fetch_limit(5));
    udp(log_msg_size(65536) log_fetch_limit(5));
    internal();
    file("/dev/klog" log_msg_size(65536) log_fetch_limit(5));
};

destination task_log {
    file(
        "/var/log/task.log"
        perm(0664)
    );
};

filter f_task{ program("task"); };

log {source(src); filter(f_task); destination(task_log); flags(flow-control);};


Anybody have any ideas why I'm dropping random lines?  Thanks in advance...

-- 
Cole Tuininga
http://www.tuininga.org/


More information about the syslog-ng mailing list