summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-07-05 17:15:07 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-07-05 17:15:07 +0200
commit3dd44b02d6251c519b04c3147425622603dd4754 (patch)
treedc4c43c2585e2f5bab431049320c3b8c6fe7534a
parent09d3320ac258a3d78e02b29fc3806043af4fbf65 (diff)
downloadrsyslog-3dd44b02d6251c519b04c3147425622603dd4754.tar.gz
rsyslog-3dd44b02d6251c519b04c3147425622603dd4754.tar.xz
rsyslog-3dd44b02d6251c519b04c3147425622603dd4754.zip
debug log: emit (some) action queue parameters to debug log
-rw-r--r--action.c4
-rw-r--r--runtime/queue.c26
-rw-r--r--runtime/queue.h1
3 files changed, 28 insertions, 3 deletions
diff --git a/action.c b/action.c
index f33fece9..5db6d735 100644
--- a/action.c
+++ b/action.c
@@ -478,9 +478,7 @@ actionConstructFinalize(action_t *pThis, struct cnfparamvals *queueParams)
# undef setQPROP
# undef setQPROPstr
- dbgoprint((obj_t*) pThis->pQueue, "save on shutdown %d, max disk space allowed %lld\n",
- cs.bActionQSaveOnShutdown, cs.iActionQueMaxDiskSpace);
-
+ qqueueDbgPrint(pThis->pQueue);
DBGPRINTF("Action %p: queue %p created\n", pThis, pThis->pQueue);
diff --git a/runtime/queue.c b/runtime/queue.c
index a2f80d29..6b85f013 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -225,6 +225,32 @@ finalize_it:
/* methods */
+void
+qqueueDbgPrint(qqueue_t *pThis)
+{
+ dbgoprint((obj_t*) pThis, "size %d messages.\n", pThis->iMaxQueueSize);
+ dbgoprint((obj_t*) pThis, "worker threads: %d, wThread shutdown: %d, Perists every %d updates.\n",
+ pThis->iNumWorkerThreads, pThis->toWrkShutdown, pThis->iPersistUpdCnt);
+ dbgoprint((obj_t*) pThis, "queue timeouts: shutdown: %d, action completion shutdown: %d, enq: %d\n",
+ pThis->toQShutdown, pThis->toActShutdown, pThis->toEnq);
+ dbgoprint((obj_t*) pThis, "queue watermarks: high: %d, low: %d, discard: %d, discard-severity: %d\n",
+ pThis->iHighWtrMrk, pThis->iLowWtrMrk,
+ pThis->iDiscardMrk, pThis->iDiscardSeverity);
+ dbgoprint((obj_t*) pThis, "queue save on shutdown %d, max disk space allowed %lld\n",
+ pThis->bSaveOnShutdown, pThis->sizeOnDiskMax);
+ dbgoprint((obj_t*) pThis, "dequeueBatchSize: %d\n", pThis->iDeqBatchSize);
+ /* TODO: add
+ iActionRetryCount = 0;
+ iActionRetryInterval = 30000;
+ static int iMainMsgQtoWrkMinMsgs = 100;
+ static int iMainMsgQbSaveOnShutdown = 1;
+ iMainMsgQueMaxDiskSpace = 0;
+ setQPROP(qqueueSetiMinMsgsPerWrkr, "$MainMsgQueueWorkerThreadMinimumMessages", 100);
+ setQPROP(qqueueSetbSaveOnShutdown, "$MainMsgQueueSaveOnShutdown", 1);
+ */
+}
+
+
/* get the physical queue size. Must only be called
* while mutex is locked!
* rgerhards, 2008-01-29
diff --git a/runtime/queue.h b/runtime/queue.h
index 3841615a..edb770c6 100644
--- a/runtime/queue.h
+++ b/runtime/queue.h
@@ -195,6 +195,7 @@ rsRetVal qqueueEnqObjDirectBatch(qqueue_t *pThis, batch_t *pBatch);
rsRetVal qqueueDoCnfParams(struct nvlst *lst, struct cnfparamvals **ppvals);
rsRetVal qqueueApplyCnfParam(qqueue_t *pThis, struct cnfparamvals *pvals);
void qqueueSetDefaultsActionQueue(qqueue_t *pThis);
+void qqueueDbgPrint(qqueue_t *pThis);
PROTOTYPEObjClassInit(qqueue);
PROTOTYPEpropSetMeth(qqueue, iPersistUpdCnt, int);