mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
tests: clean out unused/single-use/useless commands from the list
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13259
This commit is contained in:
@@ -254,7 +254,7 @@ function do_collect_scripts
|
||||
# Find a place to deposit performance data collected while under load.
|
||||
function get_perf_output_dir
|
||||
{
|
||||
typeset dir="$(pwd)/perf_data"
|
||||
typeset dir="$PWD/perf_data"
|
||||
[[ -d $dir ]] || mkdir -p $dir
|
||||
|
||||
echo $dir
|
||||
@@ -467,7 +467,7 @@ function get_system_config
|
||||
|
||||
echo "{" >>$config
|
||||
if is_linux; then
|
||||
echo " \"ncpus\": \"$(nproc --all)\"," >>$config
|
||||
echo " \"ncpus\": \"$(lscpu | awk '/^CPU\(s\)/ {print $2; exit}')\"," >>$config
|
||||
echo " \"physmem\": \"$(free -b | \
|
||||
awk '$1 == "Mem:" { print $2 }')\"," >>$config
|
||||
echo " \"c_max\": \"$(get_max_arc_size)\"," >>$config
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1004
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# This file and its contents are supplied under the terms of the
|
||||
@@ -21,33 +20,12 @@
|
||||
# TBD if we can add additional kstats to achieve the desired results
|
||||
#
|
||||
|
||||
zfs_kstats="/proc/spl/kstat/zfs"
|
||||
|
||||
function get_prefetch_ios
|
||||
{
|
||||
typeset -l data_misses="$(awk '$1 == "prefetch_data_misses" \
|
||||
{ print $3; exit }' "$zfs_kstats/arcstats")"
|
||||
typeset -l metadata_misses="$(awk '$1 == "prefetch_metadata_misses" \
|
||||
{ print $3; exit }' "$zfs_kstats/arcstats")"
|
||||
typeset -l total_misses=$(( data_misses + metadata_misses ))
|
||||
|
||||
echo "$total_misses"
|
||||
getstat() {
|
||||
awk -v c="$1" '$1 == c {print $3; exit}' /proc/spl/kstat/zfs/arcstats
|
||||
}
|
||||
|
||||
function get_prefetched_demand_reads
|
||||
{
|
||||
typeset -l demand_reads="$(awk '$1 == "demand_hit_predictive_prefetch" \
|
||||
{ print $3; exit }' "$zfs_kstats/arcstats")"
|
||||
|
||||
echo "$demand_reads"
|
||||
}
|
||||
|
||||
function get_async_upgrade_sync
|
||||
{
|
||||
typeset -l sync_wait="$(awk '$1 == "async_upgrade_sync" \
|
||||
{ print $3; exit }' "$zfs_kstats/arcstats")"
|
||||
|
||||
echo "$sync_wait"
|
||||
get_prefetch_ios() {
|
||||
echo $(( $(getstat prefetch_data_misses) + $(getstat prefetch_metadata_misses) ))
|
||||
}
|
||||
|
||||
if [ $# -ne 2 ]
|
||||
@@ -58,8 +36,8 @@ fi
|
||||
|
||||
interval=$2
|
||||
prefetch_ios=$(get_prefetch_ios)
|
||||
prefetched_demand_reads=$(get_prefetched_demand_reads)
|
||||
async_upgrade_sync=$(get_async_upgrade_sync)
|
||||
prefetched_demand_reads=$(getstat demand_hit_predictive_prefetch)
|
||||
async_upgrade_sync=$(getstat async_upgrade_sync)
|
||||
|
||||
while true
|
||||
do
|
||||
@@ -68,12 +46,12 @@ do
|
||||
$(( new_prefetch_ios - prefetch_ios ))
|
||||
prefetch_ios=$new_prefetch_ios
|
||||
|
||||
new_prefetched_demand_reads=$(get_prefetched_demand_reads)
|
||||
new_prefetched_demand_reads=$(getstat demand_hit_predictive_prefetch)
|
||||
printf '%-24s\t%u\n' "prefetched_demand_reads" \
|
||||
$(( new_prefetched_demand_reads - prefetched_demand_reads ))
|
||||
prefetched_demand_reads=$new_prefetched_demand_reads
|
||||
|
||||
new_async_upgrade_sync=$(get_async_upgrade_sync)
|
||||
new_async_upgrade_sync=$(getstat async_upgrade_sync)
|
||||
printf '%-24s\t%u\n' "async_upgrade_sync" \
|
||||
$(( new_async_upgrade_sync - async_upgrade_sync ))
|
||||
async_upgrade_sync=$new_async_upgrade_sync
|
||||
|
||||
Reference in New Issue
Block a user