Author: adrian.chadd
Date: Sat Mar 28 15:00:46 2009
New Revision: 13882
Modified:
branches/LUSCA_HEAD/src/stat.c
Log:
A potentially not final solution to exporting some "top level" process
statistics. This for now is client/server counts; there'll be others
soon - like number of fds, disk fds, memory, etc - stuff from
cachemgr:info.
Modified: branches/LUSCA_HEAD/src/stat.c
==============================================================================
--- branches/LUSCA_HEAD/src/stat.c (original)
+++ branches/LUSCA_HEAD/src/stat.c Sat Mar 28 15:00:46 2009
@@ -73,6 +73,7 @@
static OBJH statUtilization;
static OBJH statCountersHistograms;
static OBJH statClientRequests;
+static OBJH statCurrentStuff;
#ifdef XMALLOC_STATISTICS
static void info_get_mallstat(int, int, int, void *);
@@ -958,6 +959,7 @@
"Client-side Active Requests",
statClientRequests, 0, 1);
cachemgrRegister("iapp_stats", "libiapp statistics", statIappStats, 0,
1);
+ cachemgrRegister("curcounters", "current high level counters",
statCurrentStuff, 0, 1);
}
static void
@@ -1309,6 +1311,13 @@
statPeerSelect(sentry);
storeAppendPrintf(sentry, "\nLocal Digest:\n");
storeDigestReport(sentry);
+}
+
+static void
+statCurrentStuff(StoreEntry *e)
+{
+ storeAppendPrintf(e, "curstats.client_side.conn_count=%d\n",
connStateGetCount());
+ storeAppendPrintf(e, "curstats.http.conn_count=%d\n", httpGetCount());
}
static void
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---