PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) mod_status: Improve server-status output when called with "?auto"
- (machine readable form).
- trunk patch: http://svn.apache.org/r1671396
- http://svn.apache.org/r1672289
- http://svn.apache.org/r1672453
- 2.4.x patch: http://people.apache.org/~rjung/patches/enhance-server-status-auto.patch
- (same as trunk but combined into one)
- +1: rjung, covener, jim
-
*) mod_ssl, mod_proxy, mod_cache_socache, mod_socache_*: Add plain text
output to status hook (server-status) when called with "?auto"
(machine readable form).
ap_rprintf(r, "%.1f GB", (float) kbytes / MBYTE);
}
-static void show_time(request_rec *r, apr_interval_time_t tsecs)
+static void show_time(request_rec *r, apr_uint32_t tsecs)
{
int days, hrs, mins, secs;
{
const char *loc;
apr_time_t nowtime;
- apr_interval_time_t up_time;
+ apr_uint32_t up_time;
+ ap_loadavg_t t;
int j, i, res, written;
int ready;
int busy;
/* up_time in seconds */
up_time = (apr_uint32_t) apr_time_sec(nowtime -
ap_scoreboard_image->global->restart_time);
+ ap_get_loadavg(&t);
if (!short_report) {
- ap_loadavg_t t;
-
ap_rputs(DOCTYPE_HTML_3_2
"<html><head>\n"
"<title>Apache Status</title>\n"
ap_rputs("<dt>Server uptime: ", r);
show_time(r, up_time);
ap_rputs("</dt>\n", r);
- ap_get_loadavg(&t);
ap_rprintf(r, "<dt>Server load: %.2f %.2f %.2f</dt>\n",
t.loadavg, t.loadavg5, t.loadavg15);
}
+ else {
+ ap_rvputs(r, ap_get_server_name(r), "\n", NULL);
+ ap_rvputs(r, "ServerVersion: ",
+ ap_get_server_description(), "\n", NULL);
+ ap_rvputs(r, "ServerMPM: ",
+ ap_show_mpm(), "\n", NULL);
+ ap_rvputs(r, "Server Built: ",
+ ap_get_server_built(), "\n", NULL);
+ ap_rvputs(r, "CurrentTime: ",
+ ap_ht_time(r->pool, nowtime, DEFAULT_TIME_FORMAT, 0),
+ "\n", NULL);
+ ap_rvputs(r, "RestartTime: ",
+ ap_ht_time(r->pool,
+ ap_scoreboard_image->global->restart_time,
+ DEFAULT_TIME_FORMAT, 0),
+ "\n", NULL);
+ ap_rprintf(r, "ParentServerConfigGeneration: %d\n",
+ ap_state_query(AP_SQ_CONFIG_GEN));
+ ap_rprintf(r, "ParentServerMPMGeneration: %d\n",
+ (int)mpm_generation);
+ ap_rprintf(r, "ServerUptimeSeconds: %u\n",
+ up_time);
+ ap_rputs("ServerUptime:", r);
+ show_time(r, up_time);
+ ap_rputs("\n", r);
+ ap_rprintf(r, "Load1: %.2f\nLoad5: %.2f\nLoad15: %.2f\n",
+ t.loadavg, t.loadavg5, t.loadavg15);
+ }
if (ap_extended_status) {
if (short_report) {
#ifdef HAVE_TIMES
/* Allow for OS/2 not having CPU stats */
+ ap_rprintf(r, "CPUUser: %g\nCPUSystem: %g\nCPUChildrenUser: %g\nCPUChildrenSystem: %g\n",
+ tu / tick, ts / tick, tcu / tick, tcs / tick);
+
if (ts || tu || tcu || tcs)
ap_rprintf(r, "CPULoad: %g\n",
(tu + ts + tcu + tcs) / tick / up_time * 100.);