I'm using iostat to get the current disk load each second with
iostat -dx 1 (specially, %util column). However, I'd like to put this in a bash script and control the interval with the
watch command such as:
watch -n 1 ./script.sh.
Running the following in
script.sh won't print a thing:
io_load=`iostat -dx 1` echo $io_load