[lusca-cache] r14935 committed - Add a simple function that dumps the pconn database, rather than...

2 views
Skip to first unread message

codesite...@google.com

unread,
Jul 22, 2011, 11:22:02 PM7/22/11
to lusca-...@googlegroups.com
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");
}

Reply all
Reply to author
Forward
0 new messages