Mailing List Archive

cvs commit: apache/src http_main.c mod_status.c scoreboard.h
jim 96/04/06 12:45:10

Modified: src http_main.c mod_status.c scoreboard.h
Log:
use unsigned for status counter for BUSY sites

Revision Changes Path
1.20 +4 -4 apache/src/http_main.c

Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_main.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C3 -r1.19 -r1.20
*** http_main.c 1996/04/02 12:02:15 1.19
--- http_main.c 1996/04/06 20:45:07 1.20
***************
*** 670,677 ****
/*
* Reset individual counters
*/
! new_score_rec.my_access_count = 0;
! new_score_rec.my_bytes_served = 0;
}
if (r) {
int slot_size;
--- 670,677 ----
/*
* Reset individual counters
*/
! new_score_rec.my_access_count = 0L;
! new_score_rec.my_bytes_served = 0L;
}
if (r) {
int slot_size;
***************
*** 723,730 ****

new_score_rec.access_count ++;
new_score_rec.my_access_count ++;
! new_score_rec.bytes_served += (long)bs;
! new_score_rec.my_bytes_served += (long)bs;

times(&new_score_rec.times);

--- 723,730 ----

new_score_rec.access_count ++;
new_score_rec.my_access_count ++;
! new_score_rec.bytes_served += (unsigned long)bs;
! new_score_rec.my_bytes_served += (unsigned long)bs;

times(&new_score_rec.times);




1.10 +8 -8 apache/src/mod_status.c

Index: mod_status.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_status.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C3 -r1.9 -r1.10
*** mod_status.c 1996/04/04 15:10:24 1.9
--- mod_status.c 1996/04/06 20:45:08 1.10
***************
*** 86,92 ****

/* Format the number of bytes nicely */

! void format_byte_out(request_rec *r,long bytes) {
char ss[20];

if (bytes<5196)
--- 86,92 ----

/* Format the number of bytes nicely */

! void format_byte_out(request_rec *r,unsigned long bytes) {
char ss[20];

if (bytes<5196)
***************
*** 134,143 ****
int i,res;
int ready=0;
int busy=0;
! long count=0;
! long lres,bytes;
! long my_lres,my_bytes;
! long bcount=0;
int short_report=0;
server_rec *server = r->server;
short_score score_record;
--- 134,143 ----
int i,res;
int ready=0;
int busy=0;
! unsigned long count=0;
! unsigned long lres,bytes;
! unsigned long my_lres,my_bytes;
! unsigned long bcount=0;
int short_report=0;
server_rec *server = r->server;
short_score score_record;
***************
*** 229,235 ****
my_bytes= score_record.my_bytes_served;
if (lres!=0 || (score_record.status != SERVER_READY && score_record.status != SERVER_DEAD)) {
if (!short_report) {
! sprintf(buffer,"<b>Server %d</b> (%d): %ld|%ld [",
i,(int)score_record.pid,my_lres,lres);
rputs(buffer,r);

--- 229,235 ----
my_bytes= score_record.my_bytes_served;
if (lres!=0 || (score_record.status != SERVER_READY && score_record.status != SERVER_DEAD)) {
if (!short_report) {
! sprintf(buffer,"<b>Server %d</b> (%d): %lu|%lu [",
i,(int)score_record.pid,my_lres,lres);
rputs(buffer,r);

***************
*** 274,283 ****
}
}
if (short_report) {
! sprintf(buffer,"Total Accesses: %ld\nTotal Bytes: %ld\n",count,bcount);
rputs(buffer,r);
} else {
! sprintf(buffer,"<p>Total accesses: %ld u%g s%g cu%g cs%g (",
count,tu/tick,ts/tick,tcu/tick,tcs/tick);
rputs(buffer,r);
format_byte_out(r,bcount);
--- 274,283 ----
}
}
if (short_report) {
! sprintf(buffer,"Total Accesses: %lu\nTotal Bytes: %lu\n",count,bcount);
rputs(buffer,r);
} else {
! sprintf(buffer,"<p>Total accesses: %lu u%g s%g cu%g cs%g (",
count,tu/tick,ts/tick,tcu/tick,tcs/tick);
rputs(buffer,r);
format_byte_out(r,bcount);



1.7 +4 -4 apache/src/scoreboard.h

Index: scoreboard.h
===================================================================
RCS file: /export/home/cvs/apache/src/scoreboard.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C3 -r1.6 -r1.7
*** scoreboard.h 1996/04/01 23:03:31 1.6
--- scoreboard.h 1996/04/06 20:45:08 1.7
***************
*** 73,82 ****
pid_t pid;
char status;
#if defined(STATUS_INSTRUMENTATION)
! long access_count;
! long bytes_served;
! long my_access_count;
! long my_bytes_served;
struct tms times;
time_t last_used;
char client[32]; /* Keep 'em small... */
--- 73,82 ----
pid_t pid;
char status;
#if defined(STATUS_INSTRUMENTATION)
! unsigned long access_count;
! unsigned long bytes_served;
! unsigned long my_access_count;
! unsigned long my_bytes_served;
struct tms times;
time_t last_used;
char client[32]; /* Keep 'em small... */