diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-12-21 19:47:03 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-12-21 19:47:03 +0100 |
commit | 3641d2351ab42bef56e341ccca007331410822f2 (patch) | |
tree | 23ed80337fed1e57af1199da4a11238a32ffeab4 /src/main.c | |
parent | 036a0a65c6a3ba95cff48035a25e0bdba6aa0452 (diff) | |
download | conntrack-tools-3641d2351ab42bef56e341ccca007331410822f2.tar.gz conntrack-tools-3641d2351ab42bef56e341ccca007331410822f2.zip |
src: add run-time statistics via `-s runtime'
This patch adds run-time statistics that you can check via
`conntrackd -s runtime'. 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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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|cache], dump statistics\n" + " -s [|network|cache|runtime], 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)" @@ -165,6 +165,10 @@ int main(int argc, char *argv[]) strlen(argv[i+1])) == 0) { action = STATS_CACHE; i++; + } else if (strncmp(argv[i+1], "runtime", + strlen(argv[i+1])) == 0) { + action = STATS_RUNTIME; + i++; } else { fprintf(stderr, "ERROR: unknown " "parameter `%s' for " |