Skip to contentSkip to conversation

who writes the "disk_io:" entry in /proc/stat ?

DISCUSSION Tim Sullivan 2 participants 2 messages Sep 18, 2001

lore
Share & tools
lore
#0 lore raw

Hello,

does anyone know off the top of their head which piece of code writes the "disk_io:" entry in /proc/stat ?

I've been trying to make some sense of this entry without much success and have so far been unsuccessful at locating the source.

TIA
-tim

#1 lore raw
Quoted 2 lines · Tim Sullivan

does anyone know off the top of their head which piece of code writes the "disk_io:" entry in /proc/stat ?

drive_stat_acct() in drivers/block/ll_rw_blk.c gathers the data, kstat_read_proc() in fs/proc/proc_misc.c implements the output routine.

Format is (device major, disk index):(sum of all io requests, sum of read io requests, sum of blocks read, sum of write io requests, sum of blocks written)

Daniel.