Re: per process I/O stats ?

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

 



Selon Guillaume Thouvenin <guillaume.thouvenin@polymtl.ca>:

>  Is there a way to get information about I/O like how many blocks and char
> read
> or wrote by a process? This kind of information is available per-cpu but I
> don't
> find it per-process. Field "io_context" find in the task_struct doesn't give
> this information. 
> 
>  I ask that because I wanted to use information given by BSD process
> accounting
> but this information isn't complete. In particular in do_acct_process():
> 
>     ...
>     ac.ac_io = encode_comp_t(0 /* current->io_usage */);    /* %% */         
                                                             
>     ac.ac_rw = encode_comp_t(ac.ac_io / 1024);
>     ...

It's the same for the rusage structure. Fields about IO are present (ru_inblock,
ru_outblock, ...) but they are not updated. When you get information using
getrusage, there is only values that already are in the task_struct that are
updated. 

Thanks for your help,
Guillaume

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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