lkml.org 
[lkml]   [2009]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] proc: let task status file print utime and stime.
On Mon, 17 Aug 2009 14:18:21 +0800
Amerigo Wang <xiyou.wangcong@gmail.com> wrote:

> Ah... in fact, I expected 'ps' can report this, however, surprisingly
> it doesn't have this, at least not what I expect (unless I miss
> something obvious).
>
>
> >
> >In another thinking, in old days, /proc/<pid>/stat was enough because most of
> >users uses scanf() or some C langage to read fixed-format data.
> >/proc/<pid>/status is useful for some script languages which has
> >good parser per line.
> >
>
> Well... I think this work should be left to 'ps', e.g.
>
> ps -o pid,utime,stime
>
> 'ps' is responsible to read /proc/<pid>/stat for the user.
>
Hmm, personally, I don't like 'ps' and its unified filter.

When I want to know status of a process of PID,
# ps -o pid,utime,stime PID

'ps' scans *all* process and filter PID. (try #strace ps)
I like checking /proc/<pid>/<something> without 'ps' in an environment
where thousands of processes runs.

Thanks,
-Kame



\
 
 \ /
  Last update: 2009-08-17 08:27    [W:0.061 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site