* include/httpd.h (struct ap_sload_t): Add bytes_served, access_count
fields.
* server/util.c (ap_get_sload): Fill in those fields.
Submitted by: Jan Kaluza <jkaluza redhat.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1393338 13f79535-47bb-0310-9956-
ffa450edef68
int idle;
/* percentage of process/threads busy (0->100) */
int busy;
+ /* total bytes served */
+ apr_off_t bytes_served;
+ /* total access count */
+ unsigned long access_count;
};
/**
/* preload errored fields, we overwrite */
ld->idle = -1;
ld->busy = -1;
+ ld->bytes_served = 0;
+ ld->access_count = 0;
ap_mpm_query(AP_MPMQ_GENERATION, &mpm_generation);
ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &thread_limit);
busy++;
}
}
+
+ if (ap_extended_status && !ps->quiescing && ps->pid) {
+ if (ws->access_count != 0
+ || (res != SERVER_READY && res != SERVER_DEAD)) {
+ ld->access_count += ws->access_count;
+ ld->bytes_served += ws->bytes_served;
+ }
+ }
}
}
total = busy + ready;