Merge branch 'collectd-5.4' into collectd-5.5
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 6 Mar 2016 11:08:59 +0000 (12:08 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 6 Mar 2016 11:08:59 +0000 (12:08 +0100)
src/utils_mount.c
src/zfs_arc.c

index 36d8d64..4ec5fb7 100644 (file)
@@ -429,16 +429,16 @@ static cu_mount_t *cu_mount_listmntent (void)
 #elif HAVE_GETVFSSTAT || HAVE_GETFSSTAT
 static cu_mount_t *cu_mount_getfsstat (void)
 {
-#if HAVE_GETVFSSTAT
-#  define STRUCT_STATFS struct statvfs
-#  define CMD_STATFS    getvfsstat
-#  define FLAGS_STATFS  ST_NOWAIT
-/* #endif HAVE_GETVFSSTAT */
-#elif HAVE_GETFSSTAT
+#if HAVE_GETFSSTAT
 #  define STRUCT_STATFS struct statfs
 #  define CMD_STATFS    getfsstat
 #  define FLAGS_STATFS  MNT_NOWAIT
-#endif /* HAVE_GETFSSTAT */
+/* #endif HAVE_GETFSSTAT */
+#elif HAVE_GETVFSSTAT
+#  define STRUCT_STATFS struct statvfs
+#  define CMD_STATFS    getvfsstat
+#  define FLAGS_STATFS  ST_NOWAIT
+#endif /* HAVE_GETVFSSTAT */
 
        int bufsize;
        STRUCT_STATFS *buf;
index ab5cd64..8feb31d 100644 (file)
@@ -270,8 +270,11 @@ static int za_read (void)
        za_read_derive (ksp, "deleted",  "cache_operation", "deleted");
 #if __FreeBSD__
        za_read_derive (ksp, "allocated","cache_operation", "allocated");
+#if defined(__FreeBSD_version) && (__FreeBSD_version < 1002501)
+       /* stolen removed from sysctl kstat.zfs.misc.arcstats on FreeBSD 10.2+ */
        za_read_derive (ksp, "stolen",   "cache_operation", "stolen");
 #endif
+#endif
 
        /* Issue indicators */
        za_read_derive (ksp, "mutex_miss", "mutex_operations", "miss");