httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@hyperreal.org
Subject cvs commit: apache-1.3/src/modules/standard mod_status.c
Date Thu, 06 Aug 1998 17:42:53 GMT
jim         98/08/06 10:42:52

  Modified:    src      CHANGES
               src/modules/standard mod_status.c
  Log:
  Hmmm... we have access to the subprocesses pids,
  let's use them. Now we can tell which process is in which state even
  without full STATUS
  
  Revision  Changes    Path
  1.1005    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1004
  retrieving revision 1.1005
  diff -u -r1.1004 -r1.1005
  --- CHANGES	1998/08/06 17:30:18	1.1004
  +++ CHANGES	1998/08/06 17:42:49	1.1005
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.2
   
  +  *) The 'status' module will now show the process pid's and their
  +     state even without full STATUS accounting. [Jim Jagielski]
  +
     *) Restore the client IP address to the error log messages, this
        was lost during the transition from 1.2 to 1.3.  Add a new
        function ap_log_rerror() which takes a request_rec * and
  
  
  
  1.92      +11 -0     apache-1.3/src/modules/standard/mod_status.c
  
  Index: mod_status.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_status.c,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- mod_status.c	1998/08/06 17:31:14	1.91
  +++ mod_status.c	1998/08/06 17:42:51	1.92
  @@ -241,6 +241,7 @@
       short_score score_record;
       parent_score ps_record;
       char stat_buffer[HARD_SERVER_LIMIT];
  +    int pid_buffer[HARD_SERVER_LIMIT];
       clock_t tu, ts, tcu, tcs;
   
       tu = ts = tcu = tcs = 0;
  @@ -296,6 +297,7 @@
   	ps_record = ap_scoreboard_image->parent[i];
   	res = score_record.status;
   	stat_buffer[i] = status_flags[res];
  +	pid_buffer[i] = (int) ps_record.pid;
   	if (res == SERVER_READY)
   	    ready++;
   	else if (res != SERVER_DEAD)
  @@ -428,6 +430,15 @@
   	ap_rputs("\"<B><code>L</code></B>\" Logging, \n", r);
   	ap_rputs("\"<B><code>G</code></B>\" Gracefully finishing, \n",
r);
   	ap_rputs("\"<B><code>.</code></B>\" Open slot with no current
process<P>\n", r);
  +	ap_rputs("<P>\n", r);
  +	ap_rputs("PID Key: <br>\n", r);
  +	ap_rputs("<UL>\n", r);
  +	for (i = 0; i < HARD_SERVER_LIMIT; ++i) {
  +	    if (stat_buffer[i] != '.')
  +		ap_rprintf(r, "<LI>%d in state: %c <BR>\n", pid_buffer[i],
  +		 stat_buffer[i]);
  +	}
  +	ap_rputs("</UL>\n", r);
       }
   
   #if defined(STATUS)
  
  
  

Mime
View raw message