From 0f423a70730bc42de75222b3c00404532f084010 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 3 May 2010 10:50:54 +0200 Subject: [PATCH] [MINOR] halog: add support for statisticts on status codes Using "-st", halog outputs number of requests by status codes. --- contrib/halog/halog.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/contrib/halog/halog.c b/contrib/halog/halog.c index 96d32bc501..8f240307c2 100644 --- a/contrib/halog/halog.c +++ b/contrib/halog/halog.c @@ -63,6 +63,8 @@ struct timer { #define FILT_INVERT_ERRORS 0x200 #define FILT_INVERT_TIME_RESP 0x400 +#define FILT_COUNT_STATUS 0x800 + unsigned int filter = 0; unsigned int filter_invert = 0; const char *line; @@ -73,7 +75,7 @@ void die(const char *msg) { fprintf(stderr, "%s" - "Usage: halog [-c] [-v] [-gt] [-pct] [-s ] [-e|-E] [-rt|-RT