[lkml]   [2002]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Jiffies from userspace
    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.

    - Athanasius = Athanasius(at) /
    Finger athan(at) 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
    [unhandled content-type:application/pgp-signature]
     \ /
      Last update: 2005-03-22 13:23    [W:0.020 / U:2.772 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site