Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Daniel Andersson Mar 22 '12 at 17:32
add comment

1 Answer

up vote 1 down vote accepted

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).

share|improve this answer
    
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. –  RedGrittyBrick Mar 22 '12 at 22:09
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.