What do 'real', 'user' and 'sys' mean in the output of time(1)?

前端 未结 7 797
执笔经年
执笔经年 2020-11-22 00:35
$ time foo
real        0m0.003s
user        0m0.000s
sys         0m0.004s
$

What do \'real\', \'user\' and \'sys\' mean in the output of time?

7条回答
  •  庸人自扰
    2020-11-22 00:44

    I want to mention some other scenario when the real-time is much much bigger than user + sys. I've created a simple server which respondes after a long time

    real 4.784
    user 0.01s
    sys  0.01s
    

    the issue is that in this scenario the process waits for the response which is not on the user site nor in the system.

    Something similar happens when you run the find command. In that case, the time is spent mostly on requesting and getting a response from SSD.

提交回复
热议问题