Showing results for 
Search instead for 
Did you mean: 

doubt in timex command

Super Advisor

doubt in timex command

please explan the below 3 field output in timex command




Super Advisor

Re: doubt in timex command

Hi. Any inputs

Re: doubt in timex command

I am quoting from the timex(1) man-page:

timex reports in seconds the elapsed time, user time, and system time
spent in execution of the given command.


Hope that helps.

I am an HPE Employee

Accept or Kudo


Re: doubt in timex command

Real refers to actual elapsed time; User and Sys refer to CPU time used only by the process.

Real is wall clock time - time from start to finish of the call. This is all elapsed time including time slices used by other processes and time the process spends blocked (for example if it is waiting for I/O to complete).'Real' is calculated from a start and end time gathered from the gettimeofday (2) call

User is the amount of CPU time spent in user-mode code (outside the kernel) within the process. This is only actual CPU time used in executing the process. Other processes and time the process spends blocked do not count towards this figure.

Sys is the amount of CPU time spent in the kernel within the process. This means executing CPU time spent in system calls within the kernel, as opposed to library code, which is still running in user-space. Like 'user', this is only CPU time used by the process. See below for a brief description of kernel mode (also known as 'supervisor' mode) and the system call mechanism.

User+Sys will tell you how much actual CPU time your process used. Note that this is across all CPUs, so if the process has multiple threads (and this process is running on a computer with more than one processor) it could potentially exceed the wall clock time reported by Real (which usually occurs). Note that in the output these figures include the User and Sys time of all child processes (and their descendants) as well when they could have been collected although the underlying system calls return the statistics for the process and its children separately.

I work for HPE