From b524c764aba149018fa83dec742c21dc8116838e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 20 Jun 2009 21:17:43 +0200 Subject: 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 --- src/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index ca491f2..4ead2ea 100644 --- a/src/main.c +++ b/src/main.c @@ -44,7 +44,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|runtime|link|rsqueue], dump statistics\n" + " -s [|network|cache|runtime|link|rsqueue|queue], 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)\n" @@ -218,6 +218,10 @@ int main(int argc, char *argv[]) strlen(argv[i+1])) == 0) { action = STATS_PROCESS; i++; + } else if (strncmp(argv[i+1], "queue", + strlen(argv[i+1])) == 0) { + action = STATS_QUEUE; + i++; } else { fprintf(stderr, "ERROR: unknown " "parameter `%s' for " -- cgit v1.2.3