From: Willy Tarreau Date: Wed, 10 Oct 2012 08:26:22 +0000 (+0200) Subject: MINOR: halog: sort output by cookie code X-Git-Tag: v1.5-dev13~177 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a09b663a829f7012c50743adaf3d29cc81700c5;p=thirdparty%2Fhaproxy.git MINOR: halog: sort output by cookie code It's sometimes useful to have the output sorted by cookie code to see the ratios of NI vs VN for example. This is now possible with -cc. --- diff --git a/contrib/halog/halog.c b/contrib/halog/halog.c index 08444fe221..885b10d800 100644 --- a/contrib/halog/halog.c +++ b/contrib/halog/halog.c @@ -1,7 +1,7 @@ /* * haproxy log statistics reporter * - * Copyright 2000-2010 Willy Tarreau + * Copyright 2000-2012 Willy Tarreau * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -113,6 +113,8 @@ struct url_stat { FILT_COUNT_URL_TTOT|FILT_COUNT_URL_TAVG|FILT_COUNT_URL_TTOTO|FILT_COUNT_URL_TAVGO| \ FILT_COUNT_URL_BAVG|FILT_COUNT_URL_BTOT) +#define FILT_COUNT_COOK_CODES 0x40000000 + unsigned int filter = 0; unsigned int filter_invert = 0; const char *line; @@ -124,6 +126,7 @@ const char *fgets2(FILE *stream); void filter_count_url(const char *accept_field, const char *time_field, struct timer **tptr); void filter_count_srv_status(const char *accept_field, const char *time_field, struct timer **tptr); +void filter_count_cook_codes(const char *accept_field, const char *time_field, struct timer **tptr); void filter_count_term_codes(const char *accept_field, const char *time_field, struct timer **tptr); void filter_count_status(const char *accept_field, const char *time_field, struct timer **tptr); void filter_graphs(const char *accept_field, const char *time_field, struct timer **tptr); @@ -136,7 +139,7 @@ void usage(FILE *output, const char *msg) "%s" "Usage: halog [-h|--help] for long help\n" " halog [-q] [-c]\n" - " {-gt|-pct|-st|-tc|-srv|-u|-uc|-ue|-ua|-ut|-uao|-uto|-uba|-ubt}\n" + " {-cc|-gt|-pct|-st|-tc|-srv|-u|-uc|-ue|-ua|-ut|-uao|-uto|-uba|-ubt}\n" " [-s ] [-e|-E] [-H] [-rt|-RT