From: hno <> Date: Wed, 3 May 2000 02:15:48 +0000 (+0000) Subject: hno squid-2.2.STABLE4.helper_statistics-2.patch X-Git-Tag: SQUID_3_0_PRE1~2015 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=592da4ecd77b5bbd8a323353c4268d12e4ec59ad;p=thirdparty%2Fsquid.git hno squid-2.2.STABLE4.helper_statistics-2.patch Squid-2.2.STABLE4: Include request in helper statistics Include the request sent in helper statistics to allow the administrator to find out why the helper processes are busy. --- diff --git a/src/access_log.cc b/src/access_log.cc index fc2255d9f4..3e1674c421 100644 --- a/src/access_log.cc +++ b/src/access_log.cc @@ -1,7 +1,7 @@ /* - * $Id: access_log.cc,v 1.56 2000/03/25 04:58:39 wessels Exp $ + * $Id: access_log.cc,v 1.57 2000/05/02 20:15:48 hno Exp $ * * DEBUG: section 46 Access Log * AUTHOR: Duane Wessels @@ -37,7 +37,6 @@ #include "squid.h" -static char *log_quote(const char *header); static void accessLogSquid(AccessLogEntry * al); static void accessLogCommon(AccessLogEntry * al); static Logfile *logfile = NULL; @@ -118,7 +117,7 @@ static const char c2x[] = /* log_quote -- URL-style encoding on MIME headers. */ -static char * +char * log_quote(const char *header) { int c; diff --git a/src/helper.cc b/src/helper.cc index 36d09f7144..8ab6bc000a 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -126,17 +126,18 @@ helperStats(StoreEntry * sentry, helper * hlp) storeAppendPrintf(sentry, "avg service time: %d msec\n", hlp->stats.avg_svc_time); storeAppendPrintf(sentry, "\n"); - storeAppendPrintf(sentry, "%7s\t%7s\t%11s\t%s\t%7s\t%7s\n", + storeAppendPrintf(sentry, "%7s\t%7s\t%11s\t%s\t%7s\t%7s\t%7s\n", "#", "FD", "# Requests", "Flags", "Time", - "Offset"); + "Offset", + "Request"); for (link = hlp->servers.head; link; link = link->next) { srv = link->data; tt = 0.001 * tvSubMsec(srv->dispatch_time, current_time); - storeAppendPrintf(sentry, "%7d\t%7d\t%11d\t%c%c%c%c\t%7.3f\t%7d\n", + storeAppendPrintf(sentry, "%7d\t%7d\t%11d\t%c%c%c%c\t%7.3f\t%7d\t%s\n", srv->index + 1, srv->rfd, srv->stats.uses, @@ -145,7 +146,8 @@ helperStats(StoreEntry * sentry, helper * hlp) srv->flags.closing ? 'C' : ' ', srv->flags.shutdown ? 'S' : ' ', tt < 0.0 ? 0.0 : tt, - (int) srv->offset); + (int) srv->offset, + srv->request ? log_quote(srv->request->buf) : "(none)"); } storeAppendPrintf(sentry, "\nFlags key:\n\n"); storeAppendPrintf(sentry, " A = ALIVE\n"); diff --git a/src/protos.h b/src/protos.h index 43074d8c92..c65b25907b 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.359 2000/05/02 18:32:41 hno Exp $ + * $Id: protos.h,v 1.360 2000/05/02 20:15:49 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -44,6 +44,7 @@ extern void fvdbCountForw(const char *key); #if HEADERS_LOG extern void headersLog(int cs, int pq, method_t m, void *data); #endif +char *log_quote(const char *header); extern aclCheck_t *aclChecklistCreate(const struct _acl_access *, request_t *,