[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <oe28v7-g0t.ln1@chipmunk.wormnet.eu>
Date: Mon, 3 Jan 2011 05:12:24 +0000
From: Alexander Clouter <alex@...riz.org.uk>
To: linux-kernel@...r.kernel.org
Subject: Re: Measuring startup-time from userspace
Taras Glek <tglek@...illa.com> wrote:
>
> Does Linux provide a reasonable way to measure how long a process has
> existed for? The goal is to have a function that returns the number of
> milliseconds since process-creation.
>
At a glance:
----
alex@...k:~$ stat /proc/16863/
File: `/proc/16863/'
Size: 0 Blocks: 0 IO Block: 1024 directory
Device: 3h/3d Inode: 837808 Links: 6
Access: (0555/dr-xr-xr-x) Uid: ( 1000/ alex) Gid: ( 1000/ alex)
Access: 2011-01-03 05:07:47.888363341 +0000
Modify: 2011-01-03 05:07:47.888363341 +0000
Change: 2011-01-03 05:07:47.888363341 +0000
----
A nanosecond resolution timestamp for the moment when the pid is created
it seems. I could be completely wrong, but this seems to be one of
those "too easy to be true" moments.
Cheers
--
Alexander Clouter
.sigmonster says: Marriage is the sole cause of divorce.
--
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