httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Cox <...@hyperreal.com>
Subject cvs commit: apache/src mod_status.c
Date Fri, 29 Mar 1996 08:56:50 GMT
mjc         96/03/29 00:56:49

  Modified:    src       mod_status.c
  Log:
  Improved generated HTML and added scoreboard explanations
  
  Revision  Changes    Path
  1.5       +13 -4     apache/src/mod_status.c
  
  Index: mod_status.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_status.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -C3 -r1.4 -r1.5
  *** mod_status.c	1996/03/28 15:29:45	1.4
  --- mod_status.c	1996/03/29 08:56:49	1.5
  ***************
  *** 70,75 ****
  --- 70,76 ----
     * 18.3.96  Make extra Scoreboard variables #definable
     * 25.3.96  Make short report have full precision [Ben Laurie suggested]
     * 25.3.96  Show uptime better [Mark/Ben Laurie]
  +  * 29.3.96  Better HTML and explanation [Mark/Rob Hartill suggested]
     */
    
    #include "httpd.h"
  ***************
  *** 177,183 ****
        up_time=nowtime-restart_time;
    
        if (!short_report) {
  !         rputs("<h1>Server Status Page</h1>\n\n",r);
    	rvputs(r,"Hostname: ",server->server_hostname,"<br>",NULL);
    	rvputs(r,"Current Time: ",asctime(localtime(&nowtime)),"<br>",NULL);
    	rvputs(r,"Restart Time: ",asctime(localtime(&restart_time)),"<br>",
  --- 178,185 ----
        up_time=nowtime-restart_time;
    
        if (!short_report) {
  !         rputs("<html><head><title>Apache Status</title></head><body>",r);
  !         rputs("<h1>Apache Server Status</h1>\n\n",r);
    	rvputs(r,"Hostname: ",server->server_hostname,"<br>",NULL);
    	rvputs(r,"Current Time: ",asctime(localtime(&nowtime)),"<br>",NULL);
    	rvputs(r,"Restart Time: ",asctime(localtime(&restart_time)),"<br>",
  ***************
  *** 203,215 ****
    	if(!short_report && i%25 == 24)
    	    rputs("\r\n",r);
        }
  !     if(!short_report)
    	rputs("</PRE>",r);
  ! 
        if (short_report)
            sprintf(buffer,"\nBusyServers: %d\nIdleServers: %d\n",busy,ready);
        else 
  !         sprintf(buffer,"\n<br>%d requests currently being processed,\n %d idle servers\n\n",busy,ready);
        rputs(buffer,r);
    
    #ifdef STATUS_INSTRUMENTATION
  --- 205,222 ----
    	if(!short_report && i%25 == 24)
    	    rputs("\r\n",r);
        }
  !     if(!short_report) {
    	rputs("</PRE>",r);
  ! 	rputs("Server States:<ul>",r);
  ! 	rputs("<li>\"<code>_</code>\" Waiting for Connection",r);
  ! 	rputs("<li>\"<code>S</code>\" Starting up",r);
  ! 	rputs("<li>\"<code>R</code>\" Reading Request",r);
  ! 	rputs("<li>\"<code>W</code>\" Sending Reply</ul>",r);
  !     }
        if (short_report)
            sprintf(buffer,"\nBusyServers: %d\nIdleServers: %d\n",busy,ready);
        else 
  !         sprintf(buffer,"\n%d requests currently being processed,\n %d idle servers\n\n",busy,ready);
        rputs(buffer,r);
    
    #ifdef STATUS_INSTRUMENTATION
  ***************
  *** 309,314 ****
  --- 316,323 ----
    	    }
        }
    #endif
  +     if (!short_report)
  +         rputs("</body></html>",r);
        return 0;
    }
    
  
  
  

Mime
View raw message