diff options
author | Ameer Hamza <[email protected]> | 2024-04-30 01:28:50 +0500 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-29 13:28:50 -0700 |
commit | b28461b7c6511be571ee2f7d71c0d7be12aa4630 (patch) | |
tree | d3f3cd8b6c87fecfae31a8533c367e9508c0b48f /cmd | |
parent | db499e68f9ef8d4b12ebdab699184e3acf35567c (diff) |
Fix arcstats for FreeBSD after zfetch support
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Ameer Hamza <[email protected]>
Closes #16141
Diffstat (limited to 'cmd')
-rwxr-xr-x | cmd/arcstat.in | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cmd/arcstat.in b/cmd/arcstat.in index 220f343b5..c4f10a1d6 100755 --- a/cmd/arcstat.in +++ b/cmd/arcstat.in @@ -200,6 +200,8 @@ if sys.platform.startswith('freebsd'): k = [ctl for ctl in sysctl.filter('kstat.zfs.misc.arcstats') if ctl.type != sysctl.CTLTYPE_NODE] + k += [ctl for ctl in sysctl.filter('kstat.zfs.misc.zfetchstats') + if ctl.type != sysctl.CTLTYPE_NODE] if not k: sys.exit(1) @@ -211,8 +213,12 @@ if sys.platform.startswith('freebsd'): continue name, value = s.name, s.value - # Trims 'kstat.zfs.misc.arcstats' from the name - kstat[name[24:]] = int(value) + + if "arcstats" in name: + # Trims 'kstat.zfs.misc.arcstats' from the name + kstat[name[24:]] = int(value) + else: + kstat["zfetch_" + name[27:]] = int(value) elif sys.platform.startswith('linux'): def kstat_update(): |