From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Aug 26 10:50:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2491C1FB for ; Mon, 26 Aug 2013 10:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E9B223E9 for ; Mon, 26 Aug 2013 10:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QAo1in061507 for ; Mon, 26 Aug 2013 10:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7QAo1lb061506; Mon, 26 Aug 2013 10:50:01 GMT (envelope-from gnats) Date: Mon, 26 Aug 2013 10:50:01 GMT Message-Id: <201308261050.r7QAo1lb061506@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org Cc: From: Krzysztof Stryjek Subject: Re: ports/181443: [patch] net-mgmt/collectd5: Update to 5.4.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Krzysztof Stryjek List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 10:50:02 -0000 The following reply was made to PR ports/181443; it has been noted by GNATS. From: Krzysztof Stryjek To: bug-followup@FreeBSD.org Cc: brd@FreeBSD.org Subject: Re: ports/181443: [patch] net-mgmt/collectd5: Update to 5.4.0 Date: Mon, 26 Aug 2013 12:41:04 +0200 --xFAlB6MquX7/xpZD Content-Type: multipart/mixed; boundary="5G+Imvfxoe+o1e80" Content-Disposition: inline --5G+Imvfxoe+o1e80 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, On Wed, Aug 21, 2013 at 09:51:53AM +0200, Krzysztof Stryjek wrote: > Hello, >=20 > On Wed, Aug 21, 2013 at 04:30:08AM +0000, Edwin Groothuis wrote: > > Maintainer of net-mgmt/collectd5, > >=20 > > Please note that PR ports/181443 has just been submitted. > >=20 > > If it contains a patch for an upgrade, an enhancement or a bug fix > > you agree on, reply to this email stating that you approve the patch > > and a committer will take care of it. > >=20 > > The full text of the PR can be found at: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/181443 > >=20 > I have to check this patch. Specially I have to consult ZFS support to > make sure that it will be working. So till now I *can not* improve this > PR. Please be patient some days. >=20 I've made some modifications to this PR, so new patch is attached to this email. Also I've checked this port on 8.4 box, so it should compile without problems. So please commit this patch :-))) Greetings, --=20 Krzysztof Stryjek UNIX administrator/Juniper Networks Specialist email: wtp (at) bsdserwis (dot) com http://www.linkedin.com/in/KrzysztofStryjek GPG fingerprint: 8BD7 40CE 8994 0BBE CE6C 91CD 1292 8959 DC61 0E76 In theory, there is no difference between theory and practice. In practice, there is. --5G+Imvfxoe+o1e80 Content-Type: text/x-diff; charset=iso-8859-2 Content-Description: collectd-540.patch.txt Content-Disposition: attachment; filename="c540.patch" Content-Transfer-Encoding: quoted-printable diff -ruN net-mgmt/collectd5/Makefile net-mgmt/collectd5.new/Makefile --- net-mgmt/collectd5/Makefile 2013-08-04 15:05:44.000000000 +0200 +++ net-mgmt/collectd5.new/Makefile 2013-08-26 12:23:32.000000000 +0200 @@ -2,22 +2,27 @@ # $FreeBSD: net-mgmt/collectd5/Makefile 324229 2013-08-04 13:05:44Z wg $ =20 PORTNAME=3D collectd -PORTVERSION=3D 5.3.0 -PORTREVISION=3D 4 +PORTVERSION=3D 5.4.0 CATEGORIES=3D net-mgmt MASTER_SITES=3D http://collectd.org/files/ =20 MAINTAINER=3D ports@bsdserwis.com COMMENT=3D Systems & network statistics collection daemon =20 -USES=3D gmake +USES=3D gmake pkgconfig USE_BZIP2=3D yes GNU_CONFIGURE=3D yes -USE_AUTOTOOLS=3D autoconf autoheader automake libltdl +USE_AUTOTOOLS=3D aclocal autoconf autoheader automake libltdl libtool +USE_GNOME=3D glib20 =20 LATEST_LINK=3D collectd5 =20 -OPTIONS_DEFINE=3D CGI CURL DEBUG DBI GCRYPT JSON MEMCACHEC MODBUS MYSQL N= OTIFYEMAIL NUTUPS PGSQL PING PYTHON REDIS ROUTEROS RRDTOOL SNMP STATGRAB TO= KYOTYRANT VIRT XML XMMS +OPTIONS_DEFINE=3D CGI DEBUG GCRYPT VIRT +OPTIONS_GROUP=3D INPUT OUTPUT +OPTIONS_GROUP_OUTPUT=3D RRDTOOL NOTIFYEMAIL NOTIFYDESKTOP +OPTIONS_GROUP_INPUT=3D CURL DBI JSON MEMCACHEC MODBUS MYSQL \ + NUTUPS PGSQL PING PYTHON REDIS ROUTEROS \ + SNMP STATGRAB TOKYOTYRANT XML XMMS =20 CGI_DESC=3D Install collection.cgi (requires rrdtool) CURL_DESC=3D Enable curl-based plugins (apache, nginx, etc) @@ -28,6 +33,8 @@ MEMCACHEC_DESC=3D Enable memcachec plugin MODBUS_DESC=3D Enable modbus plugin MYSQL_DESC=3D Enable mysql-based plugins +NOTIFYEMAIL_DESC=3D Email notifications (libesmtp) +NOTIFYDESKTOP_DESC=3D Email notifications (libnotify) NUTUPS_DESC=3D Enable nut (ups) plugin PGSQL_DESC=3D Enable postgresql-based plugins PING_DESC=3D Enable ping plugin @@ -237,13 +244,22 @@ PLIST_SUB+=3D MYSQL=3D"@comment " .endif =20 +.if ${PORT_OPTIONS:MNOTIFYDESKTOP} +LIB_DEPENDS+=3D notify:${PORTSDIR}/devel/libnotify +CONFIGURE_ARGS+=3D--with-libnotify=3D${LOCALBASE} \ + --enable-notify_desktop +PLIST_SUB+=3D NOTIFYDESKTOP=3D"" +.else +CONFIGURE_ARGS+=3D--disable-notify_desktop +PLIST_SUB+=3D NOTIFYDESKTOP=3D"@comment " +.endif + .if ${PORT_OPTIONS:MNOTIFYEMAIL} LIB_DEPENDS+=3D esmtp:${PORTSDIR}/mail/libesmtp -LIB_DEPENDS+=3D notify:${PORTSDIR}/devel/libnotify CONFIGURE_ARGS+=3D--with-libesmtp=3D${LOCALBASE} \ - --with-libnotify=3D${LOCALBASE} \ --enable-notify_email PLIST_SUB+=3D NOTIFYEMAIL=3D"" +CONFIGURE_ARGS+=3D--disable-notify_email .else PLIST_SUB+=3D NOTIFYEMAIL=3D"@comment " .endif @@ -401,4 +417,7 @@ fi .endif =20 +pre-configure: + @(cd ${WRKSRC} && ${AUTORECONF}) + .include diff -ruN net-mgmt/collectd5/distinfo net-mgmt/collectd5.new/distinfo --- net-mgmt/collectd5/distinfo 2013-06-20 05:02:07.000000000 +0200 +++ net-mgmt/collectd5.new/distinfo 2013-08-26 12:08:53.000000000 +0200 @@ -1,2 +1,2 @@ -SHA256 (collectd-5.3.0.tar.bz2) =3D 5b04150f3c79f90f1a610ed22a2287ef5d8a07= dcc2d0fa7a6a650edd9dc1ea01 -SIZE (collectd-5.3.0.tar.bz2) =3D 1501308 +SHA256 (collectd-5.4.0.tar.bz2) =3D 90973894a1f10775d409fe23ce7bc4d89c1b7c= 6f4d9918b305d160605871923e +SIZE (collectd-5.4.0.tar.bz2) =3D 1506520 diff -ruN net-mgmt/collectd5/files/patch-configure.in net-mgmt/collectd5.ne= w/files/patch-configure.in --- net-mgmt/collectd5/files/patch-configure.in 2013-06-20 05:02:07.0000000= 00 +0200 +++ net-mgmt/collectd5.new/files/patch-configure.in 2013-08-26 12:08:53.000= 000000 +0200 @@ -1,16 +1,6 @@ ---- ./configure.in.orig 2013-05-21 21:43:30.000000000 +0000 -+++ ./configure.in 2013-05-21 21:43:14.000000000 +0000 -@@ -74,6 +74,9 @@ - *openbsd*) - ac_system=3D"OpenBSD" - ;; -+ *freebsd*) -+ ac_system=3D"FreeBSD" -+ ;; - *aix*) - AC_DEFINE([KERNEL_AIX], 1, [True if program is to be compiled for a AIX = kernel]) - ac_system=3D"AIX" -@@ -106,7 +109,7 @@ +--- configure.in.orig 2013-08-18 04:24:25.049973000 -0600 ++++ configure.in 2013-08-19 10:46:53.000000000 -0600 +@@ -110,7 +110,7 @@ fi =20 # Where to install .pc files. @@ -19,7 +9,7 @@ AC_SUBST(pkgconfigdir) =20 # Check for standards compliance mode -@@ -1413,6 +1416,7 @@ +@@ -1419,6 +1419,7 @@ then AC_CHECK_LIB(kstat, kstat_open, [with_kstat=3D"yes"], [with_kstat=3D"no = (libkstat not found)"], []) fi @@ -27,7 +17,7 @@ if test "x$with_kstat" =3D "xyes" then AC_CHECK_LIB(devinfo, di_init, [with_devinfo=3D"yes"], [with_devinfo=3D"= no (not found)"], []) -@@ -1422,6 +1426,8 @@ +@@ -1428,6 +1429,8 @@ then AC_DEFINE(HAVE_LIBKSTAT, 1, [Define to 1 if you have the 'kstat' library (-lkstat)]) @@ -36,7 +26,7 @@ fi AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" =3D "xyes") AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" =3D "xyes") -@@ -1841,12 +1847,6 @@ +@@ -1904,12 +1907,6 @@ AC_CHECK_LIB(gcrypt, gcry_md_hash_buffer, [with_libgcrypt=3D"yes"], [with_libgcrypt=3D"no (symbol gcry_md_hash_buffer not found)"]) @@ -49,7 +39,7 @@ fi =20 CPPFLAGS=3D"$SAVE_CPPFLAGS" -@@ -3408,7 +3408,7 @@ +@@ -3454,7 +3451,7 @@ if test "x$with_python" =3D "xyes" then AC_MSG_CHECKING([for Python LIBS]) @@ -58,7 +48,7 @@ python_config_status=3D$? =20 if test "$python_config_status" -ne 0 || test "x$python_library_flags" = =3D "x" -@@ -3423,7 +3423,7 @@ +@@ -3469,7 +3466,7 @@ if test "x$with_python" =3D "xyes" then LDFLAGS=3D"-L$python_library_path $LDFLAGS" @@ -67,7 +57,7 @@ =20 AC_CHECK_FUNC(PyObject_CallFunction, [with_python=3D"yes"], -@@ -4168,7 +4168,7 @@ +@@ -4339,7 +4336,7 @@ then AC_MSG_NOTICE([Not checking for libvarnish: Manually configured]) with_libvarnish_cflags=3D"-I$withval/include" @@ -76,28 +66,3 @@ with_libvarnish=3D"yes" fi; fi; fi ], -@@ -4693,6 +4693,12 @@ - plugin_zfs_arc=3D"yes" - fi -=20 -+# FreeBSD -+if test "x$have_struct_kinfo_proc_freebsd" =3D "xyes" -+then -+ plugin_zfs_arc=3D"yes" -+fi -+ - if test "x$with_devinfo$with_kstat" =3D "xyesyes" - then - plugin_cpu=3D"yes" -@@ -4866,6 +4872,12 @@ - plugin_users=3D"yes" - fi -=20 -+# FreeBSD -+if test "x$have_struct_kinfo_proc_freebsd" =3D "xyes" -+then -+ plugin_zfs_arc=3D"yes" -+fi -+ - m4_divert_once([HELP_ENABLE], [ - collectd plugins:]) diff -ruN net-mgmt/collectd5/files/patch-src__Makefile.am net-mgmt/collectd= 5.new/files/patch-src__Makefile.am --- net-mgmt/collectd5/files/patch-src__Makefile.am 2013-06-20 05:02:07.000= 000000 +0200 +++ net-mgmt/collectd5.new/files/patch-src__Makefile.am 2013-08-26 12:08:53= =2E000000000 +0200 @@ -1,5 +1,5 @@ ---- ./src/Makefile.am.orig 2013-04-10 15:34:36.000000000 +0000 -+++ ./src/Makefile.am 2013-05-21 23:57:02.000000000 +0000 +--- src/Makefile.am.orig 2013-08-18 04:24:25.061973000 -0600 ++++ src/Makefile.am 2013-08-20 21:34:14.000000000 -0600 @@ -10,7 +10,7 @@ AM_CPPFLAGS =3D -DPREFIX=3D'"${prefix}"' AM_CPPFLAGS +=3D -DCONFIGFILE=3D'"${sysconfdir}/${PACKAGE_NAME}.conf"' @@ -18,7 +18,7 @@ endif if BUILD_WITH_LIBDEVINFO collectd_LDADD +=3D -ldevinfo -@@ -257,7 +257,7 @@ +@@ -275,7 +275,7 @@ cpu_la_LDFLAGS =3D -module -avoid-version cpu_la_LIBADD =3D=20 if BUILD_WITH_LIBKSTAT @@ -27,7 +27,7 @@ endif if BUILD_WITH_LIBDEVINFO cpu_la_LIBADD +=3D -ldevinfo -@@ -355,7 +355,7 @@ +@@ -373,7 +373,7 @@ disk_la_LDFLAGS =3D -module -avoid-version disk_la_LIBADD =3D=20 if BUILD_WITH_LIBKSTAT @@ -36,7 +36,7 @@ endif if BUILD_WITH_LIBDEVINFO disk_la_LIBADD +=3D -ldevinfo -@@ -462,7 +462,7 @@ +@@ -480,7 +480,7 @@ interface_la_LIBADD +=3D $(BUILD_WITH_LIBSTATGRAB_LDFLAGS) else if BUILD_WITH_LIBKSTAT @@ -45,7 +45,7 @@ endif if BUILD_WITH_LIBDEVINFO interface_la_LIBADD +=3D -ldevinfo -@@ -667,7 +667,7 @@ +@@ -694,7 +694,7 @@ collectd_LDADD +=3D "-dlopen" memory.la collectd_DEPENDENCIES +=3D memory.la if BUILD_WITH_LIBKSTAT @@ -54,7 +54,7 @@ endif if BUILD_WITH_LIBDEVINFO memory_la_LIBADD +=3D -ldevinfo -@@ -796,7 +796,7 @@ +@@ -823,7 +823,7 @@ pkglib_LTLIBRARIES +=3D notify_email.la notify_email_la_SOURCES =3D notify_email.c notify_email_la_LDFLAGS =3D -module -avoid-version @@ -63,7 +63,7 @@ collectd_LDADD +=3D "-dlopen" notify_email.la collectd_DEPENDENCIES +=3D notify_email.la endif -@@ -1061,7 +1061,7 @@ +@@ -1108,7 +1108,7 @@ collectd_LDADD +=3D "-dlopen" swap.la collectd_DEPENDENCIES +=3D swap.la if BUILD_WITH_LIBKSTAT @@ -72,7 +72,7 @@ endif if BUILD_WITH_LIBDEVINFO swap_la_LIBADD +=3D -ldevinfo -@@ -1115,7 +1115,7 @@ +@@ -1162,7 +1162,7 @@ pkglib_LTLIBRARIES +=3D tape.la tape_la_SOURCES =3D tape.c tape_la_LDFLAGS =3D -module -avoid-version @@ -81,7 +81,7 @@ collectd_LDADD +=3D "-dlopen" tape.la collectd_DEPENDENCIES +=3D tape.la endif -@@ -1238,7 +1238,7 @@ +@@ -1285,7 +1285,7 @@ uptime_la_LDFLAGS =3D -module -avoid-version uptime_la_LIBADD =3D if BUILD_WITH_LIBKSTAT @@ -90,16 +90,7 @@ endif if BUILD_WITH_PERFSTAT uptime_la_LIBADD +=3D -lperfstat -@@ -1375,7 +1375,7 @@ - zfs_arc_la_SOURCES =3D zfs_arc.c - zfs_arc_la_CFLAGS =3D $(AM_CFLAGS) - zfs_arc_la_LDFLAGS =3D -module -avoid-version --zfs_arc_la_LIBADD =3D -lkstat -+zfs_arc_la_LIBADD =3D $(BUILD_WITH_LIBKSTAT_LIBS) - collectd_LDADD +=3D "-dlopen" zfs_arc.la - collectd_DEPENDENCIES +=3D zfs_arc.la - endif -@@ -1458,12 +1458,7 @@ +@@ -1519,12 +1519,7 @@ =20 install-exec-hook: $(mkinstalldirs) $(DESTDIR)$(sysconfdir) diff -ruN net-mgmt/collectd5/files/patch-src__zfs_arc.c net-mgmt/collectd5.= new/files/patch-src__zfs_arc.c --- net-mgmt/collectd5/files/patch-src__zfs_arc.c 2013-06-20 05:02:07.00000= 0000 +0200 +++ net-mgmt/collectd5.new/files/patch-src__zfs_arc.c 2013-08-26 12:08:53.0= 00000000 +0200 @@ -1,220 +0,0 @@ -diff --git src/zfs_arc.c src/zfs_arc.c -index aa90019..17e8513 100644 ---- src/zfs_arc.c -+++ src/zfs_arc.c -@@ -19,6 +19,8 @@ - * Authors: - * Anthony Dewhurst - * Aurelien Rougemont -+ * Brad Davis -+ * William Grzybowski - **/ -=20 - #include "collectd.h" -@@ -29,7 +31,14 @@ - * Global variables - */ -=20 -+#if defined(HAVE_LIBKSTAT) -+static kstat_t *ksp; - extern kstat_ctl_t *kc; -+#elif defined(HAVE_SYSCTLBYNAME) -+ typedef void kstat_t; -+# include -+# include -+#endif /* HAVE_SYSCTLBYNAME */ -=20 - static void za_submit (const char* type, const char* type_instance, value= _t* values, int values_len) - { -@@ -57,37 +66,56 @@ static void za_submit_gauge (const char* type, const c= har* type_instance, gauge_ - static int za_read_derive (kstat_t *ksp, const char *kstat_value, - const char *type, const char *type_instance) - { -- long long tmp; -- value_t v; -- -- tmp =3D get_kstat_value (ksp, (char *)kstat_value); -- if (tmp =3D=3D -1LL) -- { -- ERROR ("zfs_arc plugin: Reading kstat value \"%s\" failed.", kstat_va= lue); -- return (-1); -- } -- -- v.derive =3D (derive_t) tmp; -- za_submit (type, type_instance, /* values =3D */ &v, /* values_num =3D = */ 1); -- return (0); -+ long long tmp; -+ value_t v; -+ -+#if defined(HAVE_LIBKSTAT) -+ tmp =3D get_kstat_value (ksp, (char *)kstat_value); -+ if (tmp =3D=3D -1LL) -+ { -+ ERROR ("zfs_arc plugin: Reading kstat value \"%s\" failed.", kstat_valu= e); -+ return (-1); -+ } -+#elif defined(HAVE_SYSCTLBYNAME) -+ size_t size; -+ size =3D sizeof(tmp); -+ if (sysctlbyname(kstat_value, &tmp, &size, NULL, 0) < 0) { -+ ERROR ("zfs_arc plugin: Reading sysctl \"%s\" failed.", kstat_value); -+ return (-1); -+ } -+#endif /* HAVE_LIBKSTAT */ -+ -+ v.derive =3D (derive_t) tmp; -+ za_submit (type, type_instance, /* values =3D */ &v, /* values_num =3D *= / 1); -+ return (0); - } -=20 - static int za_read_gauge (kstat_t *ksp, const char *kstat_value, - const char *type, const char *type_instance) - { -- long long tmp; -- value_t v; -- -- tmp =3D get_kstat_value (ksp, (char *)kstat_value); -- if (tmp =3D=3D -1LL) -- { -- ERROR ("zfs_arc plugin: Reading kstat value \"%s\" failed.", kstat_va= lue); -- return (-1); -- } -- -- v.gauge =3D (gauge_t) tmp; -- za_submit (type, type_instance, /* values =3D */ &v, /* values_num =3D = */ 1); -- return (0); -+ long long tmp; -+ value_t v; -+ -+#if defined(HAVE_LIBKSTAT) -+ tmp =3D get_kstat_value (ksp, (char *)kstat_value); -+ if (tmp =3D=3D -1LL) -+ { -+ ERROR ("zfs_arc plugin: Reading kstat value \"%s\" failed.", kstat_valu= e); -+ return (-1); -+ } -+ -+#elif defined(HAVE_SYSCTLBYNAME) -+ size_t size; -+ size =3D sizeof(tmp); -+ if (sysctlbyname(kstat_value, &tmp, &size, NULL, 0) < 0) { -+ ERROR ("zfs_arc plugin: Reading sysctl \"%s\" failed.", kstat_value); -+ return (-1); -+ } -+#endif /* HAVE_LIBKSTAT */ -+ -+ v.gauge =3D (gauge_t) tmp; -+ za_submit (type, type_instance, /* values =3D */ &v, /* values_num =3D *= / 1); -+ return (0); - } -=20 - static void za_submit_ratio (const char* type_instance, gauge_t hits, gau= ge_t misses) -@@ -105,11 +133,67 @@ static void za_submit_ratio (const char* type_instan= ce, gauge_t hits, gauge_t mi - za_submit_gauge ("cache_ratio", type_instance, ratio); - } -=20 --static int za_read (void) -+#if defined(HAVE_SYSCTLBYNAME) -+static int za_read_freebsd (void) -+{ -+ // Sizes -+ za_read_gauge (NULL, "kstat.zfs.misc.arcstats.size", "cache_size", "arc"= ); -+ za_read_gauge (NULL, "kstat.zfs.misc.arcstats.l2_size", "cache_size", "L= 2"); -+ -+ /* Operations */ -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.allocated", "cache_operat= ion", "allocated"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.deleted", "cache_operat= ion", "deleted"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.stolen", "cache_operat= ion", "stolen"); -+ -+ /* Issue indicators */ -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.mutex_miss", "mutex_= operation", "miss"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.hash_collisions", "hash_c= ollisions", ""); -+ -+ /* Evictions */ -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.evict_l2_cached", "ca= che_eviction", "cached"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.evict_l2_eligible", "ca= che_eviction", "eligible"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.evict_l2_ineligible", "ca= che_eviction", "ineligible"); -+ -+ /* Hits / misses */ -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.demand_data_hits", = "cache_result", "demand_data-hit"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.demand_metadata_hits", = "cache_result", "demand_metadata-hit"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.prefetch_data_hits", = "cache_result", "prefetch_data-hit"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.prefetch_metadata_hits", = "cache_result", "prefetch_metadata-hit"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.demand_data_misses", = "cache_result", "demand_data-miss"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.demand_metadata_misses", = "cache_result", "demand_metadata-miss"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.prefetch_data_misses", = "cache_result", "prefetch_data-miss"); -+ za_read_derive (NULL, "kstat.zfs.misc.arcstats.prefetch_metadata_misses"= , "cache_result", "prefetch_metadata-miss"); -+ -+ /* Ratios */ -+ gauge_t arc_hits; -+ gauge_t arc_misses; -+ gauge_t l2_hits; -+ gauge_t l2_misses; -+ value_t l2_io[2]; -+ -+ size_t size; -+ size =3D sizeof(arc_hits); -+ sysctlbyname("kstat.zfs.misc.arcstats.hits", &arc_hits, &size, NULL, 0); -+ sysctlbyname("kstat.zfs.misc.arcstats.misses", &arc_misses, &size, NULL,= 0); -+ sysctlbyname("kstat.zfs.misc.arcstats.l2_hits", &l2_hits, &size, NULL, 0= ); -+ sysctlbyname("kstat.zfs.misc.arcstats.l2_misses", &l2_misses, &size, NUL= L, 0); -+ -+ za_submit_ratio ("arc", arc_hits, arc_misses); -+ za_submit_ratio ("L2", l2_hits, l2_misses); -+ -+ /* I/O */ -+ sysctlbyname("kstat.zfs.misc.arcstats.l2_read_bytes", &l2_io[0].derive, = &size, NULL, 0); -+ sysctlbyname("kstat.zfs.misc.arcstats.l2_write_bytes", &l2_io[1].derive,= &size, NULL, 0); -+ -+ za_submit ("io_octets", "L2", l2_io, /* num values =3D */ 2); -+ -+ return (0); -+} -+#elif defined(HAVE_LIBKSTAT) -+static int za_read_solaris (void) - { - gauge_t arc_hits, arc_misses, l2_hits, l2_misses; - value_t l2_io[2]; -- kstat_t *ksp =3D NULL; -=20 - get_kstat (&ksp, "zfs", 0, "arcstats"); - if (ksp =3D=3D NULL) -@@ -163,15 +247,20 @@ static int za_read (void) -=20 - return (0); - } /* int za_read */ -+#endif -=20 - static int za_init (void) /* {{{ */ - { -+#if defined(HAVE_LIBKSTAT) -+ ksp =3D NULL; -+ - /* kstats chain already opened by update_kstat (using *kc), verify every= thing went fine. */ - if (kc =3D=3D NULL) - { - ERROR ("zfs_arc plugin: kstat chain control structure not available."); - return (-1); - } -+#endif /* HAVE_LIBKSTAT */ -=20 - return (0); - } /* }}} int za_init */ -@@ -179,7 +268,16 @@ static int za_init (void) /* {{{ */ - void module_register (void) - { - plugin_register_init ("zfs_arc", za_init); -- plugin_register_read ("zfs_arc", za_read); -+ -+#if defined(HAVE_LIBKSTAT) -+ plugin_register_read ("zfs_arc", za_read_solaris); -+#elif defined(HAVE_SYSCTLBYNAME) -+ plugin_register_read ("zfs_arc", za_read_freebsd); -+#else -+ ERROR ("Unable to determine which OS we are on"); -+ return (-1); -+#endif /* HAVE_SYSCTLBYNAME */ -+ - } /* void module_register */ -=20 - /* vmi: set sw=3D8 noexpandtab fdm=3Dmarker : */ diff -ruN net-mgmt/collectd5/files/patch-version-gen.sh net-mgmt/collectd5.= new/files/patch-version-gen.sh --- net-mgmt/collectd5/files/patch-version-gen.sh 2013-06-20 05:02:07.00000= 0000 +0200 +++ net-mgmt/collectd5.new/files/patch-version-gen.sh 2013-08-26 12:08:53.0= 00000000 +0200 @@ -1,9 +1,10 @@ ---- ./version-gen.sh.orig 2013-05-21 21:22:23.000000000 +0000 -+++ ./version-gen.sh 2013-05-21 21:23:19.000000000 +0000 +--- version-gen.sh.orig 2013-08-19 10:57:47.000000000 -0600 ++++ version-gen.sh 2013-08-19 10:58:15.000000000 -0600 @@ -1,13 +1,3 @@ -#!/usr/bin/env bash -- --DEFAULT_VERSION=3D"5.3.0.git" ++#!/bin/sh +=20 +-DEFAULT_VERSION=3D"5.4.0.git" - -VERSION=3D"`git describe 2> /dev/null | sed -e 's/^collectd-//'`" - @@ -12,7 +13,6 @@ -fi - -VERSION=3D"`echo \"$VERSION\" | sed -e 's/-/./g'`" -+#!/bin/sh -=20 +- -echo -n "$VERSION" -+echo -n "5.3.0.git" ++echo -n '5.4.0.git' diff -ruN net-mgmt/collectd5/pkg-plist net-mgmt/collectd5.new/pkg-plist --- net-mgmt/collectd5/pkg-plist 2013-06-20 05:02:07.000000000 +0200 +++ net-mgmt/collectd5.new/pkg-plist 2013-08-26 12:21:51.000000000 +0200 @@ -16,147 +16,222 @@ include/collectd/lcc_features.h include/collectd/network.h include/collectd/network_buffer.h +lib/collectd/aggregation.a lib/collectd/aggregation.so lib/collectd/aggregation.la +%%CURL%%lib/collectd/apache.a %%CURL%%lib/collectd/apache.so %%CURL%%lib/collectd/apache.la +lib/collectd/apcups.a lib/collectd/apcups.so lib/collectd/apcups.la +%%CURL_XML%%lib/collectd/ascent.a %%CURL_XML%%lib/collectd/ascent.so %%CURL_XML%%lib/collectd/ascent.la +%%CURL_XML%%lib/collectd/bind.a %%CURL_XML%%lib/collectd/bind.so %%CURL_XML%%lib/collectd/bind.la +lib/collectd/contextswitch.a lib/collectd/contextswitch.so lib/collectd/contextswitch.la +lib/collectd/cpu.a lib/collectd/cpu.so lib/collectd/cpu.la +lib/collectd/csv.a lib/collectd/csv.so lib/collectd/csv.la +%%CURL%%lib/collectd/curl.a %%CURL%%lib/collectd/curl.so %%CURL%%lib/collectd/curl.la +%%CURL_JSON%%lib/collectd/curl_json.a %%CURL_JSON%%lib/collectd/curl_json.so %%CURL_JSON%%lib/collectd/curl_json.la +%%CURL_XML%%lib/collectd/curl_xml.a %%CURL_XML%%lib/collectd/curl_xml.so %%CURL_XML%%lib/collectd/curl_xml.la +%%DBI%%lib/collectd/dbi.a %%DBI%%lib/collectd/dbi.so %%DBI%%lib/collectd/dbi.la +lib/collectd/df.a lib/collectd/df.so lib/collectd/df.la +%%STATGRAB%%lib/collectd/disk.a %%STATGRAB%%lib/collectd/disk.so %%STATGRAB%%lib/collectd/disk.la +lib/collectd/dns.a lib/collectd/dns.so lib/collectd/dns.la +lib/collectd/email.a lib/collectd/email.so lib/collectd/email.la +lib/collectd/exec.a lib/collectd/exec.so lib/collectd/exec.la +lib/collectd/filecount.a lib/collectd/filecount.so lib/collectd/filecount.la +%%STATGRAB%%lib/collectd/interface.a %%STATGRAB%%lib/collectd/interface.so %%STATGRAB%%lib/collectd/interface.la +lib/collectd/load.a lib/collectd/load.so lib/collectd/load.la +lib/collectd/logfile.a lib/collectd/logfile.so lib/collectd/logfile.la +lib/collectd/match_empty_counter.a lib/collectd/match_empty_counter.so lib/collectd/match_empty_counter.la +lib/collectd/match_hashed.a lib/collectd/match_hashed.so lib/collectd/match_hashed.la +lib/collectd/match_regex.a lib/collectd/match_regex.so lib/collectd/match_regex.la +lib/collectd/match_timediff.a lib/collectd/match_timediff.so lib/collectd/match_timediff.la +lib/collectd/match_value.a lib/collectd/match_value.so lib/collectd/match_value.la +lib/collectd/mbmon.a lib/collectd/mbmon.so lib/collectd/mbmon.la +%%MEMCACHEC%%lib/collectd/memcachec.a %%MEMCACHEC%%lib/collectd/memcachec.so %%MEMCACHEC%%lib/collectd/memcachec.la +lib/collectd/memcached.a lib/collectd/memcached.so lib/collectd/memcached.la +lib/collectd/memory.a lib/collectd/memory.so lib/collectd/memory.la +%%MYSQL%%lib/collectd/mysql.a %%MYSQL%%lib/collectd/mysql.so %%MYSQL%%lib/collectd/mysql.la +lib/collectd/network.a lib/collectd/network.so lib/collectd/network.la +%%CURL%%lib/collectd/nginx.a %%CURL%%lib/collectd/nginx.so %%CURL%%lib/collectd/nginx.la +%%NOTIFYDESKTOP%%/notify_desktop.la +%%NOTIFYDESKTOP%%/notify_desktop.so +%%NOTIFYEMAIL%%/notify_email.la +%%NOTIFYEMAIL%%/notify_email.so +lib/collectd/ntpd.a lib/collectd/ntpd.so lib/collectd/ntpd.la +%%NUTUPS%%lib/collectd/nut.a %%NUTUPS%%lib/collectd/nut.so %%NUTUPS%%lib/collectd/nut.la +lib/collectd/openvpn.a lib/collectd/openvpn.so lib/collectd/openvpn.la +%%PING%%lib/collectd/ping.a %%PING%%lib/collectd/ping.so %%PING%%lib/collectd/ping.la +%%PGSQL%%lib/collectd/postgresql.a %%PGSQL%%lib/collectd/postgresql.so %%PGSQL%%lib/collectd/postgresql.la +lib/collectd/powerdns.a lib/collectd/powerdns.so lib/collectd/powerdns.la +lib/collectd/pf.a lib/collectd/pf.so lib/collectd/pf.la +lib/collectd/processes.a lib/collectd/processes.so lib/collectd/processes.la +%%REDIS%%lib/collectd/redis.a %%REDIS%%lib/collectd/redis.so %%REDIS%%lib/collectd/redis.la +%%ROUTEROS%%lib/collectd/routeros.a %%ROUTEROS%%lib/collectd/routeros.so %%ROUTEROS%%lib/collectd/routeros.la +%%RRDTOOL%%lib/collectd/rrdcached.a %%RRDTOOL%%lib/collectd/rrdcached.so %%RRDTOOL%%lib/collectd/rrdcached.la +%%RRDTOOL%%lib/collectd/rrdtool.a %%RRDTOOL%%lib/collectd/rrdtool.so %%RRDTOOL%%lib/collectd/rrdtool.la +%%SNMP%%lib/collectd/snmp.a %%SNMP%%lib/collectd/snmp.so %%SNMP%%lib/collectd/snmp.la +lib/collectd/swap.a lib/collectd/swap.so lib/collectd/swap.la +lib/collectd/syslog.a lib/collectd/syslog.so lib/collectd/syslog.la +lib/collectd/table.a lib/collectd/table.so lib/collectd/table.la +lib/collectd/tail.a lib/collectd/tail.so lib/collectd/tail.la +lib/collectd/target_notification.a lib/collectd/target_notification.so lib/collectd/target_notification.la +lib/collectd/target_replace.a lib/collectd/target_replace.so lib/collectd/target_replace.la +lib/collectd/target_scale.a lib/collectd/target_scale.so lib/collectd/target_scale.la +lib/collectd/target_set.a lib/collectd/target_set.so lib/collectd/target_set.la +lib/collectd/target_v5upgrade.a lib/collectd/target_v5upgrade.so lib/collectd/target_v5upgrade.la +lib/collectd/tcpconns.a lib/collectd/tcpconns.so lib/collectd/tcpconns.la +lib/collectd/teamspeak2.a lib/collectd/teamspeak2.so lib/collectd/teamspeak2.la +lib/collectd/ted.a lib/collectd/ted.so lib/collectd/ted.la +lib/collectd/threshold.a lib/collectd/threshold.so lib/collectd/threshold.la +%%TOKYOTYRANT%%lib/collectd/tokyotyrant.a %%TOKYOTYRANT%%lib/collectd/tokyotyrant.so %%TOKYOTYRANT%%lib/collectd/tokyotyrant.la +lib/collectd/unixsock.a lib/collectd/unixsock.so lib/collectd/unixsock.la +lib/collectd/uptime.a lib/collectd/uptime.so lib/collectd/uptime.la +lib/collectd/users.a lib/collectd/users.so lib/collectd/users.la +lib/collectd/uuid.a lib/collectd/uuid.so lib/collectd/uuid.la +%%VIRT%%lib/collectd/libvirt.a %%VIRT%%lib/collectd/libvirt.so %%VIRT%%lib/collectd/libvirt.la +lib/collectd/write_graphite.a lib/collectd/write_graphite.so lib/collectd/write_graphite.la +%%CURL%%lib/collectd/write_http.a %%CURL%%lib/collectd/write_http.so %%CURL%%lib/collectd/write_http.la +%%REDIS%%lib/collectd/write_redis.a %%REDIS%%lib/collectd/write_redis.so %%REDIS%%lib/collectd/write_redis.la +%%XMMS%%lib/collectd/xmms.a %%XMMS%%lib/collectd/xmms.so %%XMMS%%lib/collectd/xmms.la +lib/collectd/zfs_arc.a lib/collectd/zfs_arc.so lib/collectd/zfs_arc.la lib/libcollectdclient.la +lib/libcollectdclient.a lib/libcollectdclient.so lib/libcollectdclient.so.1 libdata/pkgconfig/libcollectdclient.pc --5G+Imvfxoe+o1e80-- --xFAlB6MquX7/xpZD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iEYEARECAAYFAlIbMMAACgkQEpKJWdxhDnY5EgCfVAYETXRENp15d0HVb723lF48 s90AnRqbf13KroW423uYS/SWX1Bql9vb =E1L4 -----END PGP SIGNATURE----- --xFAlB6MquX7/xpZD--