Re: Jiffies from userspace

From: Athanasius (Athanasius@gurus.tf)
Date: Sat Feb 02 2002 - 10:21:35 EST


On Fri, Feb 01, 2002 at 12:33:21PM -0800, Jim wrote:
> reasonable way to get an estimate of the "current" value of the
> kernel's jiffies:
>
> set -- `cat /proc/self/stat`; echo ${22}
>
> The cat will start a new process, field 22? of its "stat" node
> under proc should have the jiffies value at the time the process
> was started; so the echo command execute "shortly" thereafter.
>
> But am I right about the struct of stat: Is that really in ${22}?

   Assuming so try:

        awk '{print $22}' /proc/self/stat

for a 'single process' version.

-Ath

-- 
- Athanasius = Athanasius(at)gurus.tf / http://www.clan-lovely.org/~athan/
                  Finger athan(at)fysh.org for PGP key
	   "And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME


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



This archive was generated by hypermail 2b29 : Thu Feb 07 2002 - 21:00:22 EST