<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
It's a <span id="result_box" class="short_text"><span
style="background-color: rgb(255, 255, 255);" title="ismert hiba">known
bug on FreeBSD and fixed in v3.0.5.<br>
Upgrade your syslog-ng, or use the follow_freq(0) option in kernel
source, please.<br>
</span></span><br>
This patch fixed it:<br>
<br>
commit ea34eee9a1172c213aeccbf68ed4fa2881c97b29<br>
Author: Balazs Scheidler <a class="moz-txt-link-rfc2396E" href="mailto:bazsi@balabit.hu"><bazsi@balabit.hu></a><br>
Date: Mon Nov 2 10:59:30 2009 +0100<br>
<br>
affile: set follow_freq to 0 on FreeBSD kernel messages<br>
<br>
FreeBSD uses /dev/klog character device for kernel messages. But<br>
since the file source driver set follow_freq to 0 only on Linux,<br>
this meant that FreeBSD config files needed an explicit<br>
<br>
follow_freq(0) in their /dev/klog source definition.<br>
<br>
This patch makes this the default on /dev/klog if the __FreeBSD__
macro is<br>
defined.<br>
<br>
diff --git a/src/affile.c b/src/affile.c<br>
index 3b92a85..15dbee0 100644<br>
--- a/src/affile.c<br>
+++ b/src/affile.c<br>
@@ -395,13 +395,17 @@ affile_sd_new(gchar *filename, guint32 flags)<br>
{<br>
if ((self->flags & AFFILE_PIPE) == 0)<br>
self->reader_options.follow_freq = 1000;<br>
- <br>
+<br>
+ if (0 ||<br>
#if __linux__<br>
- if (strcmp(filename, "/proc/kmsg") == 0)<br>
+ (strcmp(filename, "/proc/kmsg") == 0) ||<br>
+#elif __FreeBSD__<br>
+ (strcmp(filename, "/dev/klog") == 0) ||<br>
+#endif<br>
+ 0)<br>
{<br>
self->reader_options.follow_freq = 0;<br>
}<br>
-#endif<br>
}<br>
#if __linux__<br>
if (strcmp(filename, "/proc/kmsg") == 0)<br>
<br>
Phusion wrote:
<blockquote
cite="mid:c3ed3fdc1002210941y3c233fb9xeed59e0e77d7caca@mail.gmail.com"
type="cite">
<pre wrap="">I've used syslog-ng 1.x and 2.x, but am new to using 3.x. I'm using
syslog-ng 3.0.3 on a FreeBSD 8.0 server. I'm having trouble getting
kernel messages. I've made a very small config file, and this isn't
working either.
@version:3.0
source local { internal(); file("/dev/klog"); unix-dgram("/var/run/log"); };
destination all { file("/var/log/all.log"); };
log { source(local); destination(all); };
This picks up other things, but not the kernel messages. I assume it's
a small configuration issue. Let me know. Thanks.
Phusion
______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
pzolee
</pre>
</body>
</html>