Linux Format

The output of the time() utility

-

Because the time() utility is used in this tutorial, it would be nice to learn how to interpret its output. So, the time() utility executes the specified command as usual while collecting timing statistics about it.

The statistics are printed after the command finishes its execution. The timing statistics come in three categories: real, user and sys. The real value shows the actual time it took the command to execute from start to finish. The user value is the CPU time spent executing code in user-mode, whereas the sys value is the CPU time that the program spent executing code in kernel mode. If you add the user and sys values you’ll get the total time of CPU time. However, if you’re using a machine with multiple CPUs and cores, the CPU time might exceed the value of the real statistic.

Please bear in mind that the output of time() may depend on the current load of the Linux system you’re operating.

Newspapers in English

Newspapers from Australia