summaryrefslogtreecommitdiffstats
path: root/collectors/freebsd.plugin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:30:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:30:37 +0000
commit8a7b72f7cd1ccd547a03eb4243294e741d661d3f (patch)
tree7bc7be4a8e9e298daa1349348400aa2a653866f2 /collectors/freebsd.plugin
parentNew upstream version 1.11.1+dfsg (diff)
downloadnetdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.tar.xz
netdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.zip
Adding upstream version 1.12.0.upstream/1.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/freebsd.plugin')
-rw-r--r--collectors/freebsd.plugin/Makefile.in464
-rw-r--r--collectors/freebsd.plugin/README.md4
-rw-r--r--collectors/freebsd.plugin/freebsd_devstat.c50
-rw-r--r--collectors/freebsd.plugin/freebsd_getifaddrs.c52
-rw-r--r--collectors/freebsd.plugin/freebsd_getmntinfo.c12
-rw-r--r--collectors/freebsd.plugin/freebsd_ipfw.c8
-rw-r--r--collectors/freebsd.plugin/freebsd_kstat_zfs.c112
-rw-r--r--collectors/freebsd.plugin/freebsd_sysctl.c60
8 files changed, 159 insertions, 603 deletions
diff --git a/collectors/freebsd.plugin/Makefile.in b/collectors/freebsd.plugin/Makefile.in
deleted file mode 100644
index d3332677..00000000
--- a/collectors/freebsd.plugin/Makefile.in
+++ /dev/null
@@ -1,464 +0,0 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
-am__make_running_with_option = \
- case $${target_option-} in \
- ?) ;; \
- *) echo "am__make_running_with_option: internal error: invalid" \
- "target option '$${target_option-}' specified" >&2; \
- exit 1;; \
- esac; \
- has_opt=no; \
- sane_makeflags=$$MAKEFLAGS; \
- if $(am__is_gnu_make); then \
- sane_makeflags=$$MFLAGS; \
- else \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- bs=\\; \
- sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
- | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
- esac; \
- fi; \
- skip_next=no; \
- strip_trailopt () \
- { \
- flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
- }; \
- for flg in $$sane_makeflags; do \
- test $$skip_next = yes && { skip_next=no; continue; }; \
- case $$flg in \
- *=*|--*) continue;; \
- -*I) strip_trailopt 'I'; skip_next=yes;; \
- -*I?*) strip_trailopt 'I';; \
- -*O) strip_trailopt 'O'; skip_next=yes;; \
- -*O?*) strip_trailopt 'O';; \
- -*l) strip_trailopt 'l'; skip_next=yes;; \
- -*l?*) strip_trailopt 'l';; \
- -[dEDm]) skip_next=yes;; \
- -[JT]) skip_next=yes;; \
- esac; \
- case $$flg in \
- *$$target_option*) has_opt=yes; break;; \
- esac; \
- done; \
- test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = collectors/freebsd.plugin
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(dist_noinst_DATA)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/build/m4/ax_c___atomic.m4 \
- $(top_srcdir)/build/m4/ax_c__generic.m4 \
- $(top_srcdir)/build/m4/ax_c_lto.m4 \
- $(top_srcdir)/build/m4/ax_c_mallinfo.m4 \
- $(top_srcdir)/build/m4/ax_c_mallopt.m4 \
- $(top_srcdir)/build/m4/ax_check_compile_flag.m4 \
- $(top_srcdir)/build/m4/ax_gcc_func_attribute.m4 \
- $(top_srcdir)/build/m4/ax_pthread.m4 \
- $(top_srcdir)/build/m4/jemalloc.m4 \
- $(top_srcdir)/build/m4/tcmalloc.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-am__v_GEN_1 =
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 =
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-DATA = $(dist_noinst_DATA)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPMIMONITORING_CFLAGS = @IPMIMONITORING_CFLAGS@
-IPMIMONITORING_LIBS = @IPMIMONITORING_LIBS@
-LDFLAGS = @LDFLAGS@
-LIBCAP_CFLAGS = @LIBCAP_CFLAGS@
-LIBCAP_LIBS = @LIBCAP_LIBS@
-LIBMNL_CFLAGS = @LIBMNL_CFLAGS@
-LIBMNL_LIBS = @LIBMNL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MATH_CFLAGS = @MATH_CFLAGS@
-MATH_LIBS = @MATH_LIBS@
-MKDIR_P = @MKDIR_P@
-NFACCT_CFLAGS = @NFACCT_CFLAGS@
-NFACCT_LIBS = @NFACCT_LIBS@
-OBJEXT = @OBJEXT@
-OPTIONAL_IPMIMONITORING_CFLAGS = @OPTIONAL_IPMIMONITORING_CFLAGS@
-OPTIONAL_IPMIMONITORING_LIBS = @OPTIONAL_IPMIMONITORING_LIBS@
-OPTIONAL_LIBCAP_CFLAGS = @OPTIONAL_LIBCAP_CFLAGS@
-OPTIONAL_LIBCAP_LIBS = @OPTIONAL_LIBCAP_LIBS@
-OPTIONAL_MATH_CLFAGS = @OPTIONAL_MATH_CLFAGS@
-OPTIONAL_MATH_LIBS = @OPTIONAL_MATH_LIBS@
-OPTIONAL_NFACCT_CLFAGS = @OPTIONAL_NFACCT_CLFAGS@
-OPTIONAL_NFACCT_LIBS = @OPTIONAL_NFACCT_LIBS@
-OPTIONAL_UUID_CLFAGS = @OPTIONAL_UUID_CLFAGS@
-OPTIONAL_UUID_LIBS = @OPTIONAL_UUID_LIBS@
-OPTIONAL_ZLIB_CLFAGS = @OPTIONAL_ZLIB_CLFAGS@
-OPTIONAL_ZLIB_LIBS = @OPTIONAL_ZLIB_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_RPM_RELEASE = @PACKAGE_RPM_RELEASE@
-PACKAGE_RPM_VERSION = @PACKAGE_RPM_VERSION@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SSE_CANDIDATE = @SSE_CANDIDATE@
-STRIP = @STRIP@
-UUID_CFLAGS = @UUID_CFLAGS@
-UUID_LIBS = @UUID_LIBS@
-VERSION = @VERSION@
-ZLIB_CFLAGS = @ZLIB_CFLAGS@
-ZLIB_LIBS = @ZLIB_LIBS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_target = @build_target@
-build_vendor = @build_vendor@
-builddir = @builddir@
-cachedir = @cachedir@
-chartsdir = @chartsdir@
-configdir = @configdir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-has_jemalloc = @has_jemalloc@
-has_tcmalloc = @has_tcmalloc@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libconfigdir = @libconfigdir@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-nodedir = @nodedir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pluginsdir = @pluginsdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-pythondir = @pythondir@
-registrydir = @registrydir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-varlibdir = @varlibdir@
-webdir = @webdir@
-AUTOMAKE_OPTIONS = subdir-objects
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-dist_noinst_DATA = \
- README.md \
- $(NULL)
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu collectors/freebsd.plugin/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu collectors/freebsd.plugin/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-tags TAGS:
-
-ctags CTAGS:
-
-cscope cscopelist:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
- ctags-am distclean distclean-generic distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags-am uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/collectors/freebsd.plugin/README.md b/collectors/freebsd.plugin/README.md
index e6302f42..237e6092 100644
--- a/collectors/freebsd.plugin/README.md
+++ b/collectors/freebsd.plugin/README.md
@@ -1,3 +1,5 @@
-# freebsd
+# freebsd.plugin
Collects resource usage and performance data on FreeBSD systems
+
+[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcollectors%2Ffreebsd.plugin%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]()
diff --git a/collectors/freebsd.plugin/freebsd_devstat.c b/collectors/freebsd.plugin/freebsd_devstat.c
index 10279aab..81a301e4 100644
--- a/collectors/freebsd.plugin/freebsd_devstat.c
+++ b/collectors/freebsd.plugin/freebsd_devstat.c
@@ -256,7 +256,7 @@ int do_kern_devstat(int update_every, usec_t dt) {
disks_found = 0;
- dstat = devstat_data + sizeof(long); // skip generation number
+ dstat = (struct devstat*)((char*)devstat_data + sizeof(long)); // skip generation number
for (i = 0; i < numdevs; i++) {
if (likely(do_system_io)) {
@@ -360,10 +360,10 @@ int do_kern_devstat(int update_every, usec_t dt) {
disk,
"disk.io",
"Disk I/O Bandwidth",
- "kilobytes/s",
- "freebsd.plugin",
+ "KiB/s",
+ "freebsd.plugin",
"devstat",
- NETDATA_CHART_PRIO_DISK_IO,
+ NETDATA_CHART_PRIO_DISK_IO,
update_every,
RRDSET_TYPE_AREA
);
@@ -398,9 +398,9 @@ int do_kern_devstat(int update_every, usec_t dt) {
"disk.ops",
"Disk Completed I/O Operations",
"operations/s",
- "freebsd.plugin",
- "devstat",
- NETDATA_CHART_PRIO_DISK_OPS,
+ "freebsd.plugin",
+ "devstat",
+ NETDATA_CHART_PRIO_DISK_OPS,
update_every,
RRDSET_TYPE_LINE
);
@@ -437,9 +437,9 @@ int do_kern_devstat(int update_every, usec_t dt) {
"disk.qops",
"Disk Current I/O Operations",
"operations",
- "freebsd.plugin",
+ "freebsd.plugin",
"devstat",
- NETDATA_CHART_PRIO_DISK_QOPS,
+ NETDATA_CHART_PRIO_DISK_QOPS,
update_every,
RRDSET_TYPE_LINE
);
@@ -466,9 +466,9 @@ int do_kern_devstat(int update_every, usec_t dt) {
"disk.util",
"Disk Utilization Time",
"% of time working",
- "freebsd.plugin",
+ "freebsd.plugin",
"devstat",
- NETDATA_CHART_PRIO_DISK_UTIL,
+ NETDATA_CHART_PRIO_DISK_UTIL,
update_every,
RRDSET_TYPE_AREA
);
@@ -499,9 +499,9 @@ int do_kern_devstat(int update_every, usec_t dt) {
"disk.iotime",
"Disk Total I/O Time",
"milliseconds/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"devstat",
- NETDATA_CHART_PRIO_DISK_IOTIME,
+ NETDATA_CHART_PRIO_DISK_IOTIME,
update_every,
RRDSET_TYPE_LINE
);
@@ -546,10 +546,10 @@ int do_kern_devstat(int update_every, usec_t dt) {
disk,
"disk.await",
"Average Completed I/O Operation Time",
- "ms per operation",
- "freebsd.plugin",
+ "milliseconds/operation",
+ "freebsd.plugin",
"devstat",
- NETDATA_CHART_PRIO_DISK_AWAIT,
+ NETDATA_CHART_PRIO_DISK_AWAIT,
update_every,
RRDSET_TYPE_LINE
);
@@ -611,10 +611,10 @@ int do_kern_devstat(int update_every, usec_t dt) {
disk,
"disk.avgsz",
"Average Completed I/O Operation Bandwidth",
- "kilobytes per operation",
- "freebsd.plugin",
+ "KiB/operation",
+ "freebsd.plugin",
"devstat",
- NETDATA_CHART_PRIO_DISK_AVGSZ,
+ NETDATA_CHART_PRIO_DISK_AVGSZ,
update_every,
RRDSET_TYPE_AREA
);
@@ -668,10 +668,10 @@ int do_kern_devstat(int update_every, usec_t dt) {
disk,
"disk.svctm",
"Average Service Time",
- "ms per operation",
- "freebsd.plugin",
+ "milliseconds/operation",
+ "freebsd.plugin",
"devstat",
- NETDATA_CHART_PRIO_DISK_SVCTM,
+ NETDATA_CHART_PRIO_DISK_SVCTM,
update_every,
RRDSET_TYPE_LINE
);
@@ -728,10 +728,10 @@ int do_kern_devstat(int update_every, usec_t dt) {
"disk",
NULL,
"Disk I/O",
- "kilobytes/s",
- "freebsd.plugin",
+ "KiB/s",
+ "freebsd.plugin",
"devstat",
- NETDATA_CHART_PRIO_SYSTEM_IO,
+ NETDATA_CHART_PRIO_SYSTEM_IO,
update_every,
RRDSET_TYPE_AREA
);
diff --git a/collectors/freebsd.plugin/freebsd_getifaddrs.c b/collectors/freebsd.plugin/freebsd_getifaddrs.c
index e1584585..ac1638ee 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_EXLUDED_INTERFACES "lo*"
-#define DEFAULT_PHYSICAL_INTERFACES "igb* ix* cxl* em* ixl* ixlv* bge* ixgbe*"
+#define DEFAULT_PHYSICAL_INTERFACES "igb* ix* cxl* em* ixl* ixlv* bge* ixgbe* vtnet*"
#define CONFIG_SECTION_GETIFADDRS "plugin:freebsd:getifaddrs"
static int enable_new_interfaces = -1;
@@ -156,7 +156,7 @@ int do_getifaddrs(int update_every, usec_t dt) {
enable_new_interfaces = config_get_boolean_ondemand(CONFIG_SECTION_GETIFADDRS,
"enable new interfaces detected at runtime",
CONFIG_BOOLEAN_AUTO);
-
+
do_bandwidth_net = config_get_boolean_ondemand(CONFIG_SECTION_GETIFADDRS, "total bandwidth for physical interfaces",
CONFIG_BOOLEAN_AUTO);
do_packets_net = config_get_boolean_ondemand(CONFIG_SECTION_GETIFADDRS, "total packets for physical interfaces",
@@ -229,7 +229,7 @@ int do_getifaddrs(int update_every, usec_t dt) {
// --------------------------------------------------------------------
if (likely(do_bandwidth_net)) {
-
+
iftot.ift_ibytes = iftot.ift_obytes = 0;
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
if (ifa->ifa_addr->sa_family != AF_LINK)
@@ -239,10 +239,10 @@ int do_getifaddrs(int update_every, usec_t dt) {
iftot.ift_ibytes += IFA_DATA(ibytes);
iftot.ift_obytes += IFA_DATA(obytes);
}
-
+
static RRDSET *st = NULL;
static RRDDIM *rd_in = NULL, *rd_out = NULL;
-
+
if (unlikely(!st)) {
st = rrdset_create_localhost("system",
"net",
@@ -251,23 +251,23 @@ int do_getifaddrs(int update_every, usec_t dt) {
NULL,
"Network Traffic",
"kilobits/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"getifaddrs",
- NETDATA_CHART_PRIO_SYSTEM_NET,
+ NETDATA_CHART_PRIO_SYSTEM_NET,
update_every,
RRDSET_TYPE_AREA
);
-
+
rd_in = rrddim_add(st, "InOctets", "received", 8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
rd_out = rrddim_add(st, "OutOctets", "sent", -8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
} else
rrdset_next(st);
-
+
rrddim_set_by_pointer(st, rd_in, iftot.ift_ibytes);
rrddim_set_by_pointer(st, rd_out, iftot.ift_obytes);
rrdset_done(st);
}
-
+
// --------------------------------------------------------------------
if (likely(do_packets_net)) {
@@ -295,9 +295,9 @@ int do_getifaddrs(int update_every, usec_t dt) {
NULL,
"Network Packets",
"packets/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"getifaddrs",
- NETDATA_CHART_PRIO_SYSTEM_PACKETS,
+ NETDATA_CHART_PRIO_SYSTEM_PACKETS,
update_every,
RRDSET_TYPE_LINE
);
@@ -340,9 +340,9 @@ int do_getifaddrs(int update_every, usec_t dt) {
NULL,
"IPv4 Bandwidth",
"kilobits/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"getifaddrs",
- NETDATA_CHART_PRIO_SYSTEM_IPV4,
+ NETDATA_CHART_PRIO_SYSTEM_IPV4,
update_every,
RRDSET_TYPE_AREA
);
@@ -379,9 +379,9 @@ int do_getifaddrs(int update_every, usec_t dt) {
NULL,
"IPv6 Bandwidth",
"kilobits/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"getifaddrs",
- NETDATA_CHART_PRIO_SYSTEM_IPV6,
+ NETDATA_CHART_PRIO_SYSTEM_IPV6,
update_every,
RRDSET_TYPE_AREA
);
@@ -449,9 +449,9 @@ int do_getifaddrs(int update_every, usec_t dt) {
"net.net",
"Bandwidth",
"kilobits/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"getifaddrs",
- NETDATA_CHART_PRIO_FIRST_NET_IFACE,
+ NETDATA_CHART_PRIO_FIRST_NET_IFACE,
update_every,
RRDSET_TYPE_AREA
);
@@ -478,9 +478,9 @@ int do_getifaddrs(int update_every, usec_t dt) {
"net.packets",
"Packets",
"packets/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"getifaddrs",
- NETDATA_CHART_PRIO_FIRST_NET_PACKETS,
+ NETDATA_CHART_PRIO_FIRST_NET_PACKETS,
update_every,
RRDSET_TYPE_LINE
);
@@ -517,9 +517,9 @@ int do_getifaddrs(int update_every, usec_t dt) {
"net.errors",
"Interface Errors",
"errors/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"getifaddrs",
- NETDATA_CHART_PRIO_FIRST_NET_ERRORS,
+ NETDATA_CHART_PRIO_FIRST_NET_ERRORS,
update_every,
RRDSET_TYPE_LINE
);
@@ -551,9 +551,9 @@ int do_getifaddrs(int update_every, usec_t dt) {
"net.drops",
"Interface Drops",
"drops/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"getifaddrs",
- NETDATA_CHART_PRIO_FIRST_NET_DROPS,
+ NETDATA_CHART_PRIO_FIRST_NET_DROPS,
update_every,
RRDSET_TYPE_LINE
);
@@ -586,9 +586,9 @@ int do_getifaddrs(int update_every, usec_t dt) {
"net.events",
"Network Interface Events",
"events/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"getifaddrs",
- NETDATA_CHART_PRIO_FIRST_NET_EVENTS,
+ NETDATA_CHART_PRIO_FIRST_NET_EVENTS,
update_every,
RRDSET_TYPE_LINE
);
diff --git a/collectors/freebsd.plugin/freebsd_getmntinfo.c b/collectors/freebsd.plugin/freebsd_getmntinfo.c
index c86f2316..d050c627 100644
--- a/collectors/freebsd.plugin/freebsd_getmntinfo.c
+++ b/collectors/freebsd.plugin/freebsd_getmntinfo.c
@@ -226,10 +226,10 @@ int do_getmntinfo(int update_every, usec_t dt) {
mntbuf[i].f_mntonname,
"disk.space",
title,
- "GB",
- "freebsd.plugin",
+ "GiB",
+ "freebsd.plugin",
"getmntinfo",
- NETDATA_CHART_PRIO_DISKSPACE_SPACE,
+ NETDATA_CHART_PRIO_DISKSPACE_SPACE,
update_every,
RRDSET_TYPE_STACKED
);
@@ -265,10 +265,10 @@ int do_getmntinfo(int update_every, usec_t dt) {
mntbuf[i].f_mntonname,
"disk.inodes",
title,
- "Inodes",
- "freebsd.plugin",
+ "inodes",
+ "freebsd.plugin",
"getmntinfo",
- NETDATA_CHART_PRIO_DISKSPACE_INODES,
+ NETDATA_CHART_PRIO_DISKSPACE_INODES,
update_every,
RRDSET_TYPE_STACKED
);
diff --git a/collectors/freebsd.plugin/freebsd_ipfw.c b/collectors/freebsd.plugin/freebsd_ipfw.c
index c256da8b..a1e50e20 100644
--- a/collectors/freebsd.plugin/freebsd_ipfw.c
+++ b/collectors/freebsd.plugin/freebsd_ipfw.c
@@ -197,7 +197,7 @@ int do_ipfw(int update_every, usec_t dt) {
NULL,
"Packets",
"packets/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"ipfw",
NETDATA_CHART_PRIO_IPFW_PACKETS,
update_every,
@@ -214,7 +214,7 @@ int do_ipfw(int update_every, usec_t dt) {
NULL,
"Bytes",
"bytes/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"ipfw",
NETDATA_CHART_PRIO_IPFW_BYTES,
update_every,
@@ -318,7 +318,7 @@ int do_ipfw(int update_every, usec_t dt) {
NULL,
"Active rules",
"rules",
- "freebsd.plugin",
+ "freebsd.plugin",
"ipfw",
NETDATA_CHART_PRIO_IPFW_ACTIVE,
update_every,
@@ -335,7 +335,7 @@ int do_ipfw(int update_every, usec_t dt) {
NULL,
"Expired rules",
"rules",
- "freebsd.plugin",
+ "freebsd.plugin",
"ipfw",
NETDATA_CHART_PRIO_IPFW_EXPIRED,
update_every,
diff --git a/collectors/freebsd.plugin/freebsd_kstat_zfs.c b/collectors/freebsd.plugin/freebsd_kstat_zfs.c
index 93dfc320..02103c6b 100644
--- a/collectors/freebsd.plugin/freebsd_kstat_zfs.c
+++ b/collectors/freebsd.plugin/freebsd_kstat_zfs.c
@@ -11,6 +11,10 @@ extern struct arcstats arcstats;
int do_kstat_zfs_misc_arcstats(int update_every, usec_t dt) {
(void)dt;
+ static int show_zero_charts = -1;
+ if(unlikely(show_zero_charts == -1))
+ show_zero_charts = config_get_boolean_ondemand("plugin:freebsd:zfs_arcstats", "show zero charts", CONFIG_BOOLEAN_NO);
+
unsigned long long l2_size;
size_t uint64_t_size = sizeof(uint64_t);
static struct mibs {
@@ -31,11 +35,11 @@ int do_kstat_zfs_misc_arcstats(int update_every, usec_t dt) {
int deleted[5];
int mutex_miss[5];
int evict_skip[5];
- int evict_not_enough[5];
- int evict_l2_cached[5];
- int evict_l2_eligible[5];
- int evict_l2_ineligible[5];
- int evict_l2_skip[5];
+ // int evict_not_enough[5];
+ // int evict_l2_cached[5];
+ // int evict_l2_eligible[5];
+ // int evict_l2_ineligible[5];
+ // int evict_l2_skip[5];
int hash_elements[5];
int hash_elements_max[5];
int hash_collisions[5];
@@ -46,60 +50,60 @@ int do_kstat_zfs_misc_arcstats(int update_every, usec_t dt) {
int c_min[5];
int c_max[5];
int size[5];
- int hdr_size[5];
- int data_size[5];
- int metadata_size[5];
- int other_size[5];
- int anon_size[5];
- int anon_evictable_data[5];
- int anon_evictable_metadata[5];
+ // int hdr_size[5];
+ // int data_size[5];
+ // int metadata_size[5];
+ // int other_size[5];
+ // int anon_size[5];
+ // int anon_evictable_data[5];
+ // int anon_evictable_metadata[5];
int mru_size[5];
- int mru_evictable_data[5];
- int mru_evictable_metadata[5];
- int mru_ghost_size[5];
- int mru_ghost_evictable_data[5];
- int mru_ghost_evictable_metadata[5];
+ // int mru_evictable_data[5];
+ // int mru_evictable_metadata[5];
+ // int mru_ghost_size[5];
+ // int mru_ghost_evictable_data[5];
+ // int mru_ghost_evictable_metadata[5];
int mfu_size[5];
- int mfu_evictable_data[5];
- int mfu_evictable_metadata[5];
- int mfu_ghost_size[5];
- int mfu_ghost_evictable_data[5];
- int mfu_ghost_evictable_metadata[5];
+ // int mfu_evictable_data[5];
+ // int mfu_evictable_metadata[5];
+ // int mfu_ghost_size[5];
+ // int mfu_ghost_evictable_data[5];
+ // int mfu_ghost_evictable_metadata[5];
int l2_hits[5];
int l2_misses[5];
- int l2_feeds[5];
- int l2_rw_clash[5];
+ // int l2_feeds[5];
+ // int l2_rw_clash[5];
int l2_read_bytes[5];
int l2_write_bytes[5];
- int l2_writes_sent[5];
- int l2_writes_done[5];
- int l2_writes_error[5];
- int l2_writes_lock_retry[5];
- int l2_evict_lock_retry[5];
- int l2_evict_reading[5];
- int l2_evict_l1cached[5];
- int l2_free_on_write[5];
- int l2_cdata_free_on_write[5];
- int l2_abort_lowmem[5];
- int l2_cksum_bad[5];
- int l2_io_error[5];
+ // int l2_writes_sent[5];
+ // int l2_writes_done[5];
+ // int l2_writes_error[5];
+ // int l2_writes_lock_retry[5];
+ // int l2_evict_lock_retry[5];
+ // int l2_evict_reading[5];
+ // int l2_evict_l1cached[5];
+ // int l2_free_on_write[5];
+ // int l2_cdata_free_on_write[5];
+ // int l2_abort_lowmem[5];
+ // int l2_cksum_bad[5];
+ // int l2_io_error[5];
int l2_size[5];
int l2_asize[5];
- int l2_hdr_size[5];
- int l2_compress_successes[5];
- int l2_compress_zeros[5];
- int l2_compress_failures[5];
+ // int l2_hdr_size[5];
+ // int l2_compress_successes[5];
+ // int l2_compress_zeros[5];
+ // int l2_compress_failures[5];
int memory_throttle_count[5];
- int duplicate_buffers[5];
- int duplicate_buffers_size[5];
- int duplicate_reads[5];
- int memory_direct_count[5];
- int memory_indirect_count[5];
- int arc_no_grow[5];
- int arc_tempreserve[5];
- int arc_loaned_bytes[5];
- int arc_prune[5];
- int arc_meta_used[5];
+ // int duplicate_buffers[5];
+ // int duplicate_buffers_size[5];
+ // int duplicate_reads[5];
+ // int memory_direct_count[5];
+ // int memory_indirect_count[5];
+ // int arc_no_grow[5];
+ // int arc_tempreserve[5];
+ // int arc_loaned_bytes[5];
+ // int arc_prune[5];
+ // int arc_meta_used[5];
int arc_meta_limit[5];
int arc_meta_max[5];
int arc_meta_min[5];
@@ -209,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", update_every);
- generate_charts_arc_summary("freebsd", "zfs", update_every);
+ generate_charts_arcstats("freebsd", "zfs", show_zero_charts, update_every);
+ generate_charts_arc_summary("freebsd", "zfs", show_zero_charts, update_every);
return 0;
}
@@ -261,7 +265,7 @@ int do_kstat_zfs_misc_zio_trim(int update_every, usec_t dt) {
rrddim_set_by_pointer(st_bytes, rd_bytes, bytes);
rrdset_done(st_bytes);
-
+
// --------------------------------------------------------------------
static RRDSET *st_requests = NULL;
@@ -293,7 +297,7 @@ int do_kstat_zfs_misc_zio_trim(int update_every, usec_t dt) {
rrddim_set_by_pointer(st_requests, rd_failed, failed);
rrddim_set_by_pointer(st_requests, rd_unsupported, unsupported);
rrdset_done(st_requests);
-
+
}
return 0;
diff --git a/collectors/freebsd.plugin/freebsd_sysctl.c b/collectors/freebsd.plugin/freebsd_sysctl.c
index da5a351d..3f1b1001 100644
--- a/collectors/freebsd.plugin/freebsd_sysctl.c
+++ b/collectors/freebsd.plugin/freebsd_sysctl.c
@@ -276,7 +276,7 @@ int do_vm_vmtotal(int update_every, usec_t dt) {
"system",
NULL,
"Committed (Allocated) Memory",
- "MB",
+ "MiB",
"freebsd.plugin",
"vm.vmtotal",
NETDATA_CHART_PRIO_MEM_SYSTEM_COMMITTED,
@@ -580,7 +580,6 @@ int do_hw_intcnt(int update_every, usec_t dt) {
(void)dt;
static int mib_hw_intrcnt[2] = {0, 0};
size_t intrcnt_size = 0;
- unsigned long i;
if (unlikely(GETSYSCTL_SIZE("hw.intrcnt", mib_hw_intrcnt, intrcnt_size))) {
error("DISABLED: system.intr chart");
@@ -591,7 +590,7 @@ int do_hw_intcnt(int update_every, usec_t dt) {
unsigned long nintr = 0;
static unsigned long old_nintr = 0;
static unsigned long *intrcnt = NULL;
- unsigned long long totalintr = 0;
+ unsigned long i;
nintr = intrcnt_size / sizeof(u_long);
if (unlikely(nintr != old_nintr))
@@ -602,6 +601,8 @@ int do_hw_intcnt(int update_every, usec_t dt) {
error("DISABLED: hw.intrcnt module");
return 1;
} else {
+ unsigned long long totalintr = 0;
+
for (i = 0; i < nintr; i++)
totalintr += intrcnt[i];
@@ -653,7 +654,6 @@ int do_hw_intcnt(int update_every, usec_t dt) {
// --------------------------------------------------------------------
static RRDSET *st_interrupts = NULL;
- void *p;
if (unlikely(!st_interrupts))
st_interrupts = rrdset_create_localhost(
@@ -674,6 +674,8 @@ int do_hw_intcnt(int update_every, usec_t dt) {
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(st_interrupts, p);
@@ -936,7 +938,7 @@ int do_vm_swap_info(int update_every, usec_t dt) {
"swap",
NULL,
"System Swap",
- "MB",
+ "MiB",
"freebsd.plugin",
"vm.swap_info",
NETDATA_CHART_PRIO_SYSTEM_SWAP,
@@ -965,11 +967,14 @@ int do_vm_swap_info(int update_every, usec_t dt) {
int do_system_ram(int update_every, usec_t dt) {
(void)dt;
static int mib_active_count[4] = {0, 0, 0, 0}, mib_inactive_count[4] = {0, 0, 0, 0}, mib_wire_count[4] = {0, 0, 0, 0},
- mib_cache_count[4] = {0, 0, 0, 0}, mib_laundry_count[4] = {0, 0, 0, 0}, mib_vfs_bufspace[2] = {0, 0},
- mib_free_count[4] = {0, 0, 0, 0};
+ mib_cache_count[4] = {0, 0, 0, 0}, mib_vfs_bufspace[2] = {0, 0}, mib_free_count[4] = {0, 0, 0, 0};
vmmeter_t vmmeter_data;
int vfs_bufspace_count;
+#if defined(NETDATA_COLLECT_LAUNDRY)
+ static int mib_laundry_count[4] = {0, 0, 0, 0};
+#endif
+
if (unlikely(GETSYSCTL_SIMPLE("vm.stats.vm.v_active_count", mib_active_count, vmmeter_data.v_active_count) ||
GETSYSCTL_SIMPLE("vm.stats.vm.v_inactive_count", mib_inactive_count, vmmeter_data.v_inactive_count) ||
GETSYSCTL_SIMPLE("vm.stats.vm.v_wire_count", mib_wire_count, vmmeter_data.v_wire_count) ||
@@ -990,7 +995,11 @@ int do_system_ram(int update_every, usec_t dt) {
static RRDSET *st = NULL;
static RRDDIM *rd_free = NULL, *rd_active = NULL, *rd_inactive = NULL, *rd_wired = NULL,
- *rd_cache = NULL, *rd_laundry = NULL, *rd_buffers = NULL;
+ *rd_cache = NULL, *rd_buffers = NULL;
+
+#if defined(NETDATA_COLLECT_LAUNDRY)
+ static RRDDIM *rd_laundry = NULL;
+#endif
if (unlikely(!st)) {
st = rrdset_create_localhost(
@@ -1000,7 +1009,7 @@ int do_system_ram(int update_every, usec_t dt) {
"ram",
NULL,
"System RAM",
- "MB",
+ "MiB",
"freebsd.plugin",
"system.ram",
NETDATA_CHART_PRIO_SYSTEM_RAM,
@@ -1067,7 +1076,7 @@ int do_vm_stats_sys_v_swappgs(int update_every, usec_t dt) {
"swap",
NULL,
"Swap I/O",
- "kilobytes/s",
+ "KiB/s",
"freebsd.plugin",
"vm.stats.vm.v_swappgs",
NETDATA_CHART_PRIO_SYSTEM_SWAPIO,
@@ -1155,7 +1164,7 @@ int do_vm_stats_sys_v_pgfaults(int update_every, usec_t dt) {
int do_kern_ipc_sem(int update_every, usec_t dt) {
(void)dt;
- static int mib_semmni[3] = {0, 0, 0}, mib_sema[3] = {0, 0, 0};
+ static int mib_semmni[3] = {0, 0, 0};
struct ipc_sem {
int semmni;
collected_number sets;
@@ -1170,6 +1179,7 @@ int do_kern_ipc_sem(int update_every, usec_t dt) {
} else {
static struct semid_kernel *ipc_sem_data = NULL;
static int old_semmni = 0;
+ static int mib_sema[3] = {0, 0, 0};
if (unlikely(ipc_sem.semmni != old_semmni)) {
ipc_sem_data = reallocz(ipc_sem_data, sizeof(struct semid_kernel) * ipc_sem.semmni);
@@ -1253,7 +1263,7 @@ int do_kern_ipc_sem(int update_every, usec_t dt) {
int do_kern_ipc_shm(int update_every, usec_t dt) {
(void)dt;
- static int mib_shmmni[3] = {0, 0, 0}, mib_shmsegs[3] = {0, 0, 0};
+ static int mib_shmmni[3] = {0, 0, 0};
struct ipc_shm {
u_long shmmni;
collected_number segs;
@@ -1268,6 +1278,7 @@ int do_kern_ipc_shm(int update_every, usec_t dt) {
} else {
static struct shmid_kernel *ipc_shm_data = NULL;
static u_long old_shmmni = 0;
+ static int mib_shmsegs[3] = {0, 0, 0};
if (unlikely(ipc_shm.shmmni != old_shmmni)) {
ipc_shm_data = reallocz(ipc_shm_data, sizeof(struct shmid_kernel) * ipc_shm.shmmni);
@@ -1327,7 +1338,7 @@ int do_kern_ipc_shm(int update_every, usec_t dt) {
"ipc shared memory",
NULL,
"IPC Shared Memory Segments Size",
- "kilobytes",
+ "KiB",
"freebsd.plugin",
"kern.ipc.shm",
NETDATA_CHART_PRIO_SYSTEM_IPC_SHARED_MEM_SIZE,
@@ -1352,7 +1363,7 @@ int do_kern_ipc_shm(int update_every, usec_t dt) {
int do_kern_ipc_msq(int update_every, usec_t dt) {
(void)dt;
- static int mib_msgmni[3] = {0, 0, 0}, mib_msqids[3] = {0, 0, 0};
+ static int mib_msgmni[3] = {0, 0, 0};
struct ipc_msq {
int msgmni;
collected_number queues;
@@ -1370,6 +1381,7 @@ int do_kern_ipc_msq(int update_every, usec_t dt) {
} else {
static struct msqid_kernel *ipc_msq_data = NULL;
static int old_msgmni = 0;
+ static int mib_msqids[3] = {0, 0, 0};
if (unlikely(ipc_msq.msgmni != old_msgmni)) {
ipc_msq_data = reallocz(ipc_msq_data, sizeof(struct msqid_kernel) * ipc_msq.msgmni);
@@ -1531,12 +1543,6 @@ int do_net_isr(int update_every, usec_t dt) {
do_netisr_per_core = config_get_boolean("plugin:freebsd:net.isr", "netisr per core", 1);
}
- static int mib_workstream[3] = {0, 0, 0}, mib_work[3] = {0, 0, 0};
- int common_error = 0;
- size_t netisr_workstream_size = 0, netisr_work_size = 0;
- unsigned long num_netisr_workstreams = 0, num_netisr_works = 0;
- static struct sysctl_netisr_workstream *netisr_workstream = NULL;
- static struct sysctl_netisr_work *netisr_work = NULL;
static struct netisr_stats {
collected_number dispatched;
collected_number hybrid_dispatched;
@@ -1545,6 +1551,13 @@ int do_net_isr(int update_every, usec_t dt) {
} *netisr_stats = NULL;
if (likely(do_netisr || do_netisr_per_core)) {
+ static int mib_workstream[3] = {0, 0, 0}, mib_work[3] = {0, 0, 0};
+ size_t netisr_workstream_size = 0, netisr_work_size = 0;
+ static struct sysctl_netisr_workstream *netisr_workstream = NULL;
+ static struct sysctl_netisr_work *netisr_work = NULL;
+ unsigned long num_netisr_workstreams = 0, num_netisr_works = 0;
+ int common_error = 0;
+
if (unlikely(GETSYSCTL_SIZE("net.isr.workstream", mib_workstream, netisr_workstream_size))) {
common_error = 1;
} else if (unlikely(GETSYSCTL_SIZE("net.isr.work", mib_work, netisr_work_size))) {
@@ -2034,7 +2047,7 @@ int do_net_inet_tcp_stats(int update_every, usec_t dt) {
rrddim_set_by_pointer(st, rd_failed, tcpstat.tcps_sc_zonefail);
rrdset_done(st);
}
-
+
// --------------------------------------------------------------------
if(do_tcpext_listen == CONFIG_BOOLEAN_YES || (do_tcpext_listen == CONFIG_BOOLEAN_AUTO && tcpstat.tcps_listendrop)) {
@@ -2243,7 +2256,6 @@ int do_net_inet_icmp_stats(int update_every, usec_t dt) {
if (likely(do_icmp_packets || do_icmp_errors || do_icmpmsg)) {
static int mib[4] = {0, 0, 0, 0};
struct icmpstat icmpstat;
- int i;
struct icmp_total {
u_long msgs_in;
u_long msgs_out;
@@ -2259,6 +2271,8 @@ int do_net_inet_icmp_stats(int update_every, usec_t dt) {
error("DISABLED: net.inet.icmp.stats module");
return 1;
} else {
+ int i;
+
for (i = 0; i <= ICMP_MAXTYPE; i++) {
icmp_total.msgs_in += icmpstat.icps_inhist[i];
icmp_total.msgs_out += icmpstat.icps_outhist[i];
@@ -2668,7 +2682,7 @@ int do_net_inet6_ip6_stats(int update_every, usec_t dt) {
NULL,
"IPv6 Fragments Sent",
"packets/s",
- "freebsd.plugin",
+ "freebsd.plugin",
"net.inet6.ip6.stats",
3010,
update_every,