ZTS: remove get_arcstat

It's now a simple wrapper, so lets just call kstat direct.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
This commit is contained in:
Rob Norris
2025-01-15 15:11:33 +11:00
committed by Tony Hutter
parent 4acce93fde
commit 59a77512ca
15 changed files with 35 additions and 52 deletions
+2 -19
View File
@@ -3664,23 +3664,6 @@ function ls_xattr # path
esac
}
function get_arcstat # stat
{
typeset stat=$1
case "$UNAME" in
FreeBSD)
kstat arcstats.$stat
;;
Linux)
kstat arcstats | awk "/$stat/"' { print $3 }'
;;
*)
false
;;
esac
}
function punch_hole # offset length file
{
typeset offset=$1
@@ -3732,9 +3715,9 @@ function arcstat_quiescence # stat echo
fi
while $do_once || [ $stat1 -ne $stat2 ] || [ $stat2 -eq 0 ]; do
typeset stat1=$(get_arcstat $stat)
typeset stat1=$(kstat arcstats.$stat)
sleep 0.5
typeset stat2=$(get_arcstat $stat)
typeset stat2=$(kstat arcstats.$stat)
do_once=false
done