I'm trying to obtain the current disk I/O usage (in %) from a single command.
Currently I have
iostat -dx /dev/sda 1 | awk {'print $16'}
which gives me the utilization entry for I/O from iostat
. It also keeps updating and giving new entries, that's something I don't want:
%util
0.06
%util
0.00
%util
0.09
What i'm trying to get is just a single line that gives the current I/O usage in percentage. so its output would simply look like this:
0.06