syslog-ng 100% cpu

Jozef Drahovsky freebsdcz2 at jozef.drahovsky.sk
Fri Dec 20 01:12:11 CET 2013


Vie nieto poradit ako na to?
Internet je plny takychto otazok na 3.3 a vyssie verzie syslog-ng ale 
bez relevantnej odpovede.
Pokusom som zistil, ze bez ohladu na verziu FreeBSD,
problem vznika len pri citani sprav zo zdroja file("/dev/klog");

ls -la /dev/klog
crw-------  1 root  wheel    0,   9 Dec 19 18:58 /dev/klog

syslog-ng 1+2+3+4 -> 100% CPU for syslog-ng with config line source 
src_dev { file("/dev/klog"); };
PID USERNAME  THR PRI NICE   SIZE    RES STATE   C   TIME WCPU COMMAND
9752 root       1 102    0 62876K  6452K CPU1    1   0:44 100.00% syslog-ng

syslog-ng 1+2+3 -> 0% CPU for syslog-ng
PID USERNAME  THR PRI NICE   SIZE    RES STATE   C TIME   WCPU COMMAND
9796 root       1  21    0 62876K  6452K kqread  1   0:00 0.00% syslog-ng


Jozef


real test config:
#
@version: 3.3
@include "scl.conf"

# 1 - ok
source src_rem { tcp(); udp(); };
destination d_rem { file( "/var/log-ng/host/$HOST/$YEAR-$MONTH-$DAY.txt" 
create_dirs(yes) ); };
log { source(src_rem);  destination(d_rem);};
# 2 - ok
source src_int { internal();  };
destination d_int { file( "/var/log-ng/internal/$YEAR-$MONTH-$DAY.txt" 
create_dirs(yes) ); };
log { source(src_int);  destination(d_int);};
# 3 - ok
source src_run { unix-dgram("/var/run/log"); };
destination d_run { file( "/var/log-ng/run/$YEAR-$MONTH-$DAY.txt" 
create_dirs(yes) ); };
log { source(src_run);  destination(d_run);};
#
# 4 - problem   CPU problem 100% why?
source src_dev { file("/dev/klog"); };
destination d_dev { file( "/var/log-ng/dev/$YEAR-$MONTH-$DAY.txt" 
create_dirs(yes) ); };
log { source(src_dev);  destination(d_dev);};
#
#eof




More information about the Users-l mailing list