Code

Revert "interface plugin: Fix for bogus interfaces under Solaris."
authorFlorian Forster <octo@collectd.org>
Mon, 30 Jan 2012 15:29:13 +0000 (16:29 +0100)
committerFlorian Forster <octo@collectd.org>
Mon, 30 Jan 2012 15:29:13 +0000 (16:29 +0100)
This results in problems on aggregated interfaces, amongst other things.
I guess Solaris users will need to use the "IgnoreSelected" option to
get rid of "bogus" interfaces.

This reverts commit e7a75874a24c1bf19931d5b4b423a0daa7f9be6b.

src/interface.c

index d68240e1d35f95d73ff659c007815f17c4543328..db998a3f783631cfcbfb78bcce68e63a9221b195 100644 (file)
@@ -141,17 +141,11 @@ static int interface_init (void)
        {
                if (strncmp (ksp_chain->ks_class, "net", 3))
                        continue;
-               /* Ignore kstat entry if not the regular statistic set. This
-                * avoids problems with "bogus" interfaces, such as
-                * "wrsmd<num>" */
-               if (strncmp (ksp_chain->ks_name, ksp_chain->ks_module,
-                                       strlen (ksp_chain->ks_module)) != 0)
-                       continue;
                if (ksp_chain->ks_type != KSTAT_TYPE_NAMED)
                        continue;
                if (kstat_read (kc, ksp_chain, NULL) == -1)
                        continue;
-               if ((val = get_kstat_value (ksp_chain, "ifspeed")) == -1LL)
+               if ((val = get_kstat_value (ksp_chain, "obytes")) == -1LL)
                        continue;
                ksp[numif++] = ksp_chain;
        }