Revision: 14935
Author:   adrian.chadd
Date:     Fri Jul 22 20:21:27 2011
Log:      Add a simple function that dumps the pconn database, rather than
just the statistics.


http://code.google.com/p/lusca-cache/source/detail?r=14935

Modified:
 /playpen/LUSCA_HEAD_ipv6/src/pconn.c

=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/pconn.c        Sun Jul 10 20:48:06 2011
+++ /playpen/LUSCA_HEAD_ipv6/src/pconn.c        Fri Jul 22 20:21:27 2011
@@ -179,6 +179,18 @@
        storeAppendPrintf(e, "\t%4d  %9d\n", i, server_pconn_hist[i]);
     }
 }
+
+static void
+pconnDump(StoreEntry * e)
+{
+    struct _pconn *p;
+
+    hash_first(table);
+    while ((p = (struct _pconn *) hash_next(table))) {
+        storeAppendPrintf(e, "\t%s  %d fds\n",
+          (const char *) p->hash.key, p->nfds);
+    }
+}

/* ========== PUBLIC FUNCTIONS ============================================ */

@@ -199,6 +211,9 @@
     cachemgrRegister("pconn",
        "Persistent Connection Utilization Histograms",
        pconnHistDump, 0, 1);
+    cachemgrRegister("pconn_list",
+        "Persistent Connection List",
+        pconnDump, 0, 1);
     debug(48, 3) ("persistent connection module initialized\n");
 }

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to