randy       96/12/09 17:04:08

  Modified:    src       CHANGES mod_status.c
  Log:
  Changes to allow mod_status compile for OS/2
  Submitted by: Gary Smiley
  
  Revision  Changes    Path
  1.80      +2 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -C3 -r1.79 -r1.80
  *** CHANGES   1996/12/09 22:47:31     1.79
  --- CHANGES   1996/12/10 01:04:05     1.80
  ***************
  *** 1,5 ****
  --- 1,7 ----
    Changes with Apache 1.2b2:
    
  +   *) Changes to allow mod_status compile for OS/2
  + 
      *) changes for DEC AXP running OSF/1 v3.0. [Marc Evans]
    
      *) proxy_http.c bugfixes:  [Chuck Murcko]
  
  
  
  1.38      +38 -0     apache/src/mod_status.c
  
  Index: mod_status.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_status.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -C3 -r1.37 -r1.38
  *** mod_status.c      1996/12/09 06:53:15     1.37
  --- mod_status.c      1996/12/10 01:04:06     1.38
  ***************
  *** 322,329 ****
  --- 322,332 ----
        {
            rprintf(r,"Total Accesses: %lu\nTotal kBytes: %lu\n",count,kbcount);
    
  + #ifndef __EMX__
  +     /* Allow for OS/2 not having CPU stats */
        if(ts || tu || tcu || tcs)
            rprintf(r,"CPULoad: %g\n",(tu+ts+tcu+tcs)/tick/up_time*100.);
  + #endif
    
        rprintf(r,"Uptime: %ld\n",(long)(up_time));
        if (up_time>0)
  ***************
  *** 338,349 ****
  --- 341,356 ----
        {
        rprintf(r,"Total accesses: %lu - Total Traffic: ", count);
        format_kbyte_out(r,kbcount);
  + 
  + #ifndef __EMX__
  +     /* Allow for OS/2 not having CPU stats */
        rputs("<br>\n",r);
            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)
            rprintf(r," - %.3g%% CPU load",(tu+ts+tcu+tcs)/tick/up_time*100.);
  + #endif
    
        rputs("<br>\n",r);
    
  ***************
  *** 406,412 ****
  --- 413,424 ----
                if(no_table_report)
                rputs("<p><hr><h2>Server Details</h2>\n\n",r);
        else
  + #ifdef __EMX__
  +             /* Allow for OS/2 not having CPU stats */
  +             rputs("<p>\n\n<table 
border=0><tr><th>Srv<th>PID<th>Acc<th>M\n<th>SS<th>Conn<th>Child<th>Slot<th>Host<th>VHost<th>Request</tr>\n\n",r);
  + #else
                rputs("<p>\n\n<table 
border=0><tr><th>Srv<th>PID<th>Acc<th>M<th>CPU\n<th>SS<th>Conn<th>Child<th>Slot<th>Host<th>VHost<th>Request</tr>\n\n",r);
  + #endif
    
    
        for (i = 0; i<HARD_SERVER_LIMIT; ++i)
  ***************
  *** 455,465 ****
  --- 467,483 ----
                            rputs("Dead",r);
                            break;
                    }
  + #ifdef __EMX__
  +                     /* Allow for OS/2 not having CPU stats */
  +                     rprintf(r,"]\n %s (",
  + #else
  + 
                    rprintf(r,"] u%g s%g cu%g cs%g\n %s (",
                            score_record.times.tms_utime/tick,
                            score_record.times.tms_stime/tick,
                            score_record.times.tms_cutime/tick,
                            score_record.times.tms_cstime/tick,
  + #endif
                            asctime(localtime(&score_record.last_used)));
                    format_byte_out(r,conn_bytes);
                    rputs("|",r);
  ***************
  *** 502,512 ****
  --- 520,535 ----
                            rputs("<td>.",r);
                            break;
                    }
  + #ifdef __EMX__
  +                 /* Allow for OS/2 not having CPU stats */
  +                 rprintf(r,"\n<td>%.0f",
  + #else
                    rprintf(r,"\n<td>%.2f<td>%.0f",
                            (score_record.times.tms_utime +
                            score_record.times.tms_stime +
                            score_record.times.tms_cutime +
                            score_record.times.tms_cstime)/tick,
  + #endif
                            difftime(nowtime, score_record.last_used));
                    rprintf(r,"<td>%-1.1f<td>%-2.2f<td>%-2.2f\n",
                        (float)conn_bytes/KBYTE, (float)my_bytes/MBYTE,
  ***************
  *** 521,526 ****
  --- 544,563 ----
    
        if (!(short_report || no_table_report))
        {
  + #ifdef __EMX__
  +     rputs("</table>\n \
  + <hr> \
  + <table>\n \
  + <tr><th>Srv<td>Server number\n \
  + <tr><th>PID<td>OS process ID\n \
  + <tr><th>Acc<td>Number of accesses this connection / this child / this 
slot\n \
  + <tr><th>M<td>Mode of operation\n \
  + <tr><th>SS<td>Seconds since beginning of most recent request\n \
  + <tr><th>Conn<td>Kilobytes transferred this connection\n \
  + <tr><th>Child<td>Megabytes transferred this child\n \
  + <tr><th>Slot<td>Total megabytes transferred this slot\n \
  + </table>\n",r);
  + #else
        rputs("</table>\n \
    <hr> \
    <table>\n \
  ***************
  *** 534,539 ****
  --- 571,577 ----
    <tr><th>Child<td>Megabytes transferred this child\n \
    <tr><th>Slot<td>Total megabytes transferred this slot\n \
    </table>\n",r);
  + #endif
        }
    
    #else /* !defined(STATUS) */
  
  
  

Reply via email to