From c4cf406f78fd39a6ab50735e00651aab6e383804 Mon Sep 17 00:00:00 2001 From: Mason Rowe Date: Mon, 1 Jan 2024 22:13:08 -0500 Subject: [PATCH] fixed bug with zfs disk space calculation (#83) --- yabs.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yabs.sh b/yabs.sh index 05c3f26..a42ee20 100644 --- a/yabs.sh +++ b/yabs.sh @@ -1,7 +1,7 @@ #!/bin/bash # Yet Another Bench Script by Mason Rowe -# Initial Oct 2019; Last update Nov 2023 +# Initial Oct 2019; Last update Jan 2024 # Disclaimer: This project is a work in progress. Any errors or suggestions should be # relayed to me via the GitHub project page linked below. @@ -12,7 +12,7 @@ # performance via fio. The script is designed to not require any dependencies # - either compiled or installed - nor admin privileges to run. -YABS_VERSION="v2023-11-30" +YABS_VERSION="v2024-01-01" echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' echo -e '# Yet-Another-Bench-Script #' @@ -533,7 +533,7 @@ elif [ -z "$SKIP_FIO" ]; then free_space=$(df -Th | grep -w $long | grep -i zfs | awk '{print $5}' | head -c -2) if [[ $size_b == 'T' ]]; then - free_space=$((free_space * 1024)) + free_space=$(awk "BEGIN {print int($free_space * 1024)}") size_b='G' fi