How to get processes' I/O utilization percentage

Two notices: 1, a process has only one main thread which is itself. 2, a process has many threads.

asked Aug 27 by harryxiyou (4,690 points)

1 Answer

 
Best answer

Solution 1: Please use taskstats [1] related interfaces, and send TASKSTATS_TYPE_PID and TASKSTATS_TYPE_TGID commands to kernel to get a process's 'blkio_delay_total' parameter for a process with one main thread and a process with threads separately.

Solution 2: instrument kernel to get process's I/O utilization percentage. See [2] for details.

[1] https://www.kernel.org/doc/Documentation/accounting/
[2] https://github.com/iovisor/bcc

answered Aug 27 by harryxiyou (4,690 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...