Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 571052 Details for
Bug 681934
app-metrics/collectd: apache plugin regression with >=www-servers/apache-2.4.35 mod_status
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
collectd-5.8.1 fix for compatibility with apache-2.4.38-r1
collectd-5.8.1-apache.patch (text/plain), 1.55 KB, created by
Christian Zuckschwerdt
on 2019-03-28 16:46:10 UTC
(
hide
)
Description:
collectd-5.8.1 fix for compatibility with apache-2.4.38-r1
Filename:
MIME Type:
Creator:
Christian Zuckschwerdt
Created:
2019-03-28 16:46:10 UTC
Size:
1.55 KB
patch
obsolete
>diff --git a/src/apache.c b/src/apache.c >index 07b2b57d..7cf061a2 100644 >--- a/src/apache.c >+++ b/src/apache.c >@@ -532,6 +532,7 @@ static int apache_read_host(user_data_t *user_data) /* {{{ */ > > ptr = st->apache_buffer; > saveptr = NULL; >+ int apache_connections = 0, apache_idle_workers = 0; > while ((line = strtok_r(ptr, "\n\r", &saveptr)) != NULL) { > ptr = NULL; > fields_num = strsplit(line, fields, STATIC_ARRAY_SIZE(fields)); >@@ -546,12 +547,17 @@ static int apache_read_host(user_data_t *user_data) /* {{{ */ > } else if (fields_num == 2) { > if (strcmp(fields[0], "Scoreboard:") == 0) > submit_scoreboard(fields[1], st); >- else if ((strcmp(fields[0], "BusyServers:") == 0) /* Apache 1.* */ >- || (strcmp(fields[0], "BusyWorkers:") == 0) /* Apache 2.* */) >+ else if (!apache_connections >+ && ((strcmp(fields[0], "BusyServers:") == 0) /* Apache 1.* */ >+ || (strcmp(fields[0], "BusyWorkers:") == 0)) /* Apache 2.* */) { > submit_gauge("apache_connections", NULL, atol(fields[1]), st); >- else if ((strcmp(fields[0], "IdleServers:") == 0) /* Apache 1.x */ >- || (strcmp(fields[0], "IdleWorkers:") == 0) /* Apache 2.x */) >+ apache_connections++; >+ } else if (!apache_idle_workers >+ && ((strcmp(fields[0], "IdleServers:") == 0) /* Apache 1.x */ >+ || (strcmp(fields[0], "IdleWorkers:") == 0)) /* Apache 2.x */) { > submit_gauge("apache_idle_workers", NULL, atol(fields[1]), st); >+ apache_idle_workers++; >+ } > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 681934
: 571052