Re: [RFC] [PATCH procfs] Add process age

From: Andi Kleen
Date: Mon Jul 26 2010 - 03:47:54 EST


Davidlohr Bueso <dave.bueso@xxxxxxxxx> writes:

> On Fri, 2010-07-23 at 21:35 +0300, Alexey Dobriyan wrote:
>> On Fri, Jul 23, 2010 at 01:47:51PM -0400, Davidlohr Bueso wrote:
>> > This patch exports a process's age, in seconds, adding a /proc/#/age file.
>>
>> What for?
>
> I have not found any straight way to get the run time of a processes,
> without having to interpret the start_time entry in /proc/#/stat and
> manually subtract the uptime from it.

That sounds like something an user space program should simply do.
Perhaps you can add it as a new optional "-o" field in "ps" ?

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/