lkml.org 
[lkml]   [2008]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjecttaskstats and /proc/.../io asymmetry?
If you look at /proc/pid/stat, you can get the total CPU consumed by a 
process. If you look at /proc/pid/task/tid/stat you can get the cpu
consumed by a thread and if the tid is that of the parent you only gets
its consumption as opposed to all its children.

I was surprised to see that the way process I/O is reported doesn't
follow this model. There are no /prod/pid/task/tid/io entries but
rather you need to look in /proc/tid/io. While I view this as a minor
inconvenience, I can certainly live with it. However, /proc/pid/io does
not show the aggregate I/O numbers for the whole process and that both
surprises and disappoints. This means if I have a process that starts a
bunch of worker threads that do the real work and I want to find the top
I/O consumers I can't simply walk the /proc/pid tree but rather have to
look at all the threads of each process and add them up.

Or am I missing something?

-mark




\
 
 \ /
  Last update: 2008-05-14 13:03    [W:0.035 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site