Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 31717 invoked by uid 500); 28 Jul 2001 01:28:54 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 31706 invoked by uid 500); 28 Jul 2001 01:28:54 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 28 Jul 2001 01:25:25 -0000 Message-ID: <20010728012525.9635.qmail@icarus.apache.org> From: wrowe@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/generators mod_status.c X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N wrowe 01/07/27 18:25:25 Modified: modules/generators mod_status.c Log: More pendantic changes for HTML 3.2/4.01 Transitional compliance, and XHTML 1.0 legibility. One XHTML issue remains, , which has an issue that "attribute minimization is not supported in XML". Since ?notables drops that thorny issue, I'm ignoring this for now. Revision Changes Path 1.43 +87 -89 httpd-2.0/modules/generators/mod_status.c Index: mod_status.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/generators/mod_status.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- mod_status.c 2001/07/25 21:15:54 1.42 +++ mod_status.c 2001/07/28 01:25:24 1.43 @@ -352,23 +352,23 @@ if (!short_report) { ap_rputs(DOCTYPE_HTML_3_2 - "\nApache Status\n\n", + "\nApache Status\n\n", r); - ap_rputs("

Apache Server Status for ", r); - ap_rvputs(r, ap_get_server_name(r), "

\n\n", NULL); - ap_rvputs(r, "Server Version: ", - ap_get_server_version(), "
\n", NULL); - ap_rvputs(r, "Server Built: ", - ap_get_server_built(), "
\n
\n", NULL); - ap_rvputs(r, "Current Time: ", - ap_ht_time(r->pool, nowtime, DEFAULT_TIME_FORMAT, 0), "
\n", NULL); - ap_rvputs(r, "Restart Time: ", + ap_rputs("

Apache Server Status for ", r); + ap_rvputs(r, ap_get_server_name(r), "

\n\n", NULL); + ap_rvputs(r, "
Server Version: ", + ap_get_server_version(), "
\n", NULL); + ap_rvputs(r, "
Server Built: ", + ap_get_server_built(), "\n

\n", NULL); + ap_rvputs(r, "
Current Time: ", + ap_ht_time(r->pool, nowtime, DEFAULT_TIME_FORMAT, 0), "
\n", NULL); + ap_rvputs(r, "
Restart Time: ", ap_ht_time(r->pool, ap_restart_time, DEFAULT_TIME_FORMAT, 0), - "
\n", NULL); - ap_rprintf(r, "Parent Server Generation: %d
\n", (int) ap_my_generation); - ap_rputs("Server uptime: ", r); + "
\n", NULL); + ap_rprintf(r, "
Parent Server Generation: %d
\n", (int) ap_my_generation); + ap_rputs("
Server uptime: ", r); show_time(r, up_time); - ap_rputs("
\n", r); + ap_rputs("
\n", r); } if (ap_extended_status) { @@ -397,24 +397,22 @@ KBYTE * (float) kbcount / (float) count); } else { /* !short_report */ - ap_rprintf(r, "Total accesses: %lu - Total Traffic: ", count); + ap_rprintf(r, "
Total accesses: %lu - Total Traffic: ", count); format_kbyte_out(r, kbcount); + ap_rputs("
\n", r); #ifdef HAVE_TIMES /* Allow for OS/2 not having CPU stats */ - ap_rputs("
\n", r); - ap_rprintf(r, "CPU Usage: u%g s%g cu%g cs%g", + ap_rprintf(r, "
CPU Usage: u%g s%g cu%g cs%g", tu / tick, ts / tick, tcu / tick, tcs / tick); if (ts || tu || tcu || tcs) - ap_rprintf(r, " - %.3g%% CPU load", + ap_rprintf(r, " - %.3g%% CPU load
\n", (tu + ts + tcu + tcs) / tick / up_time * 100.); #endif - ap_rputs("
\n", r); - if (up_time > 0) - ap_rprintf(r, "%.3g requests/sec - ", + ap_rprintf(r, "
%.3g requests/sec - ", (float) count / (float) up_time); if (up_time > 0) { @@ -429,12 +427,12 @@ ap_rputs("/request", r); } - ap_rputs("
\n", r); + ap_rputs("
\n", r); } /* short_report */ } /* ap_extended_status */ if (!short_report) - ap_rprintf(r, "\n%d requests currently being processed, %d idle servers\n" + ap_rprintf(r, "
%d requests currently being processed, %d idle servers
\n" ,busy, ready); else ap_rprintf(r, "BusyServers: %d\nIdleServers: %d\n", busy, ready); @@ -442,7 +440,7 @@ /* send the scoreboard 'table' out */ if (!short_report) - ap_rputs("
", r);
  +	ap_rputs("
", r);
       else
   	ap_rputs("Scoreboard: ", r);
   
  @@ -458,25 +456,25 @@
       if (short_report)
   	ap_rputs("\n", r);
       else {
  -	ap_rputs("
\n", r); - ap_rputs("Scoreboard Key:
\n", r); - ap_rputs("\"_\" Waiting for Connection, \n", r); - ap_rputs("\"S\" Starting up, \n", r); - ap_rputs("\"R\" Reading Request,
\n", r); - ap_rputs("\"W\" Sending Reply, \n", r); - ap_rputs("\"K\" Keepalive (read), \n", r); - ap_rputs("\"D\" DNS Lookup,
\n", r); - ap_rputs("\"C\" Closing connection, \n", r); - ap_rputs("\"L\" Logging, \n", r); - ap_rputs("\"G\" Gracefully finishing,
\n", r); - ap_rputs("\"I\" Idle cleanup of worker, \n", r); - ap_rputs("\".\" Open slot with no current process

\n", r); - ap_rputs("

\n", r); + ap_rputs("\n", r); + ap_rputs("

Scoreboard Key:
\n", r); + ap_rputs("\"_\" Waiting for Connection, \n", r); + ap_rputs("\"S\" Starting up, \n", r); + ap_rputs("\"R\" Reading Request,
\n", r); + ap_rputs("\"W\" Sending Reply, \n", r); + ap_rputs("\"K\" Keepalive (read), \n", r); + ap_rputs("\"D\" DNS Lookup,
\n", r); + ap_rputs("\"C\" Closing connection, \n", r); + ap_rputs("\"L\" Logging, \n", r); + ap_rputs("\"G\" Gracefully finishing,
\n", r); + ap_rputs("\"I\" Idle cleanup of worker, \n", r); + ap_rputs("\".\" Open slot with no current process

\n", r); + ap_rputs("

\n", r); if (!ap_extended_status) { int j; int k = 0; - ap_rputs("PID Key:
\n", r); - ap_rputs("

\n", r);
  +	    ap_rputs("PID Key: 
\n", r); + ap_rputs("
\n", r);
   	    for (i = 0; i < HARD_SERVER_LIMIT; ++i) {
                   for (j = 0; j < HARD_THREAD_LIMIT; ++j) {
                       int indx = (i * HARD_THREAD_LIMIT) + j;
  @@ -494,20 +492,20 @@
                   }
   	    }
   	    ap_rputs("\n", r);
  -	    ap_rputs("
\n", r); + ap_rputs("
\n", r); } } if (ap_extended_status) { if (!short_report) { if (no_table_report) - ap_rputs("


Server Details

\n\n", r); + ap_rputs("

Server Details

\n\n", r); else #ifndef HAVE_TIMES /* Allow for OS/2 not having CPU stats */ - ap_rputs("

\n\n\n\n", r); + ap_rputs("\n\n
SrvPIDAccM\nSSReqConnChildSlotClientVHostRequest
\n\n", r); #else - ap_rputs("

\n\n

SrvPIDAccM\nSSReqConnChildSlotClientVHostRequest
\n\n", r); + ap_rputs("\n\n
SrvPIDAccMCPU\nSSReqConnChildSlotClientVHostRequest
\n\n", r); #endif } @@ -623,7 +621,7 @@ ap_rputs("|", r); format_byte_out(r, bytes); ap_rputs(")\n", r); - ap_rprintf(r, " %s {%s}[%s]
\n\n", + ap_rprintf(r, " %s {%s}[%s]
\n\n", ap_escape_html(r->pool, ws_record.client), ap_escape_html(r->pool, ws_record.request), vhost ? ap_escape_html(r->pool, @@ -632,60 +630,60 @@ else { /* !no_table_report */ if (ws_record.status == SERVER_DEAD) ap_rprintf(r, - "\n\n"); + "\n\n"); else ap_rprintf(r, - "\n\n", + "\n\n", ap_escape_html(r->pool, ws_record.client), vhost ? ap_escape_html(r->pool, vhost->server_hostname) : "(unavailable)", @@ -715,32 +713,32 @@ if (!(short_report || no_table_report)) { #ifndef HAVE_TIMES ap_rputs("
SrvPIDAccMCPU\nSSReqConnChildSlotClientVHostRequest
%d-%d-%d/%lu/%lu", + "
%d-%d-%d/%lu/%lu", i, (int) ps_record.generation, (int) conn_lres, my_lres, lres); else ap_rprintf(r, - "
%d-%d%" APR_OS_PROC_T_FMT - "%d/%lu/%lu", + "
%d-%d%" APR_OS_PROC_T_FMT + "%d/%lu/%lu", i, (int) ps_record.generation, ps_record.pid, (int) conn_lres, my_lres, lres); switch (ws_record.status) { case SERVER_READY: - ap_rputs("_", r); + ap_rputs("_", r); break; case SERVER_STARTING: - ap_rputs("S", r); + ap_rputs("S", r); break; case SERVER_BUSY_READ: - ap_rputs("R", r); + ap_rputs("R", r); break; case SERVER_BUSY_WRITE: - ap_rputs("W", r); + ap_rputs("W", r); break; case SERVER_BUSY_KEEPALIVE: - ap_rputs("K", r); + ap_rputs("K", r); break; case SERVER_BUSY_LOG: - ap_rputs("L", r); + ap_rputs("L", r); break; case SERVER_BUSY_DNS: - ap_rputs("D", r); + ap_rputs("D", r); break; case SERVER_CLOSING: - ap_rputs("C", r); + ap_rputs("C", r); break; case SERVER_DEAD: - ap_rputs(".", r); + ap_rputs(".", r); break; case SERVER_GRACEFUL: - ap_rputs("G", r); + ap_rputs("G", r); break; case SERVER_IDLE_KILL: - ap_rputs("I", r); + ap_rputs("I", r); break; default: - ap_rputs("?", r); + ap_rputs("?", r); break; } #ifndef HAVE_TIMES /* Allow for OS/2 not having CPU stats */ - ap_rprintf(r, "\n%.0f%ld", + ap_rprintf(r, "\n%.0f%ld", #else - ap_rprintf(r, "\n%.2f%ld%ld", + ap_rprintf(r, "\n%.2f%ld%ld", (ws_record.times.tms_utime + ws_record.times.tms_stime + ws_record.times.tms_cutime + @@ -693,15 +691,15 @@ #endif (long)((nowtime - ws_record.last_used) / APR_USEC_PER_SEC), (long) req_time); - ap_rprintf(r, "%-1.1f%-2.2f%-2.2f\n", + ap_rprintf(r, "%-1.1f%-2.2f%-2.2f\n", (float) conn_bytes / KBYTE, (float) my_bytes / MBYTE, (float) bytes / MBYTE); if (ws_record.status == SERVER_BUSY_READ) ap_rprintf(r, - "??..reading..
??..reading..
%s%s%s
%s%s%s
\n \ -


\ +
\ \n \ -\n \ +\n \ +\n \ +\n \ +\n \ +\n \ +\n \ +\n \ +\n \
SrvChild Server number - generation\n \ -
PIDOS process ID\n \ -
AccNumber of accesses this connection / this child / this slot\n \ -
MMode of operation\n \ -
SSSeconds since beginning of most recent request\n \ -
ReqMilliseconds required to process most recent request\n \ -
ConnKilobytes transferred this connection\n \ -
ChildMegabytes transferred this child\n \ -
SlotTotal megabytes transferred this slot\n \ +
SrvChild Server number - generation
PIDOS process ID
AccNumber of accesses this connection / this child / this slot
MMode of operation
SSSeconds since beginning of most recent request
ReqMilliseconds required to process most recent request
ConnKilobytes transferred this connection
ChildMegabytes transferred this child
SlotTotal megabytes transferred this slot
\n", r); #else ap_rputs("\n \ -
\ +
\ \n \ -\n \ +\n \ +\n \ +\n \ +\n \ +\n \ +\n \ +\n \ +\n \ +\n \
SrvChild Server number - generation\n \ -
PIDOS process ID\n \ -
AccNumber of accesses this connection / this child / this slot\n \ -
MMode of operation\n \ -
CPUCPU usage, number of seconds\n \ -
SSSeconds since beginning of most recent request\n \ -
ReqMilliseconds required to process most recent request\n \ -
ConnKilobytes transferred this connection\n \ -
ChildMegabytes transferred this child\n \ -
SlotTotal megabytes transferred this slot\n \ +
SrvChild Server number - generation
PIDOS process ID
AccNumber of accesses this connection / this child / this slot
MMode of operation
CPUCPU usage, number of seconds
SSSeconds since beginning of most recent request
ReqMilliseconds required to process most recent request
ConnKilobytes transferred this connection
ChildMegabytes transferred this child
SlotTotal megabytes transferred this slot
\n", r); #endif } @@ -748,15 +746,15 @@ } else { if (!short_report) { - ap_rputs("
To obtain a full report with current status information ", r); + ap_rputs("
To obtain a full report with current status information ", r); ap_rputs("you need to use the ExtendedStatus On directive. \n", r); } } if (!short_report) { - ap_rputs(ap_psignature("
\n",r), r); - ap_rputs("\n", r); + ap_rputs(ap_psignature("
\n",r), r); + ap_rputs("\n", r); } return 0;