summaryrefslogtreecommitdiffstats
path: root/queue.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-30 19:07:23 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-30 19:07:23 +0000
commit0e3b40fd8a6106fbfa83e7cab1a5af515f698111 (patch)
treeede9dc66448f03d4ed84da7243229ff3f8eaceec /queue.h
parent05538a2bad4f9a2c1be7a50099e30ab22249a2ff (diff)
downloadrsyslog-0e3b40fd8a6106fbfa83e7cab1a5af515f698111.tar.gz
rsyslog-0e3b40fd8a6106fbfa83e7cab1a5af515f698111.tar.xz
rsyslog-0e3b40fd8a6106fbfa83e7cab1a5af515f698111.zip
- implemented limiting disk space allocated to queues
- addded $MainMsgQueueMaxDiskSpace config directive - addded $ActionQueueMaxDiskSpace config directive
Diffstat (limited to 'queue.h')
-rw-r--r--queue.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/queue.h b/queue.h
index 090ff4c5..e75c26a1 100644
--- a/queue.h
+++ b/queue.h
@@ -114,6 +114,7 @@ typedef struct queue_s {
size_t lenFilePrefix;
int iNumberFiles; /* how many files make up the queue? */
size_t iMaxFileSize; /* max size for a single queue file */
+ size_t sizeOnDiskMax; /* maximum size on disk allowed */
int bIsDA; /* is this queue disk assisted? */
int bRunsDA; /* is this queue actually *running* disk assisted? */
struct queue_s *pqDA; /* queue for disk-assisted modes */
@@ -136,6 +137,8 @@ typedef struct queue_s {
qLinkedList_t *pLast;
} linklist;
struct {
+ size_t sizeOnDisk; /* current amount of disk space used */
+ size_t bytesRead; /* number of bytes read from current (undeleted!) file */
strm_t *pWrite; /* current file to be written */
strm_t *pRead; /* current file to be read */
} disk;
@@ -178,6 +181,7 @@ PROTOTYPEpropSetMeth(queue, iMinMsgsPerWrkr, int);
PROTOTYPEpropSetMeth(queue, bSaveOnShutdown, int);
PROTOTYPEpropSetMeth(queue, pUsr, void*);
PROTOTYPEpropSetMeth(queue, iDeqSlowdown, int);
+PROTOTYPEpropSetMeth(queue, sizeOnDiskMax, long);
#define queueGetID(pThis) ((unsigned long) pThis)
#endif /* #ifndef QUEUE_H_INCLUDED */