Skip to content

Commit c4cf406

Browse files
committed
fixed bug with zfs disk space calculation (masonr#83)
1 parent 09512e2 commit c4cf406

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

yabs.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Yet Another Bench Script by Mason Rowe
4-
# Initial Oct 2019; Last update Nov 2023
4+
# Initial Oct 2019; Last update Jan 2024
55

66
# Disclaimer: This project is a work in progress. Any errors or suggestions should be
77
# relayed to me via the GitHub project page linked below.
@@ -12,7 +12,7 @@
1212
# performance via fio. The script is designed to not require any dependencies
1313
# - either compiled or installed - nor admin privileges to run.
1414

15-
YABS_VERSION="v2023-11-30"
15+
YABS_VERSION="v2024-01-01"
1616

1717
echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #'
1818
echo -e '# Yet-Another-Bench-Script #'
@@ -533,7 +533,7 @@ elif [ -z "$SKIP_FIO" ]; then
533533
free_space=$(df -Th | grep -w $long | grep -i zfs | awk '{print $5}' | head -c -2)
534534

535535
if [[ $size_b == 'T' ]]; then
536-
free_space=$((free_space * 1024))
536+
free_space=$(awk "BEGIN {print int($free_space * 1024)}")
537537
size_b='G'
538538
fi
539539

0 commit comments

Comments
 (0)