lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 17 Aug 2009 14:18:21 +0800
From:	Amerigo Wang <xiyou.wangcong@...il.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	Amerigo Wang <xiyou.wangcong@...il.com>,
	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, Aug 17, 2009 at 11:42:42AM +0900, KAMEZAWA Hiroyuki wrote:
>On Mon, 17 Aug 2009 10:38:02 +0800
>Amerigo Wang <xiyou.wangcong@...il.com> wrote:
>
>> On Sat, Aug 15, 2009 at 11:36:41PM +0900, KOSAKI Motohiro wrote:
>> >From: Tatsuhiro Aoshima <tatsu.pc@...il.com>
>> >Subject: [PATCH] proc: let task status file print utime and stime.
>> >
>> >The task status file in proc file system did not contain
>> >user-time and system-time. Thus, users could not get
>> >those information of running task easily. I think
>> >these values should be provived in human readable format.
>> >By this patch, users can get stime and utime very easily.
>> 
>> 
>> Why? /proc/<pid>/stat already has these.
>> 
>
>I wonder /proc/<pid>/stat is unreadable for usual human.
>Most of ents in /proc/<pid>/status is duplicated output of 
>some other files(i.e. /proc/<pid>/stat) and /proc/<pid>/status is
>for human readble format.


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.

Thanks.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ