分类: LINUX
2010-04-08 14:02:46
在linux命令下,敲入time ls ,即可得到下面:
[root@mail ~]# time ls
2.doc bak mail package
AdobePhotoshopCS4-11.0.1.rar index.html Maildir
amavisd.conf install.log main.cf
anaconda-ks.cfg install.log.syslog master.cf
real 0m0.003s
user 0m0.000s
sys 0m0.002s
real,就是整个运行这个进程从一开始到结束的整个时间(时钟墙)
user,是指在运行这个进程中花在用户模式下的时间,即不包括内核的运行时间
sys,是指在运行这个进程,花在内核调用的时间,而不是代码库调用
user+sys=这个进程花的时间
下面是网上下的出处
Real, User and Sys process time statistics
One of these things is not like the other. Real refers to actual elapsed time; User and Sys refer to CPU time used only by the process.
User+Sys will tell you how much actual CPU time your process used.