SHA256
1
0
forked from pool/collectd
collectd/collectd-df-remove-duplicates.patch
Sascha Peilicke f605ba4b85 Accepting request 77989 from server:monitoring
fixes for 12.1- notify-desktop: fix compatibility with libnotify >= 0.7.0
- iptables plugin: use iptables library
- ipvs plugin: disable for >= 12.1, as build fails currently
- df plugin: skip duplicate entries, fixes "uc_update: Value too old"
  error 

- downgrading in-tree iproute2 from 2.6.38 to 2.6.37, as 2.6.38 causes an
  internal error in gcc

- add pinba plugin (through protobuf-c support)
- add rpmlintrc file to suppress false positives
- add collectd-pkgconfig_libnotify_add_gtk.patch to fix building libnotify
  support on >= 11.4

- bump in-tree iproute2 to 2.6.38
- update to 4.10.3:
  * collectd: Threshold subsection: Handling of NAN values in the percentage
    calculation has been fixed
  * collectd, java plugin, ntpd plugin: Several diagnostic messages have been
    improved
  * curl_json plugin: Handling of arrays has been fixed.
  * libvirt plugin: A bug in reading the virtual CPU statistics has been fixed
  * processes plugin: Potentially erroneous behavior has been fixed in an error
    handling case
  * python plugin: Fix dispatching of values from Python scripts to collectd
- changes from 4.10.2:
  * collectd: If including one configuration file fails, continue with the rest
    of the configuration if possible
  * collectd: Fix a bug in the read function scheduling. In rare cases read
    functions may not have been called as often as requested

OBS-URL: https://build.opensuse.org/request/show/77989
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/collectd?expand=0&rev=4
2011-08-04 13:09:29 +00:00

34 lines
823 B
Diff

diff --git a/src/df.c b/src/df.c
index fc80ac3..a6cf37c 100644
--- a/src/df.c
+++ b/src/df.c
@@ -213,6 +213,7 @@ static int df_read (void)
{
unsigned long long blocksize;
char disk_name[256];
+ cu_mount_t *mnt_dup_ptr;
if (ignorelist_match (il_device,
(mnt_ptr->spec_device != NULL)
@@ -224,6 +225,20 @@ static int df_read (void)
if (ignorelist_match (il_fstype, mnt_ptr->type))
continue;
+ /* ignore duplicates */
+ for (mnt_dup_ptr = mnt_ptr; mnt_dup_ptr != NULL; mnt_dup_ptr = mnt_dup_ptr->next)
+ {
+ if (by_device) {
+ if (strcmp (mnt_ptr->spec_device, mnt_dup_ptr->spec_device) == 0)
+ continue;
+ }
+ else
+ {
+ if (strcmp (mnt_ptr->dir, mnt_dup_ptr->dir) == 0)
+ continue;
+ }
+ }
+
if (STATANYFS (mnt_ptr->dir, &statbuf) < 0)
{
char errbuf[1024];