You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2016/11/05 16:47:43 UTC

svn commit: r1768245 - /httpd/httpd/trunk/modules/cache/mod_socache_memcache.c

Author: jim
Date: Sat Nov  5 16:47:43 2016
New Revision: 1768245

URL: http://svn.apache.org/viewvc?rev=1768245&view=rev
Log:
heh... bring memcache up to redis :)
mod_status info

Modified:
    httpd/httpd/trunk/modules/cache/mod_socache_memcache.c

Modified: httpd/httpd/trunk/modules/cache/mod_socache_memcache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_memcache.c?rev=1768245&r1=1768244&r2=1768245&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_socache_memcache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_socache_memcache.c Sat Nov  5 16:47:43 2016
@@ -17,6 +17,7 @@
 
 #include "httpd.h"
 #include "http_config.h"
+#include "http_protocol.h"
 
 #include "apr.h"
 #include "apu_version.h"
@@ -33,6 +34,8 @@
 #include "ap_mpm.h"
 #include "http_log.h"
 #include "apr_memcache.h"
+#include "apr_strings.h"
+#include "mod_status.h"
 
 /* The underlying apr_memcache system is thread safe.. */
 #define MC_KEY_LEN 254
@@ -293,7 +296,58 @@ static apr_status_t socache_mc_remove(ap
 
 static void socache_mc_status(ap_socache_instance_t *ctx, request_rec *r, int flags)
 {
-    /* TODO: Make a mod_status handler. meh. */
+    apr_memcache_t *rc = ctx->mc;
+    int i;
+
+    for (i = 0; i < rc->ntotal; i++) {
+        apr_memcache_server_t *ms;
+        apr_memcache_stats_t *stats;
+        apr_status_t rv;
+        char *br = (!(flags & AP_STATUS_SHORT) ? "</br>" : "");
+
+        ms = rc->live_servers[i];
+
+        ap_rprintf(r, "Memcached server: %s:%d [%s]%s\n", ms->host, (int)ms->port,
+                (ms->status == APR_MC_SERVER_LIVE) ? "Up" : "Down",
+                br);
+        rv = apr_memcache_stats(ms, r->pool, &stats);
+        if (rv != APR_SUCCESS)
+            continue;
+        if (!(flags & AP_STATUS_SHORT)) {
+            ap_rprintf(r, "<b>Version:</b> <i>%s</i> [%u bits], PID: <i>%u</i>, Uptime: <i>%u hrs</i> </br>\n",
+                    stats->version , stats->pointer_size, stats->pid, stats->uptime/3600);
+            ap_rprintf(r, "<b>Clients::</b> Structures: <i>%u</i>, Total: <i>%u</i>, Current: <i>%u</i> </br>\n",
+                    stats->connection_structures, stats->total_connections, stats->curr_connections);
+            ap_rprintf(r, "<b>Storage::</b> Total Items: <i>%u</i>, Current Items: <i>%u</i>, Bytes: <i>%lu</i> </br>\n",
+                    stats->total_items, stats->curr_items, stats->bytes);
+            ap_rprintf(r, "<b>CPU::</b> System: <i>%u</i>, User: <i>%u</i> </br>\n",
+                    (unsigned)stats->rusage_system, (unsigned)stats->rusage_user );
+            ap_rprintf(r, "<b>Cache::</b> Gets: <i>%u</i>, Sets: <i>%u</i>, Hits: <i>%u</i>, Misses: <i>%u</i> </br>\n",
+                    stats->cmd_get, stats->cmd_set, stats->get_hits, stats->get_misses);
+            ap_rprintf(r, "<b>Net::</b> Input bytes: <i>%lu</i>, Output bytes: <i>%lu</i> </br>\n",
+                    stats->bytes_read, stats->bytes_written);
+            ap_rprintf(r, "<b>Misc::</b> Evictions: <i>%lu</i>, MaxMem: <i>%u</i>, Threads: <i>%u</i> </br>\n",
+                    stats->evictions, stats->limit_maxbytes, stats->threads);
+            ap_rputs("<hr></br>\n", r);
+        }
+        else {
+            ap_rprintf(r, "Version: %s [%u bits], PID: %u, Uptime: %u hrs %s\n",
+                    stats->version , stats->pointer_size, stats->pid, stats->uptime/3600, br);
+            ap_rprintf(r, "Clients:: Structures: %d, Total: %d, Current: %u %s\n",
+                    stats->connection_structures, stats->total_connections, stats->curr_connections, br);
+            ap_rprintf(r, "Storage:: Total Items: %u, Current Items: %u, Bytes: %lu %s\n",
+                    stats->total_items, stats->curr_items, stats->bytes, br);
+            ap_rprintf(r, "CPU:: System: %u, User: %u %s\n",
+                    (unsigned)stats->rusage_system, (unsigned)stats->rusage_user , br);
+            ap_rprintf(r, "Cache:: Gets: %u, Sets: %u, Hits: %u, Misses: %u %s\n",
+                    stats->cmd_get, stats->cmd_set, stats->get_hits, stats->get_misses, br);
+            ap_rprintf(r, "Net:: Input bytes: %lu, Output bytes: %lu %s\n",
+                    stats->bytes_read, stats->bytes_written, br);
+            ap_rprintf(r, "Misc:: Evictions: %lu, MaxMem: %u, Threads: %u %s\n",
+                    stats->evictions, stats->limit_maxbytes, stats->threads, br);
+        }
+    }
+
 }
 
 static apr_status_t socache_mc_iterate(ap_socache_instance_t *instance,



Re: svn commit: r1768245 - /httpd/httpd/trunk/modules/cache/mod_socache_memcache.c

Posted by Jim Jagielski <ji...@jaguNET.com>.
IMO, if you use and compute something 2x or more, it should
be a var. YMMV

> On Nov 18, 2016, at 4:04 PM, Christophe JAILLET <ch...@wanadoo.fr> wrote:
> 
> Le 05/11/2016 à 17:47, jim@apache.org a écrit :
>> Author: jim
>> Date: Sat Nov  5 16:47:43 2016
>> New Revision: 1768245
>> 
>> URL: http://svn.apache.org/viewvc?rev=1768245&view=rev
>> Log:
>> heh... bring memcache up to redis :)
>> mod_status info
>> 
>> Modified:
>>     httpd/httpd/trunk/modules/cache/mod_socache_memcache.c
>> 
>> Modified: httpd/httpd/trunk/modules/cache/mod_socache_memcache.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_memcache.c?rev=1768245&r1=1768244&r2=1768245&view=diff
>> ==============================================================================
>> --- httpd/httpd/trunk/modules/cache/mod_socache_memcache.c (original)
>> +++ httpd/httpd/trunk/modules/cache/mod_socache_memcache.c Sat Nov  5 16:47:43 2016
>> @@ -17,6 +17,7 @@
>>    #include "httpd.h"
>>  #include "http_config.h"
>> +#include "http_protocol.h"
>>    #include "apr.h"
>>  #include "apu_version.h"
>> @@ -33,6 +34,8 @@
>>  #include "ap_mpm.h"
>>  #include "http_log.h"
>>  #include "apr_memcache.h"
>> +#include "apr_strings.h"
>> +#include "mod_status.h"
>>    /* The underlying apr_memcache system is thread safe.. */
>>  #define MC_KEY_LEN 254
>> @@ -293,7 +296,58 @@ static apr_status_t socache_mc_remove(ap
>>    static void socache_mc_status(ap_socache_instance_t *ctx, request_rec *r, int flags)
>>  {
>> -    /* TODO: Make a mod_status handler. meh. */
>> +    apr_memcache_t *rc = ctx->mc;
>> +    int i;
>> +
>> +    for (i = 0; i < rc->ntotal; i++) {
>> +        apr_memcache_server_t *ms;
>> +        apr_memcache_stats_t *stats;
>> +        apr_status_t rv;
>> +        char *br = (!(flags & AP_STATUS_SHORT) ? "</br>" : "");
> Is there reaaly a need for the 'br'...
>> +
>> +        ms = rc->live_servers[i];
>> +
>> +        ap_rprintf(r, "Memcached server: %s:%d [%s]%s\n", ms->host, (int)ms->port,
>> +                (ms->status == APR_MC_SERVER_LIVE) ? "Up" : "Down",
>> +                br);
> ... which could be inlined here and...
>> +        rv = apr_memcache_stats(ms, r->pool, &stats);
>> +        if (rv != APR_SUCCESS)
>> +            continue;
>> +        if (!(flags & AP_STATUS_SHORT)) {
>> +            ap_rprintf(r, "<b>Version:</b> <i>%s</i> [%u bits], PID: <i>%u</i>, Uptime: <i>%u hrs</i> </br>\n",
>> +                    stats->version , stats->pointer_size, stats->pid, stats->uptime/3600);
>> +            ap_rprintf(r, "<b>Clients::</b> Structures: <i>%u</i>, Total: <i>%u</i>, Current: <i>%u</i> </br>\n",
>> +                    stats->connection_structures, stats->total_connections, stats->curr_connections);
>> +            ap_rprintf(r, "<b>Storage::</b> Total Items: <i>%u</i>, Current Items: <i>%u</i>, Bytes: <i>%lu</i> </br>\n",
>> +                    stats->total_items, stats->curr_items, stats->bytes);
>> +            ap_rprintf(r, "<b>CPU::</b> System: <i>%u</i>, User: <i>%u</i> </br>\n",
>> +                    (unsigned)stats->rusage_system, (unsigned)stats->rusage_user );
>> +            ap_rprintf(r, "<b>Cache::</b> Gets: <i>%u</i>, Sets: <i>%u</i>, Hits: <i>%u</i>, Misses: <i>%u</i> </br>\n",
>> +                    stats->cmd_get, stats->cmd_set, stats->get_hits, stats->get_misses);
>> +            ap_rprintf(r, "<b>Net::</b> Input bytes: <i>%lu</i>, Output bytes: <i>%lu</i> </br>\n",
>> +                    stats->bytes_read, stats->bytes_written);
>> +            ap_rprintf(r, "<b>Misc::</b> Evictions: <i>%lu</i>, MaxMem: <i>%u</i>, Threads: <i>%u</i> </br>\n",
>> +                    stats->evictions, stats->limit_maxbytes, stats->threads);
>> +            ap_rputs("<hr></br>\n", r);
>> +        }
>> +        else {
>> +            ap_rprintf(r, "Version: %s [%u bits], PID: %u, Uptime: %u hrs %s\n",
>> +                    stats->version , stats->pointer_size, stats->pid, stats->uptime/3600, br);
>> +            ap_rprintf(r, "Clients:: Structures: %d, Total: %d, Current: %u %s\n",
>> +                    stats->connection_structures, stats->total_connections, stats->curr_connections, br);
>> +            ap_rprintf(r, "Storage:: Total Items: %u, Current Items: %u, Bytes: %lu %s\n",
>> +                    stats->total_items, stats->curr_items, stats->bytes, br);
>> +            ap_rprintf(r, "CPU:: System: %u, User: %u %s\n",
>> +                    (unsigned)stats->rusage_system, (unsigned)stats->rusage_user , br);
>> +            ap_rprintf(r, "Cache:: Gets: %u, Sets: %u, Hits: %u, Misses: %u %s\n",
>> +                    stats->cmd_get, stats->cmd_set, stats->get_hits, stats->get_misses, br);
>> +            ap_rprintf(r, "Net:: Input bytes: %lu, Output bytes: %lu %s\n",
>> +                    stats->bytes_read, stats->bytes_written, br);
>> +            ap_rprintf(r, "Misc:: Evictions: %lu, MaxMem: %u, Threads: %u %s\n",
>> +                    stats->evictions, stats->limit_maxbytes, stats->threads, br);
> ... which is mostly used to append nothing here ?
> 
>> +        }
>> +    }
>> +
>>  }
>>    static apr_status_t socache_mc_iterate(ap_socache_instance_t *instance,


Re: svn commit: r1768245 - /httpd/httpd/trunk/modules/cache/mod_socache_memcache.c

Posted by Christophe JAILLET <ch...@wanadoo.fr>.
Le 05/11/2016 � 17:47, jim@apache.org a �crit :
> Author: jim
> Date: Sat Nov  5 16:47:43 2016
> New Revision: 1768245
>
> URL: http://svn.apache.org/viewvc?rev=1768245&view=rev
> Log:
> heh... bring memcache up to redis :)
> mod_status info
>
> Modified:
>      httpd/httpd/trunk/modules/cache/mod_socache_memcache.c
>
> Modified: httpd/httpd/trunk/modules/cache/mod_socache_memcache.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_memcache.c?rev=1768245&r1=1768244&r2=1768245&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/cache/mod_socache_memcache.c (original)
> +++ httpd/httpd/trunk/modules/cache/mod_socache_memcache.c Sat Nov  5 16:47:43 2016
> @@ -17,6 +17,7 @@
>   
>   #include "httpd.h"
>   #include "http_config.h"
> +#include "http_protocol.h"
>   
>   #include "apr.h"
>   #include "apu_version.h"
> @@ -33,6 +34,8 @@
>   #include "ap_mpm.h"
>   #include "http_log.h"
>   #include "apr_memcache.h"
> +#include "apr_strings.h"
> +#include "mod_status.h"
>   
>   /* The underlying apr_memcache system is thread safe.. */
>   #define MC_KEY_LEN 254
> @@ -293,7 +296,58 @@ static apr_status_t socache_mc_remove(ap
>   
>   static void socache_mc_status(ap_socache_instance_t *ctx, request_rec *r, int flags)
>   {
> -    /* TODO: Make a mod_status handler. meh. */
> +    apr_memcache_t *rc = ctx->mc;
> +    int i;
> +
> +    for (i = 0; i < rc->ntotal; i++) {
> +        apr_memcache_server_t *ms;
> +        apr_memcache_stats_t *stats;
> +        apr_status_t rv;
> +        char *br = (!(flags & AP_STATUS_SHORT) ? "</br>" : "");
Is there reaaly a need for the 'br'...
> +
> +        ms = rc->live_servers[i];
> +
> +        ap_rprintf(r, "Memcached server: %s:%d [%s]%s\n", ms->host, (int)ms->port,
> +                (ms->status == APR_MC_SERVER_LIVE) ? "Up" : "Down",
> +                br);
... which could be inlined here and...
> +        rv = apr_memcache_stats(ms, r->pool, &stats);
> +        if (rv != APR_SUCCESS)
> +            continue;
> +        if (!(flags & AP_STATUS_SHORT)) {
> +            ap_rprintf(r, "<b>Version:</b> <i>%s</i> [%u bits], PID: <i>%u</i>, Uptime: <i>%u hrs</i> </br>\n",
> +                    stats->version , stats->pointer_size, stats->pid, stats->uptime/3600);
> +            ap_rprintf(r, "<b>Clients::</b> Structures: <i>%u</i>, Total: <i>%u</i>, Current: <i>%u</i> </br>\n",
> +                    stats->connection_structures, stats->total_connections, stats->curr_connections);
> +            ap_rprintf(r, "<b>Storage::</b> Total Items: <i>%u</i>, Current Items: <i>%u</i>, Bytes: <i>%lu</i> </br>\n",
> +                    stats->total_items, stats->curr_items, stats->bytes);
> +            ap_rprintf(r, "<b>CPU::</b> System: <i>%u</i>, User: <i>%u</i> </br>\n",
> +                    (unsigned)stats->rusage_system, (unsigned)stats->rusage_user );
> +            ap_rprintf(r, "<b>Cache::</b> Gets: <i>%u</i>, Sets: <i>%u</i>, Hits: <i>%u</i>, Misses: <i>%u</i> </br>\n",
> +                    stats->cmd_get, stats->cmd_set, stats->get_hits, stats->get_misses);
> +            ap_rprintf(r, "<b>Net::</b> Input bytes: <i>%lu</i>, Output bytes: <i>%lu</i> </br>\n",
> +                    stats->bytes_read, stats->bytes_written);
> +            ap_rprintf(r, "<b>Misc::</b> Evictions: <i>%lu</i>, MaxMem: <i>%u</i>, Threads: <i>%u</i> </br>\n",
> +                    stats->evictions, stats->limit_maxbytes, stats->threads);
> +            ap_rputs("<hr></br>\n", r);
> +        }
> +        else {
> +            ap_rprintf(r, "Version: %s [%u bits], PID: %u, Uptime: %u hrs %s\n",
> +                    stats->version , stats->pointer_size, stats->pid, stats->uptime/3600, br);
> +            ap_rprintf(r, "Clients:: Structures: %d, Total: %d, Current: %u %s\n",
> +                    stats->connection_structures, stats->total_connections, stats->curr_connections, br);
> +            ap_rprintf(r, "Storage:: Total Items: %u, Current Items: %u, Bytes: %lu %s\n",
> +                    stats->total_items, stats->curr_items, stats->bytes, br);
> +            ap_rprintf(r, "CPU:: System: %u, User: %u %s\n",
> +                    (unsigned)stats->rusage_system, (unsigned)stats->rusage_user , br);
> +            ap_rprintf(r, "Cache:: Gets: %u, Sets: %u, Hits: %u, Misses: %u %s\n",
> +                    stats->cmd_get, stats->cmd_set, stats->get_hits, stats->get_misses, br);
> +            ap_rprintf(r, "Net:: Input bytes: %lu, Output bytes: %lu %s\n",
> +                    stats->bytes_read, stats->bytes_written, br);
> +            ap_rprintf(r, "Misc:: Evictions: %lu, MaxMem: %u, Threads: %u %s\n",
> +                    stats->evictions, stats->limit_maxbytes, stats->threads, br);
... which is mostly used to append nothing here ?

> +        }
> +    }
> +
>   }
>   
>   static apr_status_t socache_mc_iterate(ap_socache_instance_t *instance,
>
>
>


Re: svn commit: r1768245 - /httpd/httpd/trunk/modules/cache/mod_socache_memcache.c

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Sun, Nov 6, 2016 at 1:45 PM, Jim Jagielski <ji...@jagunet.com> wrote:

> Why? We trust the apr_memcache.c returns the correct
> response... No need to check the version of APR or
> APU since mod_socache_memcache.c works fine no
> matter what version is used.


I missed that this is a trunk/2.4 httpd enhancement, not an apr_memcache
enhancement, sorry :)

Re: svn commit: r1768245 - /httpd/httpd/trunk/modules/cache/mod_socache_memcache.c

Posted by Jim Jagielski <ji...@jaguNET.com>.
Why? We trust the apr_memcache.c returns the correct
response... No need to check the version of APR or
APU since mod_socache_memcache.c works fine no
matter what version is used.

> On Nov 6, 2016, at 11:58 AM, William A Rowe Jr <wr...@rowe-clan.net> wrote:
> 
> 
> On Sun, Nov 6, 2016 at 10:57 AM, William A Rowe Jr <wr...@rowe-clan.net> wrote:
> Wrap this up in an #if APU_MAJOR_VERSION > 1 || APU_MINOR_VERSION > 6
> 
> before backporting? (Yes - these symbols will still exist in unifed APR2 and later.)
> 
> 
> #if APU_MAJOR_VERSION > 1 || APU_MINOR_VERSION >= 6
> 
> (My bad, sorry.) It is true that this would allow APR-util 0.9, but that doesn't matter
> since httpd 2.4 won't compile under antique APR anyways. 


Re: svn commit: r1768245 - /httpd/httpd/trunk/modules/cache/mod_socache_memcache.c

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Sun, Nov 6, 2016 at 10:57 AM, William A Rowe Jr <wr...@rowe-clan.net>
wrote:

> Wrap this up in an #if APU_MAJOR_VERSION > 1 || APU_MINOR_VERSION > 6
>
> before backporting? (Yes - these symbols will still exist in unifed APR2
> and later.)
>

#if APU_MAJOR_VERSION > 1 || APU_MINOR_VERSION >= 6

(My bad, sorry.) It is true that this would allow APR-util 0.9, but that
doesn't matter
since httpd 2.4 won't compile under antique APR anyways.

Re: svn commit: r1768245 - /httpd/httpd/trunk/modules/cache/mod_socache_memcache.c

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
Wrap this up in an #if APU_MAJOR_VERSION > 1 || APU_MINOR_VERSION > 6

before backporting? (Yes - these symbols will still exist in unifed APR2
and later.)

Since we can't demand users update apr to pick up 2.4.next, and some will be

using the OS-deployed APR.

On Nov 5, 2016 11:47 AM, <ji...@apache.org> wrote:

> Author: jim
> Date: Sat Nov  5 16:47:43 2016
> New Revision: 1768245
>
> URL: http://svn.apache.org/viewvc?rev=1768245&view=rev
> Log:
> heh... bring memcache up to redis :)
> mod_status info
>
> Modified:
>     httpd/httpd/trunk/modules/cache/mod_socache_memcache.c
>
> Modified: httpd/httpd/trunk/modules/cache/mod_socache_memcache.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache
> /mod_socache_memcache.c?rev=1768245&r1=1768244&r2=1768245&view=diff
> ============================================================
> ==================
> --- httpd/httpd/trunk/modules/cache/mod_socache_memcache.c (original)
> +++ httpd/httpd/trunk/modules/cache/mod_socache_memcache.c Sat Nov  5
> 16:47:43 2016
> @@ -17,6 +17,7 @@
>
>  #include "httpd.h"
>  #include "http_config.h"
> +#include "http_protocol.h"
>
>  #include "apr.h"
>  #include "apu_version.h"
> @@ -33,6 +34,8 @@
>  #include "ap_mpm.h"
>  #include "http_log.h"
>  #include "apr_memcache.h"
> +#include "apr_strings.h"
> +#include "mod_status.h"
>
>  /* The underlying apr_memcache system is thread safe.. */
>  #define MC_KEY_LEN 254
> @@ -293,7 +296,58 @@ static apr_status_t socache_mc_remove(ap
>
>  static void socache_mc_status(ap_socache_instance_t *ctx, request_rec
> *r, int flags)
>  {
> -    /* TODO: Make a mod_status handler. meh. */
> +    apr_memcache_t *rc = ctx->mc;
> +    int i;
> +
> +    for (i = 0; i < rc->ntotal; i++) {
> +        apr_memcache_server_t *ms;
> +        apr_memcache_stats_t *stats;
> +        apr_status_t rv;
> +        char *br = (!(flags & AP_STATUS_SHORT) ? "</br>" : "");
> +
> +        ms = rc->live_servers[i];
> +
> +        ap_rprintf(r, "Memcached server: %s:%d [%s]%s\n", ms->host,
> (int)ms->port,
> +                (ms->status == APR_MC_SERVER_LIVE) ? "Up" : "Down",
> +                br);
> +        rv = apr_memcache_stats(ms, r->pool, &stats);
> +        if (rv != APR_SUCCESS)
> +            continue;
> +        if (!(flags & AP_STATUS_SHORT)) {
> +            ap_rprintf(r, "<b>Version:</b> <i>%s</i> [%u bits], PID:
> <i>%u</i>, Uptime: <i>%u hrs</i> </br>\n",
> +                    stats->version , stats->pointer_size, stats->pid,
> stats->uptime/3600);
> +            ap_rprintf(r, "<b>Clients::</b> Structures: <i>%u</i>, Total:
> <i>%u</i>, Current: <i>%u</i> </br>\n",
> +                    stats->connection_structures,
> stats->total_connections, stats->curr_connections);
> +            ap_rprintf(r, "<b>Storage::</b> Total Items: <i>%u</i>,
> Current Items: <i>%u</i>, Bytes: <i>%lu</i> </br>\n",
> +                    stats->total_items, stats->curr_items, stats->bytes);
> +            ap_rprintf(r, "<b>CPU::</b> System: <i>%u</i>, User:
> <i>%u</i> </br>\n",
> +                    (unsigned)stats->rusage_system,
> (unsigned)stats->rusage_user );
> +            ap_rprintf(r, "<b>Cache::</b> Gets: <i>%u</i>, Sets:
> <i>%u</i>, Hits: <i>%u</i>, Misses: <i>%u</i> </br>\n",
> +                    stats->cmd_get, stats->cmd_set, stats->get_hits,
> stats->get_misses);
> +            ap_rprintf(r, "<b>Net::</b> Input bytes: <i>%lu</i>, Output
> bytes: <i>%lu</i> </br>\n",
> +                    stats->bytes_read, stats->bytes_written);
> +            ap_rprintf(r, "<b>Misc::</b> Evictions: <i>%lu</i>, MaxMem:
> <i>%u</i>, Threads: <i>%u</i> </br>\n",
> +                    stats->evictions, stats->limit_maxbytes,
> stats->threads);
> +            ap_rputs("<hr></br>\n", r);
> +        }
> +        else {
> +            ap_rprintf(r, "Version: %s [%u bits], PID: %u, Uptime: %u hrs
> %s\n",
> +                    stats->version , stats->pointer_size, stats->pid,
> stats->uptime/3600, br);
> +            ap_rprintf(r, "Clients:: Structures: %d, Total: %d, Current:
> %u %s\n",
> +                    stats->connection_structures,
> stats->total_connections, stats->curr_connections, br);
> +            ap_rprintf(r, "Storage:: Total Items: %u, Current Items: %u,
> Bytes: %lu %s\n",
> +                    stats->total_items, stats->curr_items, stats->bytes,
> br);
> +            ap_rprintf(r, "CPU:: System: %u, User: %u %s\n",
> +                    (unsigned)stats->rusage_system,
> (unsigned)stats->rusage_user , br);
> +            ap_rprintf(r, "Cache:: Gets: %u, Sets: %u, Hits: %u, Misses:
> %u %s\n",
> +                    stats->cmd_get, stats->cmd_set, stats->get_hits,
> stats->get_misses, br);
> +            ap_rprintf(r, "Net:: Input bytes: %lu, Output bytes: %lu
> %s\n",
> +                    stats->bytes_read, stats->bytes_written, br);
> +            ap_rprintf(r, "Misc:: Evictions: %lu, MaxMem: %u, Threads: %u
> %s\n",
> +                    stats->evictions, stats->limit_maxbytes,
> stats->threads, br);
> +        }
> +    }
> +
>  }
>
>  static apr_status_t socache_mc_iterate(ap_socache_instance_t *instance,
>
>
>