Re: time foo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 1 December 2017 at 11:49, hw <hw@xxxxxxxx> wrote:
>
> Hi,
>
> isn´t this weird:
>
>
> # time foo
> real    43m39.841s
> user    15m31.109s
> sys     0m44.136s
>

This is counting the CPU time that a process used. If something is not
in 'CPU' but waiting on input etc it might not get counted in user or
sys. There is also the fact that the builtin bash time command you
used calculates things differently from the /usr/bin/time command.

>From the /usr/bin/time man page
        Note: some shells (e.g., bash(1)) have a  built-in  time  command  that
       provides less functionality than the command described here.  To access
       the real command, you may need to specify its pathname (something  like
       /usr/bin/time).

>From the bash man page
       When the shell is in posix mode, time may be followed by a newline.  In
       this case, the shell displays the total user and system  time  consumed
       by  the shell and its children.  The TIMEFORMAT variable may be used to
       specify the format of the time information.

The built in time is actually meant to be used with measuring pipeline
information but can be used by itself


>
> Almost 30 minutes have disappeared, but it actually took about that long,
> so what happened?
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> https://lists.centos.org/mailman/listinfo/centos



-- 
Stephen J Smoogen.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux