summaryrefslogtreecommitdiffstats
path: root/src/main.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/main.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/main.c')
-rw-r--r--src/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 022915d..f621a2e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -43,7 +43,7 @@ static const char usage_client_commands[] =
" -i, display content of the internal cache\n"
" -e, display the content of the external cache\n"
" -k, kill conntrack daemon\n"
- " -s [|network], dump statistics\n"
+ " -s [|network|cache], dump statistics\n"
" -R, resync with kernel conntrack table\n"
" -n, request resync with other node (only FT-FW and NOTRACK modes)\n"
" -x, dump cache in XML format (requires -i or -e)"
@@ -161,6 +161,10 @@ int main(int argc, char *argv[])
strlen(argv[i+1])) == 0) {
action = STATS_NETWORK;
i++;
+ } else if (strncmp(argv[i+1], "cache",
+ strlen(argv[i+1])) == 0) {
+ action = STATS_CACHE;
+ i++;
} else {
fprintf(stderr, "ERROR: unknown "
"parameter `%s' for "