From: Jim Jagielski Date: Mon, 24 Sep 2012 18:17:50 +0000 (+0000) Subject: minor name change, but I expect most will just want/need/use X-Git-Tag: 2.5.0-alpha~6274 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b69b60f1d2ccb8f7438e2e6700434ff0881883f;p=thirdparty%2Fapache%2Fhttpd.git minor name change, but I expect most will just want/need/use the current load average, so simplify the name git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1389506 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/httpd.h b/include/httpd.h index a012505520f..68184e973bb 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -1304,8 +1304,8 @@ struct server_rec { */ typedef struct ap_sload_t ap_sload_t; struct ap_sload_t { - /* 1 min loadavg, ala getloadavg() */ - float loadavg1; + /* current loadavg, ala getloadavg() */ + float loadavg; /* 5 min loadavg */ float loadavg5; /* 15 min loadavg */ diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index bbd2d5d07a0..db16676f1aa 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -423,7 +423,7 @@ static int status_handler(request_rec *r) ap_rputs("\n", r); ap_get_sload(&t); ap_rprintf(r, "
Server load: %.2f %.2f %.2f [%d:%d]
\n", - t.loadavg1, t.loadavg5, t.loadavg15, t.idle, t.busy); + t.loadavg, t.loadavg5, t.loadavg15, t.idle, t.busy); } if (ap_extended_status) { diff --git a/server/util.c b/server/util.c index d518eadef1a..4926001218f 100644 --- a/server/util.c +++ b/server/util.c @@ -2801,7 +2801,7 @@ AP_DECLARE(void) ap_get_sload(ap_sload_t *ld) ap_generation_t mpm_generation; /* preload errored fields, we overwrite */ - ld->loadavg1 = -1.0; + ld->loadavg = -1.0; ld->loadavg5 = -1.0; ld->loadavg15 = -1.0; ld->idle = -1; @@ -2810,7 +2810,7 @@ AP_DECLARE(void) ap_get_sload(ap_sload_t *ld) #if HAVE_GETLOADAVG num = getloadavg(la, 3); if (num > 0) { - ld->loadavg1 = (float)la[0]; + ld->loadavg = (float)la[0]; } if (num > 1) { ld->loadavg5 = (float)la[1];