summaryrefslogtreecommitdiffstats
path: root/src/sync-mode.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2008-12-21 19:47:02 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2008-12-21 19:47:02 +0100
commit036a0a65c6a3ba95cff48035a25e0bdba6aa0452 (patch)
tree008c4c4f641457dddb126484d84025b507cd7a63 /src/sync-mode.c
parent7b3f57d5007dd2cf4127c2c3a9a7cd0f64d5d6e9 (diff)
src: add cache statistics via `-s cache'
This patch adds cache statistics that you can check via `conntrackd -s cache'. This information is useful for trouble-shooting. This patch replaces several log messages that can be triggered in runtime. The idea behind this patch is to avoid log message flooding under errors. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/sync-mode.c')
-rw-r--r--src/sync-mode.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c
index e7b9359..6779487 100644
--- a/src/sync-mode.c
+++ b/src/sync-mode.c
@@ -418,6 +418,10 @@ static int local_handler_sync(int fd, int type, void *data)
mcast_dump_stats(fd, STATE_SYNC(mcast_client),
STATE_SYNC(mcast_server));
break;
+ case STATS_CACHE:
+ cache_stats_extended(STATE_SYNC(internal), fd);
+ cache_stats_extended(STATE_SYNC(external), fd);
+ break;
default:
if (STATE_SYNC(sync)->local)
ret = STATE_SYNC(sync)->local(fd, type, data);
@@ -519,9 +523,6 @@ retry:
cache_del(STATE_SYNC(internal), ct);
goto retry;
}
-
- dlog(LOG_ERR, "can't add to internal cache: "
- "%s\n", strerror(errno));
debug_ct(ct, "can't add");
}
}