lkml.org 
[lkml]   [2006]   [Oct]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
Fromgirish <>
SubjectRe: [PATCH] include children count, in Threads: field present in /proc/<pid>/status (take-3)
DateSun, 1 Oct 2006 20:34:30 +0900
>>  PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD   
>> RSIZE  VSIZE
>> 22429 top         16.6%  0:21.12   1    18    20  1.35M   684K   
>> 1.77M  26.9M
>> --------------------------------------------------------------------- 
>> ---
>> --------------------------------------------------------
>>
>> Comments/opinions?
>
> I fail to see which column you mean.
>
> #TH perhaps? I think, that can be calculated under linux by
>
>  (a) counting the directories in /proc/22429/task using readdir
> or

I have implemented the child_count script, in this way. I was  
wondering what is more convenient.


>  (b) get the nlink of /proc/22429/task and subtract 2, which should  
> give
>      the same as (a), and, better than (a), should also be atomic

This one, is good. I did not think about this approach. 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-01 13:37    [from the cache]
©2003-2008