You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2012/09/24 20:17:50 UTC

svn commit: r1389506 - in /httpd/httpd/trunk: include/httpd.h modules/generators/mod_status.c server/util.c

Author: jim
Date: Mon Sep 24 18:17:50 2012
New Revision: 1389506

URL: http://svn.apache.org/viewvc?rev=1389506&view=rev
Log:
minor name change, but I expect most will just want/need/use
the current load average, so simplify the name

Modified:
    httpd/httpd/trunk/include/httpd.h
    httpd/httpd/trunk/modules/generators/mod_status.c
    httpd/httpd/trunk/server/util.c

Modified: httpd/httpd/trunk/include/httpd.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?rev=1389506&r1=1389505&r2=1389506&view=diff
==============================================================================
--- httpd/httpd/trunk/include/httpd.h (original)
+++ httpd/httpd/trunk/include/httpd.h Mon Sep 24 18:17:50 2012
@@ -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 */

Modified: httpd/httpd/trunk/modules/generators/mod_status.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_status.c?rev=1389506&r1=1389505&r2=1389506&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_status.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_status.c Mon Sep 24 18:17:50 2012
@@ -423,7 +423,7 @@ static int status_handler(request_rec *r
         ap_rputs("</dt>\n", r);
         ap_get_sload(&t);
         ap_rprintf(r, "<dt>Server load: %.2f %.2f %.2f [%d:%d]</dt>\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) {

Modified: httpd/httpd/trunk/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1389506&r1=1389505&r2=1389506&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util.c (original)
+++ httpd/httpd/trunk/server/util.c Mon Sep 24 18:17:50 2012
@@ -2801,7 +2801,7 @@ AP_DECLARE(void) ap_get_sload(ap_sload_t
     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
 #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];