Quantcast
Channel: Get current disk I/O usage from command - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

Get current disk I/O usage from command

$
0
0

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

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images