cmd: rename arc_summary to zarcsummary

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Colm Buckley <colm@tuatha.org>
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Closes #16357
Closes #17712
This commit is contained in:
Shengqi Chen 2025-09-09 17:48:04 +08:00 committed by Brian Behlendorf
parent 5bf1500ee3
commit 743866cd2a
15 changed files with 31 additions and 31 deletions

View File

@ -98,14 +98,14 @@ endif
if USING_PYTHON
bin_SCRIPTS += arc_summary arcstat dbufstat zilstat
CLEANFILES += arc_summary arcstat dbufstat zilstat
dist_noinst_DATA += %D%/arc_summary %D%/arcstat.in %D%/dbufstat.in %D%/zilstat.in
bin_SCRIPTS += zarcsummary arcstat dbufstat zilstat
CLEANFILES += zarcsummary arcstat dbufstat zilstat
dist_noinst_DATA += %D%/zarcsummary %D%/arcstat.in %D%/dbufstat.in %D%/zilstat.in
$(call SUBST,arcstat,%D%/)
$(call SUBST,dbufstat,%D%/)
$(call SUBST,zilstat,%D%/)
arc_summary: %D%/arc_summary
zarcsummary: %D%/zarcsummary
$(AM_V_at)cp $< $@
endif

View File

@ -172,7 +172,7 @@ cols = {
"zactive": [7, 1000, "zfetch prefetches active per second"],
}
# ARC structural breakdown from arc_summary
# ARC structural breakdown from zarcsummary
structfields = {
"cmp": ["compressed", "Compressed"],
"ovh": ["overhead", "Overhead"],
@ -188,7 +188,7 @@ structstats = { # size stats
"sz": ["_size", "size"],
}
# ARC types breakdown from arc_summary
# ARC types breakdown from zarcsummary
typefields = {
"data": ["data", "ARC data"],
"meta": ["metadata", "ARC metadata"],
@ -199,7 +199,7 @@ typestats = { # size stats
"sz": ["_size", "size"],
}
# ARC states breakdown from arc_summary
# ARC states breakdown from zarcsummary
statefields = {
"ano": ["anon", "Anonymous"],
"mfu": ["mfu", "MFU"],
@ -367,7 +367,7 @@ def snap_stats():
cur = kstat
# fill in additional values from arc_summary
# fill in additional values from zarcsummary
cur["caches_size"] = caches_size = cur["anon_data"]+cur["anon_metadata"]+\
cur["mfu_data"]+cur["mfu_metadata"]+cur["mru_data"]+cur["mru_metadata"]+\
cur["uncached_data"]+cur["uncached_metadata"]

View File

@ -34,7 +34,7 @@ Provides basic information on the ARC, its efficiency, the L2ARC (if present),
the Data Management Unit (DMU), Virtual Devices (VDEVs), and tunables. See
the in-source documentation and code at
https://github.com/openzfs/zfs/blob/master/module/zfs/arc.c for details.
The original introduction to arc_summary can be found at
The original introduction to zarcsummary can be found at
http://cuddletech.com/?p=454
"""
@ -161,7 +161,7 @@ elif sys.platform.startswith('linux'):
return get_params(TUNABLES_PATH)
def get_version_impl(request):
# The original arc_summary called /sbin/modinfo/{spl,zfs} to get
# The original zarcsummary called /sbin/modinfo/{spl,zfs} to get
# the version information. We switch to /sys/module/{spl,zfs}/version
# to make sure we get what is really loaded in the kernel
try:
@ -439,7 +439,7 @@ def print_header():
"""
# datetime is now recommended over time but we keep the exact formatting
# from the older version of arc_summary in case there are scripts
# from the older version of zarcsummary in case there are scripts
# that expect it in this way
daydate = time.strftime(DATE_FORMAT)
spc_date = LINE_LENGTH-len(daydate)

View File

@ -1,4 +1,4 @@
usr/bin/arc_summary.py
usr/bin/zarcsummary.py
usr/share/zfs/zfs-helpers.sh
etc/default/zfs
etc/init.d

View File

@ -36,7 +36,7 @@ usr/lib/modules-load.d/ lib/
usr/lib/zfs-linux/zpool.d/
usr/lib/zfs-linux/zpool_influxdb
usr/lib/zfs-linux/zfs_prepare_disk
usr/sbin/arc_summary
usr/sbin/zarcsummary
usr/sbin/arcstat
usr/sbin/dbufstat
usr/sbin/zilstat

View File

@ -81,7 +81,7 @@ override_dh_auto_install:
# Remove suffix (.py) as per policy 10.4 - Scripts
# https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
mkdir -p '$(CURDIR)/debian/tmp/usr/sbin/'
mv '$(CURDIR)/debian/tmp/usr/bin/arc_summary' '$(CURDIR)/debian/tmp/usr/sbin/arc_summary'
mv '$(CURDIR)/debian/tmp/usr/bin/zarcsummary' '$(CURDIR)/debian/tmp/usr/sbin/zarcsummary'
mv '$(CURDIR)/debian/tmp/usr/bin/arcstat' '$(CURDIR)/debian/tmp/usr/sbin/arcstat'
mv '$(CURDIR)/debian/tmp/usr/bin/dbufstat' '$(CURDIR)/debian/tmp/usr/sbin/dbufstat'
mv '$(CURDIR)/debian/tmp/usr/bin/zilstat' '$(CURDIR)/debian/tmp/usr/sbin/zilstat'

View File

@ -433,7 +433,7 @@ make install DESTDIR=%{?buildroot}
find %{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \;
%if 0%{!?__brp_mangle_shebangs:1}
find %{?buildroot}%{_bindir} \
\( -name arc_summary -or -name arcstat -or -name dbufstat \
\( -name zarcsummary -or -name arcstat -or -name dbufstat \
-or -name zilstat \) \
-exec %{__sed} -i 's|^#!.*|#!%{__python}|' {} \;
find %{?buildroot}%{_datadir} \
@ -508,7 +508,7 @@ systemctl --system daemon-reload >/dev/null || true
%{_bindir}/raidz_test
%{_bindir}/zvol_wait
# Optional Python 3 scripts
%{_bindir}/arc_summary
%{_bindir}/zarcsummary
%{_bindir}/arcstat
%{_bindir}/dbufstat
%{_bindir}/zilstat

View File

@ -84,7 +84,7 @@ my $tagged_patterns = q(
# Unsuffixed programs (or generated of same)
cmd/arcstat.in
cmd/arc_summary
cmd/zarcsummary
cmd/dbufstat.in
cmd/zilstat.in
cmd/zpool/zpool.d/*

View File

@ -625,7 +625,7 @@ tests = ['zdb_001_neg', 'zfs_001_neg', 'zfs_allow_001_neg',
'zpool_offline_001_neg', 'zpool_online_001_neg', 'zpool_remove_001_neg',
'zpool_replace_001_neg', 'zpool_scrub_001_neg', 'zpool_set_001_neg',
'zpool_status_001_neg', 'zpool_upgrade_001_neg', 'arcstat_001_pos',
'arc_summary_001_pos', 'arc_summary_002_neg', 'zpool_wait_privilege',
'zarcsummary_001_pos', 'zarcsummary_002_neg', 'zpool_wait_privilege',
'zilstat_001_pos']
user =
tags = ['functional', 'cli_user', 'misc']

View File

@ -401,7 +401,7 @@ tests = ['zdb_001_neg', 'zfs_001_neg', 'zfs_allow_001_neg',
'zpool_history_001_neg', 'zpool_offline_001_neg', 'zpool_online_001_neg',
'zpool_remove_001_neg', 'zpool_scrub_001_neg', 'zpool_set_001_neg',
'zpool_status_001_neg', 'zpool_upgrade_001_neg', 'arcstat_001_pos',
'arc_summary_001_pos', 'arc_summary_002_neg', 'zpool_wait_privilege',
'zarcsummary_001_pos', 'zarcsummary_002_neg', 'zpool_wait_privilege',
'zilstat_001_pos']
user =
tags = ['functional', 'cli_user', 'misc']

View File

@ -232,7 +232,7 @@ maybe = {
'cli_root/zpool_trim/zpool_trim_fault_export_import_online':
['FAIL', known_reason],
'cli_root/zpool_upgrade/zpool_upgrade_004_pos': ['FAIL', 6141],
'cli_user/misc/arc_summary_001_pos': ['FAIL', known_reason],
'cli_user/misc/zarcsummary_001_pos': ['FAIL', known_reason],
'delegate/setup': ['SKIP', exec_reason],
'events/zed_cksum_config': ['FAIL', known_reason],
'fault/auto_replace_002_pos': ['FAIL', known_reason],

View File

@ -171,7 +171,7 @@ export ZFS_FILES='zdb
zpool
ztest
raidz_test
arc_summary
zarcsummary
arcstat
zilstat
dbufstat

View File

@ -1352,8 +1352,8 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/cli_root/zpool/zpool_003_pos.ksh \
functional/cli_root/zpool/zpool_colors.ksh \
functional/cli_user/misc/arcstat_001_pos.ksh \
functional/cli_user/misc/arc_summary_001_pos.ksh \
functional/cli_user/misc/arc_summary_002_neg.ksh \
functional/cli_user/misc/zarcsummary_001_pos.ksh \
functional/cli_user/misc/zarcsummary_002_neg.ksh \
functional/cli_user/misc/zilstat_001_pos.ksh \
functional/cli_user/misc/cleanup.ksh \
functional/cli_user/misc/setup.ksh \

View File

@ -30,16 +30,16 @@
is_freebsd && ! python3 -c 'import sysctl' 2>/dev/null && log_unsupported "python3 sysctl module missing"
log_assert "arc_summary generates output and doesn't return an error code"
log_assert "zarcsummary generates output and doesn't return an error code"
# Without this, the below checks aren't going to work the way we hope...
set -o pipefail
for arg in "" "-a" "-d" "-p 1" "-g" "-s arc" "-r"; do
log_must eval "arc_summary $arg > /dev/null"
log_must eval "zarcsummary $arg > /dev/null"
done
log_must eval "arc_summary | head > /dev/null"
log_must eval "arc_summary | head -1 > /dev/null"
log_must eval "zarcsummary | head > /dev/null"
log_must eval "zarcsummary | head -1 > /dev/null"
log_pass "arc_summary generates output and doesn't return an error code"
log_pass "zarcsummary generates output and doesn't return an error code"

View File

@ -30,10 +30,10 @@
is_freebsd && ! python3 -c 'import sysctl' 2>/dev/null && log_unsupported "python3 sysctl module missing"
log_assert "arc_summary generates an error code with invalid options"
log_assert "zarcsummary generates an error code with invalid options"
for arg in "-x" "-5" "-p 7" "--err" "-@"; do
log_mustnot eval "arc_summary $arg > /dev/null"
log_mustnot eval "zarcsummary $arg > /dev/null"
done
log_pass "arc_summary generates an error code with invalid options"
log_pass "zarcsummary generates an error code with invalid options"