summaryrefslogtreecommitdiffstats
path: root/src/proc_spl_kstat_zfs.c
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:27 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:27 +0000
commit6abdfdead1326ccca98dc4cf415c216f1bf25400 (patch)
tree70b803bd499fd45e89627c1b45b90ddf20e8e959 /src/proc_spl_kstat_zfs.c
parentRelease v. 1.8.0+dfsg-1 to Unstable (diff)
parentNew upstream version 1.9.0+dfsg (diff)
downloadnetdata-6abdfdead1326ccca98dc4cf415c216f1bf25400.tar.xz
netdata-6abdfdead1326ccca98dc4cf415c216f1bf25400.zip
Update upstream source from tag 'upstream/1.9.0+dfsg'
Update to upstream version '1.9.0+dfsg' with Debian dir 28b8242a05f9ad26cd1cdbcf078be754fc7d6251
Diffstat (limited to 'src/proc_spl_kstat_zfs.c')
-rw-r--r--src/proc_spl_kstat_zfs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/proc_spl_kstat_zfs.c b/src/proc_spl_kstat_zfs.c
index dee7a6b3d..9d489d8e4 100644
--- a/src/proc_spl_kstat_zfs.c
+++ b/src/proc_spl_kstat_zfs.c
@@ -3,7 +3,7 @@
#define ZFS_PROC_ARCSTATS "/proc/spl/kstat/zfs/arcstats"
-struct arcstats arcstats = { 0 };
+extern struct arcstats arcstats;
int do_proc_spl_kstat_zfs_arcstats(int update_every, usec_t dt) {
(void)dt;
@@ -11,7 +11,7 @@ int do_proc_spl_kstat_zfs_arcstats(int update_every, usec_t dt) {
static procfile *ff = NULL;
static ARL_BASE *arl_base = NULL;
- l2exist = -1;
+ arcstats.l2exist = -1;
if(unlikely(!arl_base)) {
arl_base = arl_create("arcstats", NULL, 60);
@@ -135,19 +135,19 @@ int do_proc_spl_kstat_zfs_arcstats(int update_every, usec_t dt) {
const char *key = procfile_lineword(ff, l, 0);
const char *value = procfile_lineword(ff, l, 2);
- if(unlikely(l2exist == -1)) {
+ if(unlikely(arcstats.l2exist == -1)) {
if(key[0] == 'l' && key[1] == '2' && key[2] == '_')
- l2exist = 1;
+ arcstats.l2exist = 1;
}
if(unlikely(arl_check(arl_base, key, value))) break;
}
- if(unlikely(l2exist == -1))
- l2exist = 0;
+ if(unlikely(arcstats.l2exist == -1))
+ arcstats.l2exist = 0;
- generate_charts_arcstats(update_every);
- generate_charts_arc_summary(update_every);
+ generate_charts_arcstats("proc", update_every);
+ generate_charts_arc_summary("proc", update_every);
return 0;
}