Re: iostat problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Jul 17, 2008 at 12:07 PM, Wang Yu <wangyuict@xxxxxxxxx> wrote:
> Hi, all
>
> if I input "iostat -dx" in shell, it will output the followings:
>
> Linux 2.6.20 (genode003)        07/17/2008
>
> Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s
> avgrq-sz avgqu-sz   await  svctm  %util
> sda          0.02   0.68  0.10  0.28    2.34    7.71     1.17     3.85
> 26.05     0.01   14.26   1.48   0.06
>
> I want to get the %util field in kernel space, what can i do? or how can I
> calculate this value by other means?
    You need to look 2.6.20 kernel source. %util is actually coming
from output of
cat /proc/diskstat and you can find its source code in block/genhd.c line no.586
I think its  %utils is output of  jiffies_to_msecs(disk_stat_read(gp,
time_in_queue)).
Check that code and work on what you need.

Regards,
Parag.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux