summaryrefslogtreecommitdiffstats
path: root/plugins/imdiag
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-28 09:59:45 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-28 09:59:45 +0200
commit9517e19b6427c295e206ece9562ce70f4a6d7044 (patch)
tree783fa1af0c03e05f10cb3b54149b6fcba508263d /plugins/imdiag
parentd4564f8399f4362c7e79066370049f909cef996c (diff)
downloadrsyslog-9517e19b6427c295e206ece9562ce70f4a6d7044.tar.gz
rsyslog-9517e19b6427c295e206ece9562ce70f4a6d7044.tar.xz
rsyslog-9517e19b6427c295e206ece9562ce70f4a6d7044.zip
preserving current changes
... in preparation for some larger changes - I need to apply some serious design changes, as the current system does not play well at all with ultra-reliable queues. Will do that in a totally new version.
Diffstat (limited to 'plugins/imdiag')
-rw-r--r--plugins/imdiag/imdiag.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/imdiag/imdiag.c b/plugins/imdiag/imdiag.c
index 03396db7..cb1c1686 100644
--- a/plugins/imdiag/imdiag.c
+++ b/plugins/imdiag/imdiag.c
@@ -256,10 +256,13 @@ static rsRetVal
waitMainQEmpty(tcps_sess_t *pSess)
{
int iMsgQueueSize;
+ int iPrint = 0;
DEFiRet;
CHKiRet(diagGetMainMsgQSize(&iMsgQueueSize));
while(iMsgQueueSize > 0) {
+ if(iPrint++ % 500 == 0)
+ dbgprintf("imdiag sleeping, wait mainq drain, curr size %d\n", iMsgQueueSize);
srSleep(0,2); /* wait a little bit */
CHKiRet(diagGetMainMsgQSize(&iMsgQueueSize));
}
@@ -294,6 +297,7 @@ OnMsgReceived(tcps_sess_t *pSess, uchar *pRcv, int iLenMsg)
getFirstWord(&pszMsg, cmdBuf, sizeof(cmdBuf)/sizeof(uchar), TO_LOWERCASE);
+ dbgprintf("imdiag received command '%s'\n", cmdBuf);
if(!ustrcmp(cmdBuf, UCHAR_CONSTANT("getmainmsgqueuesize"))) {
CHKiRet(diagGetMainMsgQSize(&iMsgQueueSize));
CHKiRet(sendResponse(pSess, "%d\n", iMsgQueueSize));