diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-06-20 21:17:43 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-06-20 21:17:43 +0200 |
commit | b524c764aba149018fa83dec742c21dc8116838e (patch) | |
tree | be9d180f154ecd55c0c48baaab82c5e119482c6d /include | |
parent | 4cfc8533743a766db0b2c8ae27b7bba312eb3ec0 (diff) | |
download | conntrack-tools-b524c764aba149018fa83dec742c21dc8116838e.tar.gz conntrack-tools-b524c764aba149018fa83dec742c21dc8116838e.zip |
conntrackd: add `-s queue' to display queue statistics
This patch re-introduces `-s queue' but now it displays generic
queue statistics.
# conntrackd -s queue
active queue objects: 0
queue txqueue:
current elements: 0
maximum elements: 2147483647
not enough space errors: 0
queue rsqueue:
current elements: 72
maximum elements: 128
not enough space errors: 0
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/conntrackd.h | 1 | ||||
-rw-r--r-- | include/queue.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/conntrackd.h b/include/conntrackd.h index 40566bd..040c252 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -35,6 +35,7 @@ #define FLUSH_INT_CACHE 33 /* flush internal cache */ #define FLUSH_EXT_CACHE 34 /* flush external cache */ #define STATS_PROCESS 35 /* child process stats */ +#define STATS_QUEUE 36 /* queue stats */ #define DEFAULT_CONFIGFILE "/etc/conntrackd/conntrackd.conf" #define DEFAULT_LOCKFILE "/var/lock/conntrackd.lock" diff --git a/include/queue.h b/include/queue.h index 89b00a8..d989402 100644 --- a/include/queue.h +++ b/include/queue.h @@ -32,6 +32,7 @@ struct evfd; #define QUEUE_NAMELEN 16 struct queue { + struct list_head list; unsigned int max_elems; unsigned int num_elems; uint32_t flags; @@ -45,6 +46,7 @@ struct queue { struct queue *queue_create(const char *name, int max_objects, unsigned int flags); void queue_destroy(struct queue *b); +void queue_stats_show(int fd); unsigned int queue_len(const struct queue *b); int queue_add(struct queue *b, struct queue_node *n); int queue_del(struct queue_node *n); |