@cryptotaxi247 / netdata-1 / commits / a7472c5ff

Fix the scope of arcstats

Vladimir Kobal committed Apr 8, 2017 at 16:02 UTC a7472c5ff96e1f0c86f074fd1b81bb877c5989eb
4 files changed +8 -2
src/freebsd_kstat_zfs.c
+2
@@ -1,6 +1,8 @@
1 #include "common.h"
2 #include "zfs_common.h"
3
4 +struct arcstats arcstats = { 0 };
5 +
6 // kstat.zfs.misc.arcstats
7 int do_kstat_zfs_misc_arcstats(int update_every, usec_t dt) {
8 (void)dt;
src/proc_spl_kstat_zfs.c
+2
@@ -3,6 +3,8 @@
3
4 #define ZFS_PROC_ARCSTATS "/proc/spl/kstat/zfs/arcstats"
5
6 +struct arcstats arcstats = { 0 };
7 +
8 int do_proc_spl_kstat_zfs_arcstats(int update_every, usec_t dt) {
9 (void)dt;
10
src/zfs_common.c
+2
@@ -1,6 +1,8 @@
1 #include "common.h"
2 #include "zfs_common.h"
3
4 +extern struct arcstats arcstats;
5 +
6 void generate_charts_arcstats(int update_every) {
7
8 // ARC reads
src/zfs_common.h
+2 -2
@@ -7,7 +7,7 @@
7 #define ZFS_FAMILY_OPERATIONS "operations"
8 #define ZFS_FAMILY_HASH "hashes"
9
10 -static struct arcstats {
10 +struct arcstats {
11 unsigned long long hits;
12 unsigned long long misses;
13 unsigned long long demand_data_hits;
@@ -99,7 +99,7 @@ static struct arcstats {
99 unsigned long long arc_meta_min;
100 unsigned long long arc_need_free;
101 unsigned long long arc_sys_free;
102 -} arcstats = { 0 };
102 +};
103
104 int l2exist;
105