diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-06-20 21:24:04 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-06-20 21:24:04 +0200 |
commit | 90bb19b9eb7d97887883ce480bb4eb12c60d3505 (patch) | |
tree | 67196bbb835713950ac81c679a39d437a253ddfe /src/queue.c | |
parent | e30be653e677f618e1d6a43edd45392a29c3e92e (diff) | |
download | conntrack-tools-90bb19b9eb7d97887883ce480bb4eb12c60d3505.tar.gz conntrack-tools-90bb19b9eb7d97887883ce480bb4eb12c60d3505.zip |
conntrackd: add statistics for enospc errors in queues
This patch adds a new statistic field to count the number of
enospc errors while adding new nodes to some queue.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/queue.c')
-rw-r--r-- | src/queue.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/queue.c b/src/queue.c index 465f47c..76425b1 100644 --- a/src/queue.c +++ b/src/queue.c @@ -77,10 +77,12 @@ void queue_stats_show(int fd) size += snprintf(buf+size, sizeof(buf), "queue %s:\n" "current elements:\t\t%12u\n" - "maximum elements:\t\t%12u\n\n", + "maximum elements:\t\t%12u\n" + "not enough space errors:\t%12u\n\n", this->name, this->num_elems, - this->max_elems); + this->max_elems, + this->enospc_err); } send(fd, buf, size, 0); } @@ -123,6 +125,7 @@ int queue_add(struct queue *b, struct queue_node *n) return 0; if (b->num_elems >= b->max_elems) { + b->enospc_err++; errno = ENOSPC; return -1; } |