1

I'm pretty sure sar's disk utilization % shows how much of the disk is being utilized at any given time, but how does it calculate that? I found:

%util

Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100%.

In the sar man page, but that doesn't answer much for me - the CPU could be issuing I/O requests infinitely but that doesn't necessarily mean that the disk is at capacity - would it not be more appropriate to measure when requests start becoming latent as a ceiling for how hard a disk is being hit?

2 Answers 2

1

sar (a.k.a. sysstat) includes iostat, which reads /proc/diskstats and /proc/partitions

iostat's man page defines %util as:

Percentage of elapsed time during which I/O requests were issued to the device (bandwidth utilization for the device).


Information Sources

  1. sysstat's iostat source
  2. man page

Further Reading

  1. The Linux kernel user’s and administrator’s guide » CPU load
  2. The Linux kernel user’s and administrator’s guide » I/O statistics fields
  3. https://brooker.co.za/blog/2014/07/04/iostat-pct.html
0

It depends on which kernel version are you using /proc/partitions or /sys/block/hda/stat or /proc/diskstats, but you answer your question thes file have all the required field to calculate CPU utilisation with sar.

Hope it will help you.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.