Because there are several caching servers floating around that
implement the memcache protocol, I thought it might be nice if there
was an easy way for a consumer to check just what type of server they
were connected to. I'm including a patch which would add a 'type'
field to the stats output, and would also suggest adding this field to
a future version of the protocol doc. You might also want to consider
adding a 'platform' field to indicate whether the daemon is running
atop Linux, Solaris, BSD, Windows, etc.



diff --git a/memcached.c b/memcached.c
index f2d539c..3e0b80d 100644
--- a/memcached.c
+++ b/memcached.c
@@ -2515,6 +2515,7 @@ static void server_stats(ADD_STAT add_stats,
conn *c) {
     APPEND_STAT("pid", "%lu", (long)pid);
     APPEND_STAT("uptime", "%u", now);
     APPEND_STAT("time", "%ld", now + (long)process_started);
+    APPEND_STAT("type", "%s", PACKAGE);
     APPEND_STAT("version", "%s", VERSION);
     APPEND_STAT("libevent", "%s", event_get_version());
     APPEND_STAT("pointer_size", "%d", (int)(8 * sizeof(void *)));

Reply via email to