summaryrefslogtreecommitdiffstats
path: root/collectors/freebsd.plugin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:11 +0000
commit483926a283e118590da3f9ecfa75a8a4d62143ce (patch)
treecb77052778df9a128a8cd3ff5bf7645322a13bc5 /collectors/freebsd.plugin
parentReleasing debian version 1.31.0-4. (diff)
downloadnetdata-483926a283e118590da3f9ecfa75a8a4d62143ce.tar.xz
netdata-483926a283e118590da3f9ecfa75a8a4d62143ce.zip
Merging upstream version 1.32.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/freebsd.plugin')
-rw-r--r--collectors/freebsd.plugin/freebsd_getifaddrs.c2
-rw-r--r--collectors/freebsd.plugin/freebsd_kstat_zfs.c10
-rw-r--r--collectors/freebsd.plugin/freebsd_sysctl.c82
-rw-r--r--collectors/freebsd.plugin/plugin_freebsd.c4
4 files changed, 52 insertions, 46 deletions
diff --git a/collectors/freebsd.plugin/freebsd_getifaddrs.c b/collectors/freebsd.plugin/freebsd_getifaddrs.c
index 1a84902d6..0c0c1e7ab 100644
--- a/collectors/freebsd.plugin/freebsd_getifaddrs.c
+++ b/collectors/freebsd.plugin/freebsd_getifaddrs.c
@@ -144,7 +144,7 @@ int do_getifaddrs(int update_every, usec_t dt) {
(void)dt;
#define DEFAULT_EXCLUDED_INTERFACES "lo*"
-#define DEFAULT_PHYSICAL_INTERFACES "igb* ix* cxl* em* ixl* ixlv* bge* ixgbe* vtnet* vmx* re*"
+#define DEFAULT_PHYSICAL_INTERFACES "igb* ix* cxl* em* ixl* ixlv* bge* ixgbe* vtnet* vmx* re* igc* dwc*"
#define CONFIG_SECTION_GETIFADDRS "plugin:freebsd:getifaddrs"
static int enable_new_interfaces = -1;
diff --git a/collectors/freebsd.plugin/freebsd_kstat_zfs.c b/collectors/freebsd.plugin/freebsd_kstat_zfs.c
index 7d609eafc..8b5cc5799 100644
--- a/collectors/freebsd.plugin/freebsd_kstat_zfs.c
+++ b/collectors/freebsd.plugin/freebsd_kstat_zfs.c
@@ -213,8 +213,8 @@ int do_kstat_zfs_misc_arcstats(int update_every, usec_t dt) {
// missing mib: GETSYSCTL_SIMPLE("kstat.zfs.misc.arcstats.arc_need_free", mibs.arc_need_free, arcstats.arc_need_free);
// missing mib: GETSYSCTL_SIMPLE("kstat.zfs.misc.arcstats.arc_sys_free", mibs.arc_sys_free, arcstats.arc_sys_free);
- generate_charts_arcstats("freebsd", "zfs", show_zero_charts, update_every);
- generate_charts_arc_summary("freebsd", "zfs", show_zero_charts, update_every);
+ generate_charts_arcstats("freebsd.plugin", "zfs", show_zero_charts, update_every);
+ generate_charts_arc_summary("freebsd.plugin", "zfs", show_zero_charts, update_every);
return 0;
}
@@ -252,7 +252,7 @@ int do_kstat_zfs_misc_zio_trim(int update_every, usec_t dt) {
NULL,
"Successfully TRIMmed bytes",
"bytes",
- "freebsd",
+ "freebsd.plugin",
"zfs",
2320,
update_every,
@@ -280,7 +280,7 @@ int do_kstat_zfs_misc_zio_trim(int update_every, usec_t dt) {
NULL,
"TRIM requests",
"requests",
- "freebsd",
+ "freebsd.plugin",
"zfs",
2321,
update_every,
@@ -301,4 +301,4 @@ int do_kstat_zfs_misc_zio_trim(int update_every, usec_t dt) {
}
return 0;
-} \ No newline at end of file
+}
diff --git a/collectors/freebsd.plugin/freebsd_sysctl.c b/collectors/freebsd.plugin/freebsd_sysctl.c
index 7d48e76dc..3dc1fbfb1 100644
--- a/collectors/freebsd.plugin/freebsd_sysctl.c
+++ b/collectors/freebsd.plugin/freebsd_sysctl.c
@@ -641,52 +641,58 @@ int do_hw_intcnt(int update_every, usec_t dt) {
static int mib_hw_intrnames[2] = {0, 0};
static char *intrnames = NULL;
- size = nintr * (MAXCOMLEN + 1);
- if (unlikely(nintr != old_nintr))
- intrnames = reallocz(intrnames, size);
- if (unlikely(GETSYSCTL_WSIZE("hw.intrnames", mib_hw_intrnames, intrnames, size))) {
+ if (unlikely(GETSYSCTL_SIZE("hw.intrnames", mib_hw_intrnames, size))) {
error("DISABLED: system.intr chart");
error("DISABLED: system.interrupts chart");
error("DISABLED: hw.intrcnt module");
return 1;
} else {
+ if (unlikely(nintr != old_nintr))
+ intrnames = reallocz(intrnames, size);
+ if (unlikely(GETSYSCTL_WSIZE("hw.intrnames", mib_hw_intrnames, intrnames, size))) {
+ error("DISABLED: system.intr chart");
+ error("DISABLED: system.interrupts chart");
+ error("DISABLED: hw.intrcnt module");
+ return 1;
+ } else {
- // --------------------------------------------------------------------
-
- static RRDSET *st_interrupts = NULL;
-
- if (unlikely(!st_interrupts))
- st_interrupts = rrdset_create_localhost(
- "system",
- "interrupts",
- NULL,
- "interrupts",
- NULL,
- "System interrupts",
- "interrupts/s",
- "freebsd.plugin",
- "hw.intrcnt",
- NETDATA_CHART_PRIO_SYSTEM_INTERRUPTS,
- update_every,
- RRDSET_TYPE_STACKED
- );
- else
- rrdset_next(st_interrupts);
-
- for (i = 0; i < nintr; i++) {
- void *p;
-
- p = intrnames + i * (MAXCOMLEN + 1);
- if (unlikely((intrcnt[i] != 0) && (*(char *) p != 0))) {
- RRDDIM *rd_interrupts = rrddim_find_active(st_interrupts, p);
-
- if (unlikely(!rd_interrupts))
- rd_interrupts = rrddim_add(st_interrupts, p, NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-
- rrddim_set_by_pointer(st_interrupts, rd_interrupts, intrcnt[i]);
+ // --------------------------------------------------------------------
+
+ static RRDSET *st_interrupts = NULL;
+
+ if (unlikely(!st_interrupts))
+ st_interrupts = rrdset_create_localhost(
+ "system",
+ "interrupts",
+ NULL,
+ "interrupts",
+ NULL,
+ "System interrupts",
+ "interrupts/s",
+ "freebsd.plugin",
+ "hw.intrcnt",
+ NETDATA_CHART_PRIO_SYSTEM_INTERRUPTS,
+ update_every,
+ RRDSET_TYPE_STACKED
+ );
+ else
+ rrdset_next(st_interrupts);
+
+ for (i = 0; i < nintr; i++) {
+ void *p;
+
+ p = intrnames + i * (strlen(intrnames) + 1);
+ if (unlikely((intrcnt[i] != 0) && (*(char *) p != 0))) {
+ RRDDIM *rd_interrupts = rrddim_find_active(st_interrupts, p);
+
+ if (unlikely(!rd_interrupts))
+ rd_interrupts = rrddim_add(st_interrupts, p, NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
+
+ rrddim_set_by_pointer(st_interrupts, rd_interrupts, intrcnt[i]);
+ }
}
+ rrdset_done(st_interrupts);
}
- rrdset_done(st_interrupts);
}
}
diff --git a/collectors/freebsd.plugin/plugin_freebsd.c b/collectors/freebsd.plugin/plugin_freebsd.c
index 17fec4128..97ca1d9ae 100644
--- a/collectors/freebsd.plugin/plugin_freebsd.c
+++ b/collectors/freebsd.plugin/plugin_freebsd.c
@@ -146,7 +146,7 @@ void *freebsd_main(void *ptr)
NULL,
"Netdata FreeBSD plugin CPU usage",
"milliseconds/s",
- "freebsd",
+ "freebsd.plugin",
"stats",
132000,
localhost->rrd_update_every,
@@ -178,7 +178,7 @@ void *freebsd_main(void *ptr)
NULL,
"Netdata FreeBSD plugin modules durations",
"milliseconds/run",
- "freebsd",
+ "freebsd.plugin",
"stats",
132001,
localhost->rrd_update_every,