[PATCH] sard disk profiling for 2.3.99-pre4.1

From: Stephen C. Tweedie (sct@redhat.com)
Date: Thu Apr 20 2000 - 11:14:24 EST


Hi all,

Here is the "sard" code for 2.3.99-pre4.2. It provides /proc/partitions
output in support of "sar -d" functionality, ie. extensive IO reporting
and profiling of disk activity.

On ftp.uk.linux.org:/pub/linux/sct/fs/profiling, you can find sample
user-space code to access the stats. Typical output will look like
this:

  device %util qlen (ios:kB rd ios:kB wr ios:kB /sec) avwait (ms)
  [04:12:39]
  sda 0.00% 0.00 0:0 0:0 0:0 0.0
  hda 37.05% 1.35 26:26 5:7 31:33 43.3
  hdc 0.00% 0.00 0:0 0:0 0:0 0.0
  [04:12:44]
  sda 0.00% 0.00 0:0 0:0 0:0 0.0
  hda 82.87% 0.96 86:85 1:19 87:105 11.0
  hdc 0.00% 0.00 0:0 0:0 0:0 0.0

where for each disk, you get the %age disk utilisation, the average
queue length, the number of separate IOs and the kB transfered for
reads, writes and total of both, plus the average IO service time,
all averaged over a configurable sampling interval (default is 5
seconds). You can also get the information broken down into each
individual partition, in addition to the full-disk stats:

  device %util qlen (ios:kB rd ios:kB wr ios:kB /sec) avwait (ms)
  [04:14:40]
  sda 0.00% 0.00 0:0 0:0 0:0 0.0
  sda1 0.00% 0.00 0:0 0:0 0:0 0.0
  hda 6.41% 0.12 1:24 1:1 2:26 55.5
  hda1 1.94% 0.02 0:12 0:0 0:12 50.0
  hda2 4.47% 0.10 1:11 1:1 2:13 56.7
  hdc 0.00% 0.00 0:0 0:0 0:0 0.0
  hdc3 0.00% 0.00 0:0 0:0 0:0 0.0

With devfs, the full partition names are abbreviated to look
something like this:

  device %util qlen (ios:kB rd ios:kB wr ios:kB /sec) avwait (ms)
  [22:00:33]
  c0b0t0u0 0.02% 0.34 0:0 33:205 33:205 10.5
  c1b0t0u0 0.00% 0.00 0:0 0:0 0:0 0.0
  c2b0t0u0 0.00% 0.00 0:0 0:0 0:0 0.0

[thanks to Douglas Gilbert for the devfs support code.]

The new disk registration code in recent 2.3 kernels makes this
version of sard _much_ less intrusive than previous versions.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:17 EST