[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090817153253.52bf9c69.kamezawa.hiroyu@jp.fujitsu.com>
Date: Mon, 17 Aug 2009 15:32:53 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Amerigo Wang <xiyou.wangcong@...il.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
LKML <linux-kernel@...r.kernel.org>,
Tatsuhiro Aoshima <tatsu.pc@...il.com>,
YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
Subject: Re: [PATCH] proc: let task status file print utime and stime.
On Mon, 17 Aug 2009 14:32:02 +0800
Amerigo Wang <xiyou.wangcong@...il.com> wrote:
> On Mon, Aug 17, 2009 at 03:22:06PM +0900, KAMEZAWA Hiroyuki wrote:
> >On Mon, 17 Aug 2009 14:18:21 +0800
> >Amerigo Wang <xiyou.wangcong@...il.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.
>
> Sure, we already have '-p' for 'ps', e.g.
>
> ps -p 1 -o pid,user,comm
>
> Enjoy. :-)
I said it's verrrrry slow.
>
> Anyway, I would like to see 'ps' to have 'utime,stime' field, on
> my machine, its output for 'utime,stime' looks wrong.
>
> Maybe we should Cc procps developers?
ya, maybe. it's good to be CCed.
BTW, why all other status
Name: cat
State: R (running)
Tgid: 7068
Pid: 7068
PPid: 6115
TracerPid: 0
Uid: 500 500 500 500
Gid: 500 500 500 500
FDSize: 256
Groups: 500
are allowed to be duplicated ?
I bet stime.utime will be used more often than TracerPid/FDSize/ ;)
Thanks,
-Kame
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists