This is what I got from the terminal command "time".
shell 0.32s user 0.08s system 0% cpu 6:09.64 total children 0.10s user 0.16s system 0% cpu 6:09.64 total
What is children?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
time you use in your question is not a command, but rather a reserved word in zsh. It can be used in two different ways and its output can be customized through the
$TIMEFMT parameter. Additionally, there is an external command
time on macOS (and most other Unix-like OSes), which produces slightly different output.
If you use
time by itself (as shown in your question), then your current shell will report time statistics for itself and its children:
shellrepresents the shell in which you executed your
childrenis a summary of all running processes started from (and still owned by) that shell.
systemshow the amount of CPU seconds the above processes spent in user mode and kernel mode, respectively.
cpushows the combined values of
system, as a percentage of total CPU time.
totalshows how long ago the shell or its oldest child process was started (here in minutes:seconds.fraction).
time is added before a command. If you use it that way, then the shell will report time statistics for that command only:
% time sleep 0 sleep 0 0.00s user 0.00s system 43% cpu 0.007 total %
total here is the number of seconds it took for the command to complete.
time's output can be customized by setting the
$TIMEFMT parameter. For example, we can add memory usage:
% TIMEFMT+=' max RSS %M' % time shell 0.22s user 0.10s system 53% cpu 0.601 total max RSS 6120 children 0.11s user 0.16s system 45% cpu 0.601 total max RSS 3056 % time sleep 0 sleep 0 0.00s user 0.00s system 61% cpu 0.003 total max RSS 580 %
The external command
time can be used as follows:
% command time % command time sleep 0 0.00 real 0.00 user 0.00 sys % command time -p sleep 0 real 0.00 user 0.00 sys 0.00 % command time -l sleep 0 # Show memory usage 0.00 real 0.00 user 0.00 sys 585728 maximum resident set size 0 average shared memory size 0 average unshared data size 0 average unshared stack size 160 page reclaims 0 page faults 0 swaps 0 block input operations 0 block output operations 0 messages sent 0 messages received 0 signals received 0 voluntary context switches 1 involuntary context switches 2198249 instructions retired 3195521 cycles elapsed 237568 peak memory footprint %
real here is the same as