diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-19 17:33:41 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-19 17:33:41 +0100 |
commit | 88fa72fef9279aa20f4e52080131f06af7e9cc53 (patch) | |
tree | 0f1e5175f68bf7735750ce426d088c3e5180a960 /runtime/queue.c | |
parent | 380a56bb975766048156604d7e31b98f579b21fd (diff) | |
download | rsyslog-88fa72fef9279aa20f4e52080131f06af7e9cc53.tar.gz rsyslog-88fa72fef9279aa20f4e52080131f06af7e9cc53.tar.bz2 rsyslog-88fa72fef9279aa20f4e52080131f06af7e9cc53.zip |
queue: warn if high watermark is set too low
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index e0d60249..56fd9905 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -2054,6 +2054,7 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */ uchar pszBuf[64]; uchar pszQIFNam[MAXFNAME]; int wrk; + int goodval; /* a "good value" to use for comparisons (different objects) */ uchar *qName; size_t lenBuf; @@ -2115,6 +2116,13 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */ /* we need to do a quick check if our water marks are set plausible. If not, * we correct the most important shortcomings. */ + goodval = (pThis->iMaxQueueSize / 100) * 60; + if(pThis->iHighWtrMrk < goodval) { + errmsg.LogError(0, RS_RET_CONF_PARSE_WARNING, "queue \"%s\": high water mark " + "is set quite low at %d. You should only set it below " + "60%% (%d) if you have a good reason for this.", + obj.GetName((obj_t*) pThis), pThis->iHighWtrMrk, goodval); + } if(pThis->iFullDlyMrk == -1 || pThis->iFullDlyMrk > pThis->iMaxQueueSize) pThis->iFullDlyMrk = pThis->iMaxQueueSize - (pThis->iMaxQueueSize / 100) * 3; /* default 97% */ |