From running time over my program I've got:

real    4m41.679s
user    20m58.623s
sys 0m49.471s

What does this output means? What is real and what is user?

  • To find this info on your local computer, run info time in a terminal (install docs first if it is not found). Look at the sections Setting format to see which variables the default output format uses and Format string to see what the variables mean. Also pay attention to that e.g. Bash uses its own built-in time command, and you have to invoke /usr/bin/time or similar (see which time` for the exact path, or just invoke which time) to run the "common" version. Mar 22 '12 at 17:32

Running help time in bash gives:

time: time [-p] pipeline
    Report time consumed by pipeline's execution.
    Execute PIPELINE and print a summary of the real time, user CPU time,
    and system CPU time spent executing PIPELINE when it terminates.

Running man 7 time give a description of real, user CPU and system CPU time:

Real time is defined as time measured from some fixed point (e.g., the start) in the life of a process (elapsed time).

User CPU time is the time spent executing code in user mode. System CPU time is the time spent by the kernel executing in system mode on behalf of the process (e.g., executing system calls).

  • Which of those is time elapsed from the beginning of the process till the end?
    – Artem
    Mar 22 '12 at 20:00
  • 1
    @Artem: As user1055604's answer (now) says: "Real" time means elapsed time for the command. Mar 22 '12 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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