Use native ioping command if installed

This commit is contained in:
Nils Steinger 2017-06-01 18:14:28 +02:00
parent d31a60537d
commit 01d9ff4e88
1 changed files with 10 additions and 4 deletions

View File

@ -120,8 +120,14 @@ printf '%s\n' '-------------------------------------------------'
printf '\n' printf '\n'
curl -s --max-time 10 -o ioping.static http://wget.racing/ioping.static if ! command_exists ioping
chmod +x ioping.static then
curl -s --max-time 10 -o ioping.static http://wget.racing/ioping.static
chmod +x ioping.static
ioping_cmd="./ioping.static"
else
ioping_cmd="ioping"
fi
# Basic info # Basic info
printf 'Processor: ' printf 'Processor: '
@ -166,9 +172,9 @@ printf '\n'
# ioping # ioping
printf 'ioping: seek rate\n ' printf 'ioping: seek rate\n '
./ioping.static -R -w 5 . | tail -n 1 "$ioping_cmd" -R -w 5 . | tail -n 1
printf 'ioping: sequential read speed\n ' printf 'ioping: sequential read speed\n '
./ioping.static -RL -w 5 . | tail -n 2 | head -n 1 "$ioping_cmd" -RL -w 5 . | tail -n 2 | head -n 1
printf '\n' printf '\n'