[Gllug] disk_io in /proc/stat
Nix
nix at esperi.demon.co.uk
Wed Aug 7 23:00:55 UTC 2002
On Wed, 07 Aug 2002, elvis i. pannkakan uttered the following:
> What information does the disk_io data in /proc/stat hold? There seem to
It changed format repeatedly in the 2.4 era.
> be five integers for each disk. I haven't found any documentation of it
> yet (including /usr/src/linux/Documentation/filesystems/proc.txt). I'm
> guessing it's showing disk reads and writes somehow, but does anyone
> know the details? Are there any similarities to the good old iostat?
Sort of, but not very much. It's not a byte count as such.
> Here's a sample:
> disk_io: (3,0):(777312,92235,1592988,685077,14547762)
Ah, 2.4.11+ (IIRC) then. (Certainly my 2.4.18/2.4.19 boxes use this
format.)
This is filled out by fs/proc/proc_misc.c:kstat_read_proc(), and the
statistics it reports are kept up to date by
drivers/block/ll_rw_blk.c:drive_stat_acct().
The syntax is (sorry for the long line)
disk_io (major,minor):(read+write-requests,read-requests,read-sectors,write-requests,write-sectors)
So I, with two disks, currently have
disk_io: (8,0):(8739263,5192050,55605966,3547213,78520164) (8,1):(1009542,755792,14730050,253750,5039392)
in there. (But this is on an UltraSPARC, and thus a 64-bit kernel: these
fields are unsigned ints, so it occurs to me that IA32 CPUs will
probably be quite vulnerable to wrapping in these fields.)
Hope this helps.
--
`There's something satisfying about killing JWZ over and over again.'
-- 1i, personal communication
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list