OS-5729: export zfs kstats to lxproc in the same place as ZoL

Details

Issue Type:New Feature
Priority:5 - Low
Status:Open
Created at:2016-10-17T19:32:19.000Z
Updated at:2019-10-21T18:21:19.861Z

People

Created by:Former user
Reported by:Former user

Labels

lxbrand

Description

ZoL exports the kstats for ZFS to /proc/spl/kstat/zfs/. Besides an {arcstat} port these are graphed by plugins for Ganglia, collectd, telegraf etc.. I'll admit that the target audience for this may just be me, but I'd love to smooth the ZoL --> LX transition. Note that the native arcstat is in perl.

Example:

$ ls /proc/spl/kstat/zfs/
arcstats  dbgmsg  dbufs  dmu_tx  fm  tank  vdev_cache_stats  xuio_stats  zfetchstats  zil
$ cat /proc/spl/kstat/zfs/arcstats 
6 1 0x01 91 4368 4134564844 74632070532013
name                            type data
hits                            4    10997984
misses                          4    450870
demand_data_hits                4    6754533
demand_data_misses              4    37020
demand_metadata_hits            4    3871754
demand_metadata_misses          4    231139
prefetch_data_hits              4    9110
prefetch_data_misses            4    63776
prefetch_metadata_hits          4    362587
prefetch_metadata_misses        4    118935
mru_hits                        4    2096504
mru_ghost_hits                  4    75740
mfu_hits                        4    8529783
mfu_ghost_hits                  4    52663
deleted                         4    223497
mutex_miss                      4    1088
evict_skip                      4    13243030
evict_not_enough                4    228526
evict_l2_cached                 4    0
evict_l2_eligible               4    12869024256
evict_l2_ineligible             4    1619305984
evict_l2_skip                   4    0
hash_elements                   4    114177
hash_elements_max               4    232528
hash_collisions                 4    74920
hash_chains                     4    5615
hash_chain_max                  4    4
p                               4    565680041
c                               4    3139102872
c_min                           4    33554432
c_max                           4    4294967296
size                            4    3105003552
hdr_size                        4    42487688
data_size                       4    555449344
metadata_size                   4    762356224
other_size                      4    1744710296
anon_size                       4    2065408
anon_evictable_data             4    0
anon_evictable_metadata         4    0
mru_size                        4    723160064
mru_evictable_data              4    79183872
mru_evictable_metadata          4    16395264
mru_ghost_size                  4    1116184064
mru_ghost_evictable_data        4    778193408
mru_ghost_evictable_metadata    4    337990656
mfu_size                        4    592580096
mfu_evictable_data              4    476265472
mfu_evictable_metadata          4    46883328
mfu_ghost_size                  4    824093696
mfu_ghost_evictable_data        4    721347072
mfu_ghost_evictable_metadata    4    102746624
l2_hits                         4    0
l2_misses                       4    0
l2_feeds                        4    0
l2_rw_clash                     4    0
l2_read_bytes                   4    0
l2_write_bytes                  4    0
l2_writes_sent                  4    0
l2_writes_done                  4    0
l2_writes_error                 4    0
l2_writes_lock_retry            4    0
l2_evict_lock_retry             4    0
l2_evict_reading                4    0
l2_evict_l1cached               4    0
l2_free_on_write                4    0
l2_cdata_free_on_write          4    0
l2_abort_lowmem                 4    0
l2_cksum_bad                    4    0
l2_io_error                     4    0
l2_size                         4    0
l2_asize                        4    0
l2_hdr_size                     4    0
l2_compress_successes           4    0
l2_compress_zeros               4    0
l2_compress_failures            4    0
memory_throttle_count           4    0
duplicate_buffers               4    0
duplicate_buffers_size          4    0
duplicate_reads                 4    0
memory_direct_count             4    75
memory_indirect_count           4    12532
arc_no_grow                     4    0
arc_tempreserve                 4    0
arc_loaned_bytes                4    0
arc_prune                       4    0
arc_meta_used                   4    2549554208
arc_meta_limit                  4    3115832832
arc_meta_max                    4    3016299792
arc_meta_min                    4    16777216
arc_need_free                   4    0
arc_sys_free                    4    129822720

Comments