Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I do ps -ef on my Linux box, I get: UID PID PPID C STIME TTY TIME CMD

Please help me with meaning of C,TIME. is the TIME , the actual cpu time allocated to the process?

share|improve this question
1  
Run man ps and type / C with the spaces around C to search for the answer. –  Mikel Apr 10 '12 at 13:58
add comment

1 Answer

If you run man ps then type /SpaceShift+CSpaceEnter, you should see this line.

   C     pcpu         cpu utilization

but that's under the OBSOLETE SORT KEYS header, so is not what we're looking for.

Press n to find the next match:

   c           C         processor utilization. Currently, this is the
                         integer value of the percent usage over the
                         lifetime of the process.
                         (see %cpu).

which sounds right. For more details, we search for %cpu and find:

   %cpu        %CPU      cpu utilization of the process in "##.#" format.
                         Currently, it is the CPU time used divided by the
                         time the process has been running cputime/realtime
                         ratio), expressed as a percentage. ...
                         (alias pcpu).

And TIME has two matches, but only one that matches the hh:mm:ss format:

   cputime     TIME      cumulative CPU time, "[DD-]hh:mm:ss" format. (alias time).

Cumulative CPU time is the amount of time the processor spent running the process, i.e. actually using CPU cycles, not sleeping, waiting to run, or waiting for I/O.

It's determined by summing the utime and stime values that are described in the proc(5) man page.

  utime %lu   Amount of time that this process has been scheduled in user mode...
  stime %lu   Amount of time that this process has been scheduled in kernel mode...
share|improve this answer
    
+1 for guiding easier browsing in man ps –  Cengiz Can Apr 10 '12 at 14:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.