2

With iotop -o command I can see the write and read speed of the disk per second. But it varies a lot, from 0 to high values. I'd like to see an average of it per minute or per 10 seconds.

How can I do it?

Siva
  • 9,017
  • 8
  • 56
  • 86

1 Answers1

1

I hope sar is the better way to get the average result

 sar -d 1 10 | awk '/Average/ {print $2" "$4*0.000512"MB/s  "$5*0.000512"MB/s"}' | sed 's#DEV.*#DEV rd_sec/s wr_sec/s#' | column -t
  • rd_sec/s and wr_sec/s are number of sectors read and write from the device. The size of a sector is 512 bytes.

  • multiply by .000512 to convert into MB/sec

Siva
  • 9,017
  • 8
  • 56
  • 86