summaryrefslogtreecommitdiffstats
path: root/scripts/zpios-profile/zpios-profile-disk.sh
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2017-08-15 17:26:38 -0700
committerGitHub <[email protected]>2017-08-15 17:26:38 -0700
commitc8f9061fc714696a53cf4d14a4567f0a83dbf862 (patch)
tree42e8a39488899046384f9bb5e350032f438a3ae4 /scripts/zpios-profile/zpios-profile-disk.sh
parent70322be8dc160f003fa95e034462ad625b325568 (diff)
Retire legacy test infrastructure
* Removed zpios kmod, utility, headers and man page. * Removed unused scripts zpios-profile/*, zpios-test/*, zpool-config/*, smb.sh, zpios-sanity.sh, zpios-survey.sh, zpios.sh, and zpool-create.sh. * Removed zfs-script-config.sh.in. When building 'make' generates a common.sh with in-tree path information from the common.sh.in template. This file and sourced by the test scripts and used for in-tree testing, it is not included in the packages. When building packages 'make install' uses the same template to create a new common.sh which is appropriate for the packaging. * Removed unused functions/variables from scripts/common.sh.in. Only minimal path information and configuration environment variables remain. * Removed unused scripts from scripts/ directory. * Remaining shell scripts in the scripts directory updated to cleanly pass shellcheck and added to checked scripts. * Renamed tests/test-runner/cmd/ to tests/test-runner/bin/ to match install location name. * Removed last traces of the --enable-debug-dmu-tx configure options which was retired some time ago. Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #6509
Diffstat (limited to 'scripts/zpios-profile/zpios-profile-disk.sh')
-rwxr-xr-xscripts/zpios-profile/zpios-profile-disk.sh129
1 files changed, 0 insertions, 129 deletions
diff --git a/scripts/zpios-profile/zpios-profile-disk.sh b/scripts/zpios-profile/zpios-profile-disk.sh
deleted file mode 100755
index b56ee1ee4..000000000
--- a/scripts/zpios-profile/zpios-profile-disk.sh
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/bash
-#
-# /proc/diskinfo <after skipping major/minor>
-# Field 1 -- device name
-# Field 2 -- # of reads issued
-# Field 3 -- # of reads merged
-# Field 4 -- # of sectors read
-# Field 5 -- # of milliseconds spent reading
-# Field 6 -- # of writes completed
-# Field 7 -- # of writes merged
-# Field 8 -- # of sectors written
-# Field 9 -- # of milliseconds spent writing
-# Field 10 -- # of I/Os currently in progress
-# Field 11 -- # of milliseconds spent doing I/Os
-# Field 12 -- weighted # of milliseconds spent doing I/Os
-
-PROG=zpios-profile-disk.sh
-
-RUN_PIDS=${0}
-RUN_LOG_DIR=${1}
-RUN_ID=${2}
-
-create_table() {
- local FIELD=$1
- local ROW_M=()
- local ROW_N=()
- local HEADER=1
- local STEP=1
-
- for DISK_FILE in `ls -r --sort=time --time=ctime ${RUN_LOG_DIR}/${RUN_ID}/disk-[0-9]*`; do
- ROW_M=( ${ROW_N[@]} )
- ROW_N=( `cat ${DISK_FILE} | grep sd | cut -c11- | cut -f${FIELD} -d' ' | tr "\n" "\t"` )
-
- if [ $HEADER -eq 1 ]; then
- echo -n "step, "
- cat ${DISK_FILE} | grep sd | cut -c11- | cut -f1 -d' ' | tr "\n" ", "
- echo "total"
- HEADER=0
- fi
-
- if [ ${#ROW_M[@]} -eq 0 ]; then
- continue
- fi
-
- if [ ${#ROW_M[@]} -ne ${#ROW_N[@]} ]; then
- echo "Badly formatted profile data in ${DISK_FILE}"
- break
- fi
-
- TOTAL=0
- echo -n "${STEP}, "
- for (( i=0; i<${#ROW_N[@]}; i++ )); do
- DELTA=`echo "${ROW_N[${i}]}-${ROW_M[${i}]}" | bc`
- let TOTAL=${TOTAL}+${DELTA}
- echo -n "${DELTA}, "
- done
- echo "${TOTAL}, "
-
- let STEP=${STEP}+1
- done
-}
-
-create_table_mbs() {
- local FIELD=$1
- local TIME=$2
- local ROW_M=()
- local ROW_N=()
- local HEADER=1
- local STEP=1
-
- for DISK_FILE in `ls -r --sort=time --time=ctime ${RUN_LOG_DIR}/${RUN_ID}/disk-[0-9]*`; do
- ROW_M=( ${ROW_N[@]} )
- ROW_N=( `cat ${DISK_FILE} | grep sd | cut -c11- | cut -f${FIELD} -d' ' | tr "\n" "\t"` )
-
- if [ $HEADER -eq 1 ]; then
- echo -n "step, "
- cat ${DISK_FILE} | grep sd | cut -c11- | cut -f1 -d' ' | tr "\n" ", "
- echo "total"
- HEADER=0
- fi
-
- if [ ${#ROW_M[@]} -eq 0 ]; then
- continue
- fi
-
- if [ ${#ROW_M[@]} -ne ${#ROW_N[@]} ]; then
- echo "Badly formatted profile data in ${DISK_FILE}"
- break
- fi
-
- TOTAL=0
- echo -n "${STEP}, "
- for (( i=0; i<${#ROW_N[@]}; i++ )); do
- DELTA=`echo "${ROW_N[${i}]}-${ROW_M[${i}]}" | bc`
- MBS=`echo "scale=2; ((${DELTA}*512)/${TIME})/(1024*1024)" | bc`
- TOTAL=`echo "scale=2; ${TOTAL}+${MBS}" | bc`
- echo -n "${MBS}, "
- done
- echo "${TOTAL}, "
-
- let STEP=${STEP}+1
- done
-}
-
-echo
-echo "Reads issued per device"
-create_table 2
-echo
-echo "Reads merged per device"
-create_table 3
-echo
-echo "Sectors read per device"
-create_table 4
-echo "MB/s per device"
-create_table_mbs 4 3
-
-echo
-echo "Writes issued per device"
-create_table 6
-echo
-echo "Writes merged per device"
-create_table 7
-echo
-echo "Sectors written per device"
-create_table 8
-echo "MB/s per device"
-create_table_mbs 8 3
-
-exit 0