diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-12-19 17:30:43 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-12-19 17:30:43 +0100 |
commit | 00d2ac3d712fb037411e9856e8174e9d55b5bdbc (patch) | |
tree | 9d439fc87eeef077bda652e9ce332182c139fc60 /runtime/queue.c | |
parent | b80b0672beb9b8b4d07791791bb9f2fb7c73889a (diff) | |
parent | 55db71963e312634f78c25b61dd4800036fe25f9 (diff) | |
download | rsyslog-00d2ac3d712fb037411e9856e8174e9d55b5bdbc.tar.gz rsyslog-00d2ac3d712fb037411e9856e8174e9d55b5bdbc.tar.bz2 rsyslog-00d2ac3d712fb037411e9856e8174e9d55b5bdbc.zip |
Merge branch 'v5-devel'
Conflicts:
ChangeLog
action.c
plugins/imudp/imudp.c
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index 3876ec39..a1ac3eff 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -1386,6 +1386,7 @@ static int qqueueChkDiscardMsg(qqueue_t *pThis, int iQueueSize, void *pUsr) if(iRetLocal == RS_RET_OK && iSeverity >= pThis->iDiscardSeverity) { DBGOPRINT((obj_t*) pThis, "queue nearly full (%d entries), discarded severity %d message\n", iQueueSize, iSeverity); + STATSCOUNTER_INC(pThis->ctrNFDscrd, pThis->mutCtrNFDscrd); objDestruct(pUsr); ABORT_FINALIZE(RS_RET_QUEUE_FULL); } else { @@ -2066,6 +2067,13 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */ CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("full"), ctrType_IntCtr, &pThis->ctrFull)); + STATSCOUNTER_INIT(pThis->ctrFDscrd, pThis->mutCtrFDscrd); + CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("discarded.full"), + ctrType_IntCtr, &pThis->ctrFDscrd)); + STATSCOUNTER_INIT(pThis->ctrNFDscrd, pThis->mutCtrNFDscrd); + CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("discarded.nf"), + ctrType_IntCtr, &pThis->ctrNFDscrd)); + pThis->ctrMaxqsize = 0; CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("maxqsize"), ctrType_Int, &pThis->ctrMaxqsize)); @@ -2419,6 +2427,7 @@ doEnqSingleObj(qqueue_t *pThis, flowControl_t flowCtlType, void *pUsr) // TODO : handle enqOnly => discard! if(pthread_cond_timedwait(&pThis->notFull, pThis->mut, &t) != 0) { DBGOPRINT((obj_t*) pThis, "enqueueMsg: cond timeout, dropping message!\n"); + STATSCOUNTER_INC(pThis->ctrFDscrd, pThis->mutCtrFDscrd); objDestruct(pUsr); ABORT_FINALIZE(RS_RET_QUEUE_FULL); } |