- Update to 7.2.3 (v7-stable) a release providing important fixes
- Merged also fixes for unreliable kernel timestamp regression (bnc#783967), which will be picked up in a later v7-stable OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=115
This commit is contained in:
parent
ea7279ef7f
commit
86d58ec676
392
0001-imklog-kernel-timestamp-parsing.bnc783967.patch
Normal file
392
0001-imklog-kernel-timestamp-parsing.bnc783967.patch
Normal file
@ -0,0 +1,392 @@
|
|||||||
|
From 4983890fa26a6c6443a1fec591c47956be8a5567 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rainer Gerhards <rgerhards@adiscon.com>
|
||||||
|
Date: Wed, 17 Oct 2012 17:17:43 +0200
|
||||||
|
Subject: [PATCH 1/5] imklog: add paramter "keepkerneltimestamp"
|
||||||
|
|
||||||
|
Thanks to Marius Tomaschweski for the suggestion and a patch (for v5)
|
||||||
|
that this commit bases on.
|
||||||
|
---
|
||||||
|
doc/imklog.html | 6 +++---
|
||||||
|
plugins/imklog/bsd.c | 25 ++++++++++++-------------
|
||||||
|
plugins/imklog/imklog.c | 5 +++++
|
||||||
|
plugins/imklog/imklog.h | 1 +
|
||||||
|
4 Dateien geändert, 21 Zeilen hinzugefügt(+), 16 Zeilen entfernt(-)
|
||||||
|
|
||||||
|
diff --git a/doc/imklog.html b/doc/imklog.html
|
||||||
|
index 2e3b3bc..6ccdb5b 100644
|
||||||
|
--- a/doc/imklog.html
|
||||||
|
+++ b/doc/imklog.html
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head>
|
||||||
|
-<meta http-equiv="Content-Language" content="en"><title>Kernel Log Input Module (imklog)</title>
|
||||||
|
-
|
||||||
|
+<title>Kernel Log Input Module (imklog)</title>
|
||||||
|
</head>
|
||||||
|
+
|
||||||
|
<body>
|
||||||
|
<a href="rsyslog_conf_modules.html">back</a>
|
||||||
|
|
||||||
|
@@ -85,7 +85,7 @@ is needed to start pulling kernel messages.<br>
|
||||||
|
<p><font size="2">This documentation is part of the
|
||||||
|
<a href="http://www.rsyslog.com/">rsyslog</a>
|
||||||
|
project.<br>
|
||||||
|
-Copyright © 2008-2009 by <a href="http://www.gerhards.net/rainer">Rainer
|
||||||
|
+Copyright © 2008-2012 by <a href="http://www.gerhards.net/rainer">Rainer
|
||||||
|
Gerhards</a> and
|
||||||
|
<a href="http://www.adiscon.com/">Adiscon</a>.
|
||||||
|
Released under the GNU GPL version 3 or higher.</font></p>
|
||||||
|
diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c
|
||||||
|
index d4f9f77..ad194b5 100644
|
||||||
|
--- a/plugins/imklog/bsd.c
|
||||||
|
+++ b/plugins/imklog/bsd.c
|
||||||
|
@@ -58,9 +58,6 @@ static int fklog = -1; /* kernel log fd */
|
||||||
|
#ifdef OS_LINUX
|
||||||
|
/* submit a message to imklog Syslog() API. In this function, we check if
|
||||||
|
* a kernel timestamp is present and, if so, extract and strip it.
|
||||||
|
- * Note: this is an extra processing step. We should revisit the whole
|
||||||
|
- * idea in v6 and remove all that old stuff that we do not longer need
|
||||||
|
- * (like symbol resolution). <-- TODO
|
||||||
|
* Note that this is heavily Linux specific and thus is not compiled or
|
||||||
|
* used for BSD.
|
||||||
|
* Special thanks to Lennart Poettering for suggesting on how to convert
|
||||||
|
@@ -73,7 +70,7 @@ static int fklog = -1; /* kernel log fd */
|
||||||
|
* rgerhards, 2011-06-24
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
-submitSyslog(int pri, uchar *buf)
|
||||||
|
+submitSyslog(modConfData_t *pModConf, int pri, uchar *buf)
|
||||||
|
{
|
||||||
|
long secs;
|
||||||
|
long nsecs;
|
||||||
|
@@ -119,8 +116,10 @@ submitSyslog(int pri, uchar *buf)
|
||||||
|
|
||||||
|
/* we have a timestamp */
|
||||||
|
DBGPRINTF("kernel timestamp is %ld %ld\n", secs, nsecs);
|
||||||
|
- bufsize= strlen((char*)buf);
|
||||||
|
- memmove(buf+3, buf+i, bufsize - i + 1);
|
||||||
|
+ if(!pModConf->bKeepKernelStamp) {
|
||||||
|
+ bufsize= strlen((char*)buf);
|
||||||
|
+ memmove(buf+3, buf+i, bufsize - i + 1);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &monotonic);
|
||||||
|
clock_gettime(CLOCK_REALTIME, &realtime);
|
||||||
|
@@ -146,7 +145,7 @@ done:
|
||||||
|
}
|
||||||
|
#else /* now comes the BSD "code" (just a shim) */
|
||||||
|
static void
|
||||||
|
-submitSyslog(int pri, uchar *buf)
|
||||||
|
+submitSyslog(modConfData_t *pModConf, int pri, uchar *buf)
|
||||||
|
{
|
||||||
|
Syslog(pri, buf, NULL);
|
||||||
|
}
|
||||||
|
@@ -196,7 +195,7 @@ finalize_it:
|
||||||
|
/* Read kernel log while data are available, split into lines.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
-readklog(void)
|
||||||
|
+readklog(modConfData_t *pModConf)
|
||||||
|
{
|
||||||
|
char *p, *q;
|
||||||
|
int len, i;
|
||||||
|
@@ -238,18 +237,18 @@ readklog(void)
|
||||||
|
|
||||||
|
for (p = (char*)pRcv; (q = strchr(p, '\n')) != NULL; p = q + 1) {
|
||||||
|
*q = '\0';
|
||||||
|
- submitSyslog(LOG_INFO, (uchar*) p);
|
||||||
|
+ submitSyslog(pModConf, LOG_INFO, (uchar*) p);
|
||||||
|
}
|
||||||
|
len = strlen(p);
|
||||||
|
if (len >= iMaxLine - 1) {
|
||||||
|
- submitSyslog(LOG_INFO, (uchar*)p);
|
||||||
|
+ submitSyslog(pModConf, LOG_INFO, (uchar*)p);
|
||||||
|
len = 0;
|
||||||
|
}
|
||||||
|
if(len > 0)
|
||||||
|
memmove(pRcv, p, len + 1);
|
||||||
|
}
|
||||||
|
if (len > 0)
|
||||||
|
- submitSyslog(LOG_INFO, pRcv);
|
||||||
|
+ submitSyslog(pModConf, LOG_INFO, pRcv);
|
||||||
|
|
||||||
|
if(pRcv != NULL && (size_t) iMaxLine >= sizeof(bufRcv) - 1)
|
||||||
|
free(pRcv);
|
||||||
|
@@ -278,10 +277,10 @@ rsRetVal klogAfterRun(modConfData_t *pModConf)
|
||||||
|
* "message pull" mechanism.
|
||||||
|
* rgerhards, 2008-04-09
|
||||||
|
*/
|
||||||
|
-rsRetVal klogLogKMsg(modConfData_t __attribute__((unused)) *pModConf)
|
||||||
|
+rsRetVal klogLogKMsg(modConfData_t *pModConf)
|
||||||
|
{
|
||||||
|
DEFiRet;
|
||||||
|
- readklog();
|
||||||
|
+ readklog(pModConf);
|
||||||
|
RETiRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c
|
||||||
|
index 9332370..2897d76 100644
|
||||||
|
--- a/plugins/imklog/imklog.c
|
||||||
|
+++ b/plugins/imklog/imklog.c
|
||||||
|
@@ -91,6 +91,7 @@ static int bLegacyCnfModGlobalsPermitted;/* are legacy module-global config para
|
||||||
|
static struct cnfparamdescr modpdescr[] = {
|
||||||
|
{ "logpath", eCmdHdlrGetWord, 0 },
|
||||||
|
{ "permitnonkernelfacility", eCmdHdlrBinary, 0 },
|
||||||
|
+ { "keepkerneltimestamp", eCmdHdlrBinary, 0 },
|
||||||
|
{ "consoleloglevel", eCmdHdlrInt, 0 },
|
||||||
|
{ "internalmsgfacility", eCmdHdlrFacility, 0 }
|
||||||
|
};
|
||||||
|
@@ -289,6 +290,7 @@ CODESTARTbeginCnfLoad
|
||||||
|
pModConf->pszPath = NULL;
|
||||||
|
pModConf->bPermitNonKernel = 0;
|
||||||
|
pModConf->console_log_level = -1;
|
||||||
|
+ pModConf->bKeepKernelStamp = 0;
|
||||||
|
pModConf->iFacilIntMsg = klogFacilIntMsg();
|
||||||
|
loadModConf->configSetViaV2Method = 0;
|
||||||
|
bLegacyCnfModGlobalsPermitted = 1;
|
||||||
|
@@ -322,6 +324,8 @@ CODESTARTsetModCnf
|
||||||
|
loadModConf->bPermitNonKernel = (int) pvals[i].val.d.n;
|
||||||
|
} else if(!strcmp(modpblk.descr[i].name, "consoleloglevel")) {
|
||||||
|
loadModConf->console_log_level= (int) pvals[i].val.d.n;
|
||||||
|
+ } else if(!strcmp(modpblk.descr[i].name, "keepkerneltimestamp")) {
|
||||||
|
+ loadModConf->bKeepKernelStamp = (int) pvals[i].val.d.n;
|
||||||
|
} else if(!strcmp(modpblk.descr[i].name, "internalmsgfacility")) {
|
||||||
|
loadModConf->iFacilIntMsg = (int) pvals[i].val.d.n;
|
||||||
|
} else {
|
||||||
|
@@ -347,6 +351,7 @@ CODESTARTendCnfLoad
|
||||||
|
loadModConf->bPermitNonKernel = cs.bPermitNonKernel;
|
||||||
|
loadModConf->iFacilIntMsg = cs.iFacilIntMsg;
|
||||||
|
loadModConf->console_log_level = cs.console_log_level;
|
||||||
|
+ loadModConf->bKeepKernelStamp = 0;
|
||||||
|
if((cs.pszPath == NULL) || (cs.pszPath[0] == '\0')) {
|
||||||
|
loadModConf->pszPath = NULL;
|
||||||
|
if(cs.pszPath != NULL)
|
||||||
|
diff --git a/plugins/imklog/imklog.h b/plugins/imklog/imklog.h
|
||||||
|
index acfb50a..6cd97c3 100644
|
||||||
|
--- a/plugins/imklog/imklog.h
|
||||||
|
+++ b/plugins/imklog/imklog.h
|
||||||
|
@@ -36,6 +36,7 @@ struct modConfData_s {
|
||||||
|
uchar *pszPath;
|
||||||
|
int console_log_level;
|
||||||
|
sbool bPermitNonKernel;
|
||||||
|
+ sbool bKeepKernelStamp; /* keep kernel timestamp instead of interpreting it */
|
||||||
|
sbool configSetViaV2Method;
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
||||||
|
|
||||||
|
From 24e74d95c03bdf44f40ad41a4f6d4fabef0bca2c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marius Tomaschewski <mt@suse.de>
|
||||||
|
Date: Wed, 21 Nov 2012 13:47:19 +0100
|
||||||
|
Subject: [PATCH 2/5] imklog: added paramter "parseKernelTimestamp"
|
||||||
|
|
||||||
|
When enabled, kernel message [timestamp] is converted for message time.
|
||||||
|
Default is to use receive time as in 5.8.x and before, because the clock
|
||||||
|
used to create the timestamp is not supposed to be as accurate as the
|
||||||
|
monotonic clock (depends on hardware and kernel) resulting in differences
|
||||||
|
between kernel and system messages which occurred at same time.
|
||||||
|
---
|
||||||
|
plugins/imklog/bsd.c | 3 +++
|
||||||
|
plugins/imklog/imklog.c | 5 +++++
|
||||||
|
plugins/imklog/imklog.h | 3 ++-
|
||||||
|
3 Dateien geändert, 10 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c
|
||||||
|
index ad194b5..0930d61 100644
|
||||||
|
--- a/plugins/imklog/bsd.c
|
||||||
|
+++ b/plugins/imklog/bsd.c
|
||||||
|
@@ -82,6 +82,9 @@ submitSyslog(modConfData_t *pModConf, int pri, uchar *buf)
|
||||||
|
struct timeval tv;
|
||||||
|
struct timeval *tp = NULL;
|
||||||
|
|
||||||
|
+ if(!pModConf->bParseKernelStamp)
|
||||||
|
+ goto done;
|
||||||
|
+
|
||||||
|
if(buf[3] != '[')
|
||||||
|
goto done;
|
||||||
|
DBGPRINTF("imklog: kernel timestamp detected, extracting it\n");
|
||||||
|
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c
|
||||||
|
index 2897d76..8471daa 100644
|
||||||
|
--- a/plugins/imklog/imklog.c
|
||||||
|
+++ b/plugins/imklog/imklog.c
|
||||||
|
@@ -91,6 +91,7 @@ static int bLegacyCnfModGlobalsPermitted;/* are legacy module-global config para
|
||||||
|
static struct cnfparamdescr modpdescr[] = {
|
||||||
|
{ "logpath", eCmdHdlrGetWord, 0 },
|
||||||
|
{ "permitnonkernelfacility", eCmdHdlrBinary, 0 },
|
||||||
|
+ { "parsekerneltimestamp", eCmdHdlrBinary, 0 },
|
||||||
|
{ "keepkerneltimestamp", eCmdHdlrBinary, 0 },
|
||||||
|
{ "consoleloglevel", eCmdHdlrInt, 0 },
|
||||||
|
{ "internalmsgfacility", eCmdHdlrFacility, 0 }
|
||||||
|
@@ -290,6 +291,7 @@ CODESTARTbeginCnfLoad
|
||||||
|
pModConf->pszPath = NULL;
|
||||||
|
pModConf->bPermitNonKernel = 0;
|
||||||
|
pModConf->console_log_level = -1;
|
||||||
|
+ pModConf->bParseKernelStamp = 0;
|
||||||
|
pModConf->bKeepKernelStamp = 0;
|
||||||
|
pModConf->iFacilIntMsg = klogFacilIntMsg();
|
||||||
|
loadModConf->configSetViaV2Method = 0;
|
||||||
|
@@ -324,6 +326,8 @@ CODESTARTsetModCnf
|
||||||
|
loadModConf->bPermitNonKernel = (int) pvals[i].val.d.n;
|
||||||
|
} else if(!strcmp(modpblk.descr[i].name, "consoleloglevel")) {
|
||||||
|
loadModConf->console_log_level= (int) pvals[i].val.d.n;
|
||||||
|
+ } else if(!strcmp(modpblk.descr[i].name, "parsekerneltimestamp")) {
|
||||||
|
+ loadModConf->bParseKernelStamp = (int) pvals[i].val.d.n;
|
||||||
|
} else if(!strcmp(modpblk.descr[i].name, "keepkerneltimestamp")) {
|
||||||
|
loadModConf->bKeepKernelStamp = (int) pvals[i].val.d.n;
|
||||||
|
} else if(!strcmp(modpblk.descr[i].name, "internalmsgfacility")) {
|
||||||
|
@@ -351,6 +355,7 @@ CODESTARTendCnfLoad
|
||||||
|
loadModConf->bPermitNonKernel = cs.bPermitNonKernel;
|
||||||
|
loadModConf->iFacilIntMsg = cs.iFacilIntMsg;
|
||||||
|
loadModConf->console_log_level = cs.console_log_level;
|
||||||
|
+ loadModConf->bParseKernelStamp = 0;
|
||||||
|
loadModConf->bKeepKernelStamp = 0;
|
||||||
|
if((cs.pszPath == NULL) || (cs.pszPath[0] == '\0')) {
|
||||||
|
loadModConf->pszPath = NULL;
|
||||||
|
diff --git a/plugins/imklog/imklog.h b/plugins/imklog/imklog.h
|
||||||
|
index 6cd97c3..6022f5e 100644
|
||||||
|
--- a/plugins/imklog/imklog.h
|
||||||
|
+++ b/plugins/imklog/imklog.h
|
||||||
|
@@ -36,7 +36,8 @@ struct modConfData_s {
|
||||||
|
uchar *pszPath;
|
||||||
|
int console_log_level;
|
||||||
|
sbool bPermitNonKernel;
|
||||||
|
- sbool bKeepKernelStamp; /* keep kernel timestamp instead of interpreting it */
|
||||||
|
+ sbool bParseKernelStamp; /* if try to parse kernel timestamps for message time */
|
||||||
|
+ sbool bKeepKernelStamp; /* keep the kernel timestamp in the message */
|
||||||
|
sbool configSetViaV2Method;
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
||||||
|
|
||||||
|
From 64bab984a1f7deece7c7b32b056c68b56b71ee77 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marius Tomaschewski <mt@suse.de>
|
||||||
|
Date: Wed, 21 Nov 2012 15:41:12 +0100
|
||||||
|
Subject: [PATCH 3/5] imklog: allow $klogParse- and KeepKernelTimestamp
|
||||||
|
|
||||||
|
---
|
||||||
|
plugins/imklog/imklog.c | 14 ++++++++++++--
|
||||||
|
1 Datei geändert, 12 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c
|
||||||
|
index 8471daa..0aec108 100644
|
||||||
|
--- a/plugins/imklog/imklog.c
|
||||||
|
+++ b/plugins/imklog/imklog.c
|
||||||
|
@@ -80,6 +80,8 @@ typedef struct configSettings_s {
|
||||||
|
int iFacilIntMsg; /* the facility to use for internal messages (set by driver) */
|
||||||
|
uchar *pszPath;
|
||||||
|
int console_log_level; /* still used for BSD */
|
||||||
|
+ int bParseKernelStamp;
|
||||||
|
+ int bKeepKernelStamp;
|
||||||
|
} configSettings_t;
|
||||||
|
static configSettings_t cs;
|
||||||
|
|
||||||
|
@@ -112,6 +114,8 @@ static inline void
|
||||||
|
initConfigSettings(void)
|
||||||
|
{
|
||||||
|
cs.bPermitNonKernel = 0;
|
||||||
|
+ cs.bParseKernelStamp = 0;
|
||||||
|
+ cs.bKeepKernelStamp = 0;
|
||||||
|
cs.console_log_level = -1;
|
||||||
|
cs.pszPath = NULL;
|
||||||
|
cs.iFacilIntMsg = klogFacilIntMsg();
|
||||||
|
@@ -355,8 +359,8 @@ CODESTARTendCnfLoad
|
||||||
|
loadModConf->bPermitNonKernel = cs.bPermitNonKernel;
|
||||||
|
loadModConf->iFacilIntMsg = cs.iFacilIntMsg;
|
||||||
|
loadModConf->console_log_level = cs.console_log_level;
|
||||||
|
- loadModConf->bParseKernelStamp = 0;
|
||||||
|
- loadModConf->bKeepKernelStamp = 0;
|
||||||
|
+ loadModConf->bParseKernelStamp = cs.bParseKernelStamp;;
|
||||||
|
+ loadModConf->bKeepKernelStamp = cs.bKeepKernelStamp;
|
||||||
|
if((cs.pszPath == NULL) || (cs.pszPath[0] == '\0')) {
|
||||||
|
loadModConf->pszPath = NULL;
|
||||||
|
if(cs.pszPath != NULL)
|
||||||
|
@@ -431,6 +435,8 @@ ENDqueryEtryPt
|
||||||
|
static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal)
|
||||||
|
{
|
||||||
|
cs.bPermitNonKernel = 0;
|
||||||
|
+ cs.bParseKernelStamp = 0;
|
||||||
|
+ cs.bKeepKernelStamp = 0;
|
||||||
|
if(cs.pszPath != NULL) {
|
||||||
|
free(cs.pszPath);
|
||||||
|
cs.pszPath = NULL;
|
||||||
|
@@ -468,6 +474,10 @@ CODEmodInit_QueryRegCFSLineHdlr
|
||||||
|
NULL, NULL, STD_LOADABLE_MODULE_ID));
|
||||||
|
CHKiRet(regCfSysLineHdlr2((uchar *)"klogpermitnonkernelfacility", 0, eCmdHdlrBinary,
|
||||||
|
NULL, &cs.bPermitNonKernel, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted));
|
||||||
|
+ CHKiRet(regCfSysLineHdlr2((uchar *)"klogparsekerneltimestamp", 0, eCmdHdlrBinary,
|
||||||
|
+ NULL, &cs.bParseKernelStamp, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted));
|
||||||
|
+ CHKiRet(regCfSysLineHdlr2((uchar *)"klogkeepkerneltimestamp", 0, eCmdHdlrBinary,
|
||||||
|
+ NULL, &cs.bKeepKernelStamp, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted));
|
||||||
|
CHKiRet(regCfSysLineHdlr2((uchar *)"klogconsoleloglevel", 0, eCmdHdlrInt,
|
||||||
|
NULL, &cs.console_log_level, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted));
|
||||||
|
CHKiRet(regCfSysLineHdlr2((uchar *)"kloginternalmsgfacility", 0, eCmdHdlrFacility,
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
||||||
|
|
||||||
|
From 3ce3f458f4ac088d3e650ad939500e72b35d1758 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marius Tomaschewski <mt@suse.de>
|
||||||
|
Date: Wed, 21 Nov 2012 13:47:44 +0100
|
||||||
|
Subject: [PATCH 4/5] imklog: convert to kmsg timestamp's us to ns first
|
||||||
|
|
||||||
|
---
|
||||||
|
plugins/imklog/bsd.c | 1 +
|
||||||
|
1 Datei geändert, 1 Zeile hinzugefügt(+)
|
||||||
|
|
||||||
|
diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c
|
||||||
|
index 0930d61..2dc7527 100644
|
||||||
|
--- a/plugins/imklog/bsd.c
|
||||||
|
+++ b/plugins/imklog/bsd.c
|
||||||
|
@@ -111,6 +111,7 @@ submitSyslog(modConfData_t *pModConf, int pri, uchar *buf)
|
||||||
|
nsecs = nsecs * 10 + buf[i] - '0';
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
+ nsecs *= 1000; /* convert to ns first */
|
||||||
|
if(buf[i] != ']') {
|
||||||
|
DBGPRINTF("no trailing ']' --> no kernel timestamp\n");
|
||||||
|
goto done; /* no TS! */
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
||||||
|
|
||||||
|
From f8565e506fe01839035d40e12c2d13c1d15da45f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marius Tomaschewski <mt@suse.de>
|
||||||
|
Date: Thu, 22 Nov 2012 15:05:52 +0100
|
||||||
|
Subject: [PATCH 5/5] imklog: added $klogParse/KeepKernelTimestamp docs
|
||||||
|
|
||||||
|
---
|
||||||
|
doc/imklog.html | 13 +++++++++++++
|
||||||
|
1 Datei geändert, 13 Zeilen hinzugefügt(+)
|
||||||
|
|
||||||
|
diff --git a/doc/imklog.html b/doc/imklog.html
|
||||||
|
index 6ccdb5b..294e2b7 100644
|
||||||
|
--- a/doc/imklog.html
|
||||||
|
+++ b/doc/imklog.html
|
||||||
|
@@ -65,6 +65,19 @@ Linux only, ignored on other platforms (but may be specified)</li>
|
||||||
|
former klogd -2 option<br>
|
||||||
|
Linux only, ignored on other platforms (but may be specified)<br style="font-weight: bold;">
|
||||||
|
</li>
|
||||||
|
+<li><b>$klogParseKernelTimestamp</b> [on/<b>off</b>]<br>
|
||||||
|
+If enabled and the kernel creates a timestamp for its log messages, this timestamp will be
|
||||||
|
+parsed and converted into regular message time instead to use the receive time of the kernel
|
||||||
|
+message (as in 5.8.x and before). Default is to not parse the kernel timestamp, because the
|
||||||
|
+clock used by the kernel to create the timestamps is not supposed to be as accurate as the
|
||||||
|
+monotonic clock required to convert it. Depending on the hardware and kernel, it can result
|
||||||
|
+in message time differences between kernel and system messages which occurred at same time.
|
||||||
|
+</li>
|
||||||
|
+<li><b>$klogKeepKernelTimestamp</b> [on/<b>off</b>]<br>
|
||||||
|
+If enabled, this option causes to keep the [timestamp] provided by the kernel at the begin
|
||||||
|
+of in each message rather than to remove it, when it could be parsed and converted into
|
||||||
|
+local time for use as regular message time. Only used, when $klogParseKernelTimestamp is on.
|
||||||
|
+</li>
|
||||||
|
</ul>
|
||||||
|
<b>Caveats/Known Bugs:</b>
|
||||||
|
<p>This is obviously platform specific and requires platform
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 5dc3ad821532ad5132c151c4737a27a6e6c7aea1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marius Tomaschewski <mt@suse.de>
|
|
||||||
Date: Tue, 13 Nov 2012 11:26:39 +0100
|
|
||||||
Subject: [PATCH] imuxsock: do not log EAGAIN in nonblocking recvfrom
|
|
||||||
|
|
||||||
---
|
|
||||||
plugins/imuxsock/imuxsock.c | 2 +-
|
|
||||||
1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
|
|
||||||
|
|
||||||
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
|
|
||||||
index d5e4bb3..e0ba7dd 100644
|
|
||||||
--- a/plugins/imuxsock/imuxsock.c
|
|
||||||
+++ b/plugins/imuxsock/imuxsock.c
|
|
||||||
@@ -1059,7 +1059,7 @@ static rsRetVal readSocket(lstn_t *pLstn)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CHKiRet(SubmitMsg(pRcv, iRcvd, pLstn, cred, ts));
|
|
||||||
- } else if(iRcvd < 0 && errno != EINTR) {
|
|
||||||
+ } else if(iRcvd < 0 && errno != EINTR && errno != EAGAIN) {
|
|
||||||
char errStr[1024];
|
|
||||||
rs_strerror_r(errno, errStr, sizeof(errStr));
|
|
||||||
DBGPRINTF("UNIX socket error: %d = %s.\n", errno, errStr);
|
|
||||||
--
|
|
||||||
1.7.10.4
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ba0aee5cd2c60192ca1f026817767aa66056c7f0fa78eb5b15b9394734e68e3f
|
|
||||||
size 2696341
|
|
3
rsyslog-7.2.3.tar.gz
Normal file
3
rsyslog-7.2.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f9190acdf902a22338b4b0bc43e37cd863881068486f071cba907446c3e35b97
|
||||||
|
size 2701840
|
@ -1,3 +1,78 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 22 14:12:36 UTC 2012 - mt@suse.com
|
||||||
|
|
||||||
|
- Update to 7.2.3 (v7-stable) a release providing following fixes:
|
||||||
|
- regression fix: rsyslogd terminated when wild-card $IncludeConfig did not
|
||||||
|
find actual include files. For example, if this directive is present:
|
||||||
|
$IncludeConfig /etc/rsyslog.d/*.conf
|
||||||
|
and there are no *.conf files in /etc/rsyslog.d (but rsyslog.d exists),
|
||||||
|
rsyslogd will emit an error message and terminate. Previous (and expected)
|
||||||
|
behaviour is that an empty file set is no problem. HOWEVER, if the
|
||||||
|
directory itself does not exist, this is flagged as an error and will
|
||||||
|
load to termination (no startup).
|
||||||
|
Unfortunately, this is often the case by default in many distros, so this
|
||||||
|
actually prevents rsyslog startup.
|
||||||
|
- doc improvements
|
||||||
|
- enabled to build without libuuid, at loss of uuid functionality
|
||||||
|
this enables smoother builds on older systems that do not support
|
||||||
|
libuuid. Loss of functionality should usually not matter too much as
|
||||||
|
uuid support has only recently been added and is very seldom used.
|
||||||
|
- bugfix: omfwd did not properly support "template" parameter
|
||||||
|
- bugfix: potential segfault when re_match() function was used
|
||||||
|
Thanks to oxpa for the patch.
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=371
|
||||||
|
- bugfix: potential abort of imtcp on rsyslogd shutdown
|
||||||
|
- bugfix: imzmq3 segfault with PULL subscription
|
||||||
|
Thanks to Martin Nilsson for the patch.
|
||||||
|
- bugfix: improper handling of backslash in string-type template()s
|
||||||
|
- bugfix: leading quote (") in string-type template() lead to thight loop
|
||||||
|
on startup
|
||||||
|
- bugfix: no error msg on invalid field option in legacy/string template
|
||||||
|
- bugfix: potential segfault due to invalid param handling in comparisons
|
||||||
|
This could happen in RainerScript comparisons (like contains); in some
|
||||||
|
cases an unitialized variable was accessed, which could lead to an
|
||||||
|
invalid free and in turn to a segfault.
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=372
|
||||||
|
Thanks to Georgi Georgiev for reporting this bug and his great help
|
||||||
|
in solving it.
|
||||||
|
- bugfix: no error msg on unreadable $IncludeConfig path
|
||||||
|
- bugfix: $IncludeConfig did not correctly process directories
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=376
|
||||||
|
The testbench was also enhanced to check for these cases.
|
||||||
|
Thanks to Georgi Georgiev for the bug report.
|
||||||
|
- bugfix: make rsyslog compile on kfreebsd again
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=380
|
||||||
|
Thanks to Guillem Jover for the patch.
|
||||||
|
- bugfix: garbled message if field name was used with jsonf property option
|
||||||
|
The length for the field name was invalidly computed, resulting in either
|
||||||
|
truncated field names or including extra random data. If the random data
|
||||||
|
contained NULs, the rest of the message became unreadable.
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=374
|
||||||
|
- bugfix: potential segfault at startup with property-based filter
|
||||||
|
If the property name was followed by a space before the comma, rsyslogd
|
||||||
|
aborted on startup. Note that no segfault could happen if the initial
|
||||||
|
startup went well (this was a problem with the config parser).
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=381
|
||||||
|
- bugfix: imfile discarded some file parts
|
||||||
|
File lines that were incomplete (LF missing) *at the time imfile polled
|
||||||
|
the file* were partially discarded. That part of the line that was read
|
||||||
|
without the LF was discarded, and the rest of the line was submitted in
|
||||||
|
the next polling cycle. This is now changed so that the partial content
|
||||||
|
is saved until the complete line is read. Note that the patch affects
|
||||||
|
only read mode 0.
|
||||||
|
Thanks to Milan Bartos for providing the base idea for the solution.
|
||||||
|
- Merged also fixes for unreliable kernel timestamp regression (bnc#783967),
|
||||||
|
which will be picked up in a later v7-stable release:
|
||||||
|
- imklog: added $klogParseKernelTimestamp option (default off),
|
||||||
|
wich reverts to the 5.8.x behavior to use receive time for the
|
||||||
|
kernel messages instead to try parse and convert the kernel
|
||||||
|
timestamp, what is not reliable on some hardware (intel i7/Xeon).
|
||||||
|
- imklog: added $klogKeepKernelTimestamp option (default off),
|
||||||
|
causing to not remove the kernel timestamp from the message
|
||||||
|
after a successful conversion.
|
||||||
|
- imklog: fixed a conversion bug causing a <1sec incorrectness
|
||||||
|
of the message time when the kernel timestamp is parsed.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 20 11:44:16 UTC 2012 - mt@suse.com
|
Tue Nov 20 11:44:16 UTC 2012 - mt@suse.com
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ Name: rsyslog
|
|||||||
Summary: The enhanced syslogd for Linux and Unix
|
Summary: The enhanced syslogd for Linux and Unix
|
||||||
License: (GPL-3.0+ and Apache-2.0)
|
License: (GPL-3.0+ and Apache-2.0)
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
Version: 7.2.1
|
Version: 7.2.3
|
||||||
Release: 0
|
Release: 0
|
||||||
%if 0%{?suse_version} >= 1210
|
%if 0%{?suse_version} >= 1210
|
||||||
%bcond_without systemd
|
%bcond_without systemd
|
||||||
@ -132,7 +132,7 @@ Source2: rsyslog.conf.in
|
|||||||
Source4: rsyslog.d.remote.conf.in
|
Source4: rsyslog.d.remote.conf.in
|
||||||
Source5: rsyslog-service-prepare.in
|
Source5: rsyslog-service-prepare.in
|
||||||
Source6: rsyslog.service.in.in
|
Source6: rsyslog.service.in.in
|
||||||
Patch1: 0001-imuxsock-do-not-log-EAGAIN-in-nonblocking-recvfrom.patch
|
Patch1: 0001-imklog-kernel-timestamp-parsing.bnc783967.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Rsyslog is an enhanced multi-threaded syslogd supporting, among others,
|
Rsyslog is an enhanced multi-threaded syslogd supporting, among others,
|
||||||
|
Loading…
Reference in New Issue
Block a user