]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
hno squid-2.2.STABLE4.helper_statistics-2.patch
authorhno <>
Wed, 3 May 2000 02:15:48 +0000 (02:15 +0000)
committerhno <>
Wed, 3 May 2000 02:15:48 +0000 (02:15 +0000)
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.

src/access_log.cc
src/helper.cc
src/protos.h

index fc2255d9f42b1f2f4f7ab76a2234fe04b7997430..3e1674c421080fca44b259f87db817a67fbdc5b8 100644 (file)
@@ -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;
index 36d09f7144d47aaa996a00fda186602d93afafd3..8ab6bc000a175d665ae0b2ccc5f4cec55724869b 100644 (file)
@@ -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");
index 43074d8c925d87c63cdf9972db74ee60a0576aba..c65b25907ba183d93de6f05c56b201e8a3d0af85 100644 (file)
@@ -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 *,