From: Florian Forster Date: Thu, 11 Jun 2015 16:33:17 +0000 (+0100) Subject: Merge branch 'collectd-5.5' X-Git-Tag: collectd-5.6.0~687 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d143bc65a6984281b7c757fd5ea6ef27af5681bb;hp=13d313acd2c8518fc2967190826305c30c53b76c;p=collectd.git Merge branch 'collectd-5.5' --- diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index 5e83b0f4..fd4cb46f 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -226,7 +226,7 @@ Source: http://collectd.org/files/%{name}-%{version}.tar.bz2 License: GPLv2 Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: libgcrypt-devel, kernel-headers, libtool-ltdl-devel, libcap-devel +BuildRequires: libgcrypt-devel, kernel-headers, libtool-ltdl-devel, libcap-devel, flex, bison Vendor: collectd development team %if 0%{?el7:1} @@ -1585,6 +1585,9 @@ Collectd utilities %define _with_zookeeper --disable-zookeeper %endif +export YACC=bison +export YFLAGS=-y + %configure CFLAGS="%{optflags} -DLT_LAZY_OR_NOW=\"RTLD_LAZY|RTLD_GLOBAL\"" \ --disable-static \ --without-included-ltdl \ diff --git a/src/processes.c b/src/processes.c index a6c50965..4e0aa783 100644 --- a/src/processes.c +++ b/src/processes.c @@ -1849,6 +1849,7 @@ static int ps_read (void) continue; } + memset (&pse, 0, sizeof (pse)); pse.id = pid; pse.age = 0; @@ -2126,6 +2127,7 @@ static int ps_read (void) } } /* if (process has argument list) */ + memset (&pse, 0, sizeof (pse)); pse.id = procs[i].p_pid; pse.age = 0; @@ -2155,6 +2157,9 @@ static int ps_read (void) pse.io_syscr = -1; pse.io_syscw = -1; + pse.cswitch_vol = -1; + pse.cswitch_invol = -1; + ps_list_add (procs[i].p_comm, have_cmdline ? cmdline : NULL, &pse); } /* if ((proc_ptr == NULL) || (proc_ptr->p_pid != procs[i].p_pid)) */ @@ -2370,6 +2375,7 @@ static int ps_read (void) continue; } + memset (&pse, 0, sizeof (pse)); pse.id = pid; pse.age = 0; @@ -2396,6 +2402,9 @@ static int ps_read (void) pse.io_syscr = ps.io_syscr; pse.io_syscw = ps.io_syscw; + pse.cswitch_vol = -1; + pse.cswitch_invol = -1; + switch (state) { case 'R': running++; break;