X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Finterface.c;h=ea820399ca0652bc7299d2b24ee4dde9c5569ecd;hp=9501161ce87b4e6cfaeb65cb4c190d238125ffea;hb=d0bb20feb1c5915e8b8af24cc2d46c4ac82d6704;hpb=e6f09ba88ed8258e5bc3eb3834fb841eba77da39 diff --git a/src/interface.c b/src/interface.c index 9501161c..ea820399 100644 --- a/src/interface.c +++ b/src/interface.c @@ -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" */ - 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; }