zfs_arc plugin: get more MRU/MFU stats
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 27 Apr 2016 12:01:58 +0000 (14:01 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 27 Apr 2016 12:01:58 +0000 (14:01 +0200)
src/zfs_arc.c

index 4204a7e..37a918b 100644 (file)
@@ -320,6 +320,11 @@ static int za_read (void)
        za_read_derive (ksp, "demand_metadata_misses",   "cache_result", "demand_metadata-miss");
        za_read_derive (ksp, "prefetch_data_misses",     "cache_result", "prefetch_data-miss");
        za_read_derive (ksp, "prefetch_metadata_misses", "cache_result", "prefetch_metadata-miss");
+       za_read_derive (ksp, "mfu_hits",                 "cache_result", "mfu-hit");
+       za_read_derive (ksp, "mfu_ghost_hits",           "cache_result", "mfu_ghost-hit");
+       za_read_derive (ksp, "mru_hits",                 "cache_result", "mru-hit");
+       za_read_derive (ksp, "mru_ghost_hits",           "cache_result", "mru_ghost-hit");
+       za_read_derive (ksp, "prefetch_metadata_misses", "cache_result", "prefetch_metadata-miss");
 
        /* Ratios */
        arc_hits   = (gauge_t) get_zfs_value(ksp, "hits");