summaryrefslogtreecommitdiffstats
path: root/src/collectors/proc.plugin/proc_spl_kstat_zfs.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/collectors/proc.plugin/proc_spl_kstat_zfs.c (renamed from collectors/proc.plugin/proc_spl_kstat_zfs.c)8
1 files changed, 4 insertions, 4 deletions
diff --git a/collectors/proc.plugin/proc_spl_kstat_zfs.c b/src/collectors/proc.plugin/proc_spl_kstat_zfs.c
index 27178b60f..e6b12c31f 100644
--- a/collectors/proc.plugin/proc_spl_kstat_zfs.c
+++ b/src/collectors/proc.plugin/proc_spl_kstat_zfs.c
@@ -6,7 +6,7 @@
#define ZFS_PROC_ARCSTATS "/proc/spl/kstat/zfs/arcstats"
#define ZFS_PROC_POOLS "/proc/spl/kstat/zfs"
-#define STATE_SIZE 9
+#define STATE_SIZE 20
#define MAX_CHART_ID 256
extern struct arcstats arcstats;
@@ -272,7 +272,7 @@ int update_zfs_pool_state_chart(const DICTIONARY_ITEM *item, void *pool_p, void
"zfspool",
chart_id,
NULL,
- name,
+ "state",
"zfspool.state",
"ZFS pool state",
"boolean",
@@ -357,7 +357,7 @@ int do_proc_spl_kstat_zfs_pool_state(int update_every, usec_t dt)
if (unlikely(!pool)) {
struct zfs_pool new_zfs_pool = {};
pool = dictionary_set(zfs_pools, de->d_name, &new_zfs_pool, sizeof(struct zfs_pool));
- };
+ }
pool->updated = 1;
@@ -378,7 +378,7 @@ int do_proc_spl_kstat_zfs_pool_state(int update_every, usec_t dt)
snprintfz(filename, FILENAME_MAX, "%s/%s/state", dirname, de->d_name);
char state[STATE_SIZE + 1];
- int ret = read_file(filename, state, STATE_SIZE);
+ int ret = read_txt_file(filename, state, sizeof(state));
if (!ret) {
state_file_found = 1;