--------------------- PatchSet 516 Date: 2000/08/10 10:51:09 Author: rbcollins Branch: ntlm Tag: (none) Log: cache mgr stats for ntlmauthenticator are now active. Members: src/authenticate.c:1.1.1.3.12.10->1.1.1.3.12.11 src/helper.c:1.1.1.3.12.5->1.1.1.3.12.6 Index: squid/src/authenticate.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/authenticate.c,v retrieving revision 1.1.1.3.12.10 retrieving revision 1.1.1.3.12.11 diff -u -r1.1.1.3.12.10 -r1.1.1.3.12.11 --- squid/src/authenticate.c 10 Aug 2000 10:06:47 -0000 1.1.1.3.12.10 +++ squid/src/authenticate.c 10 Aug 2000 10:51:09 -0000 1.1.1.3.12.11 @@ -1,6 +1,6 @@ /* - * $Id: authenticate.c,v 1.1.1.3.12.10 2000/08/10 10:06:47 rbcollins Exp $ + * $Id: authenticate.c,v 1.1.1.3.12.11 2000/08/10 10:51:09 rbcollins Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Duane Wessels @@ -143,6 +143,15 @@ helperStats(sentry, authenticators); } +static void +ntlmauthenticateStats(StoreEntry * sentry) +{ + storeAppendPrintf(sentry, "NTLM Authenticator Statistics:\n"); + helperStatefulStats(sentry, ntlmauthenticators); +} + + + /**** PUBLIC FUNCTIONS ****/ #ifdef USE_BASIC_AUTH /* send the initial data to an authenticator module */ @@ -231,7 +240,7 @@ if (!ntlminit) { cachemgrRegister("ntlmauthenticator", "User NTLM Authenticator Stats", - authenticateStats, 0, 1); + ntlmauthenticateStats, 0, 1); ntlminit++; } } Index: squid/src/helper.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/helper.c,v retrieving revision 1.1.1.3.12.5 retrieving revision 1.1.1.3.12.6 diff -u -r1.1.1.3.12.5 -r1.1.1.3.12.6 --- squid/src/helper.c 6 Aug 2000 01:17:37 -0000 1.1.1.3.12.5 +++ squid/src/helper.c 10 Aug 2000 10:51:09 -0000 1.1.1.3.12.6 @@ -1,6 +1,6 @@ /* - * $Id: helper.c,v 1.1.1.3.12.5 2000/08/06 01:17:37 rbcollins Exp $ + * $Id: helper.c,v 1.1.1.3.12.6 2000/08/10 10:51:09 rbcollins Exp $ * * DEBUG: section 29 Helper process maintenance * AUTHOR: Harvest Derived? @@ -329,6 +329,53 @@ } void +helperStatefulStats(StoreEntry * sentry, statefulhelper * hlp) +{ + helper_stateful_server *srv; + dlink_node *link; + double tt; + storeAppendPrintf(sentry, "number running: %d of %d\n", + hlp->n_running, hlp->n_to_start); + storeAppendPrintf(sentry, "requests sent: %d\n", + hlp->stats.requests); + storeAppendPrintf(sentry, "replies received: %d\n", + hlp->stats.replies); + storeAppendPrintf(sentry, "queue length: %d\n", + hlp->stats.queue_size); + 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\t%7s\n", + "#", + "FD", + "# Requests", + "Flags", + "Time", + "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\t%s\n", + srv->index + 1, + srv->rfd, + srv->stats.uses, + srv->flags.alive ? 'A' : ' ', + srv->flags.busy ? 'B' : ' ', + srv->flags.closing ? 'C' : ' ', + srv->flags.shutdown ? 'S' : ' ', + tt < 0.0 ? 0.0 : tt, + (int) srv->offset, + srv->request ? log_quote(srv->request->buf) : "(none)"); + } + storeAppendPrintf(sentry, "\nFlags key:\n\n"); + storeAppendPrintf(sentry, " A = ALIVE\n"); + storeAppendPrintf(sentry, " B = BUSY\n"); + storeAppendPrintf(sentry, " C = CLOSING\n"); + storeAppendPrintf(sentry, " S = SHUTDOWN\n"); +} + +void helperShutdown(helper * hlp) { dlink_node *link = hlp->servers.head;