real,user and sys 进程时间统计
2011-07-28 14:01
288 查看
在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.cfreal 0m0.003s
user 0m0.000s
sys 0m0.002sreal,就是整个运行这个进程从一开始到结束的整个时间(时钟墙)user,是指在运行这个进程中花在用户模式下的时间,即不包括内核的运行时间sys,是指在运行这个进程,花在内核调用的时间,而不是代码库调用user+sys=这个进程花的时间下面是网上下的出处
Real, User and Sys process time statisticsOne of these things is not like the other. Real refers to actual elapsed time; User and Sys refer to CPU time usedonly by the process.Real is wall clock time - time from start to finish of the call. This is all elapsed time including time slices used by other processes and time the process spends blocked (for example if it is waiting for I/O to complete).
User is the amount of CPU time spent in user-mode code (outside the kernel) within the process. This is only actual CPU time used in executing the process. Other processes and time the process spends blocked do not count towards this figure.
Sys is the amount of CPU time spent in the kernel within the process. This means executing CPU time spent in system calls within the kernel, as opposed to library code, which is still running in user-space. Like ‘user’, this is only CPU time used by the process. See below for a brief description of kernel mode (also known as ’supervisor’ mode) and the system call mechanism.
User+Sys will tell you how much actual CPU time your process used.
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.cfreal 0m0.003s
user 0m0.000s
sys 0m0.002sreal,就是整个运行这个进程从一开始到结束的整个时间(时钟墙)user,是指在运行这个进程中花在用户模式下的时间,即不包括内核的运行时间sys,是指在运行这个进程,花在内核调用的时间,而不是代码库调用user+sys=这个进程花的时间下面是网上下的出处
Real, User and Sys process time statisticsOne of these things is not like the other. Real refers to actual elapsed time; User and Sys refer to CPU time usedonly by the process.Real is wall clock time - time from start to finish of the call. This is all elapsed time including time slices used by other processes and time the process spends blocked (for example if it is waiting for I/O to complete).
User is the amount of CPU time spent in user-mode code (outside the kernel) within the process. This is only actual CPU time used in executing the process. Other processes and time the process spends blocked do not count towards this figure.
Sys is the amount of CPU time spent in the kernel within the process. This means executing CPU time spent in system calls within the kernel, as opposed to library code, which is still running in user-space. Like ‘user’, this is only CPU time used by the process. See below for a brief description of kernel mode (also known as ’supervisor’ mode) and the system call mechanism.
User+Sys will tell you how much actual CPU time your process used.
相关文章推荐
- real,user and sys 进程时间统计
- 探讨linux进程的三种时间(real time, system cpu time, user cpu time)的实现
- 进程的real , effective , saved user ID
- 1)实际时间(real time): 从command命令行开始执行到运行终止的消逝时间; 2)用户CPU时间(user CPU time): 命令执行完成花费的用户CPU时间,即命令在用户态中执行时间总和; 3)系统CPU时间(system CPU time): 命令执行完成花费的系统CPU时
- 统计代码执行时间,使用Stopwatch和UserProcessorTime的区别
- C语言计算时间函数 & 理解linux time命令的输出中“real”“user”“sys”的真正含义
- time命令中的real,user以及sys时间
- [Linux进程]统计进程的执行时间
- linux下c++多线程下用CLOCK()函数统计程序运行时间 2012-12-11 12:46:01 分类: C/C++ clock()函数的功能: 这个函数返回从“开启这个程序进程”到
- 进程的Real UID Effective UID Saved Set-User-ID
- time命令中的real,user以及sys时间
- cpu-hogs 的 systemtap 工具,可以实时统计某段时间内实际消耗掉的 CPU 时间在所有用户进程及内核线程之间的比例分布。
- Linux进程权限的研究——real user id, effective user id, saved set-user-id
- time 命令用法,注意在求进程实践的时候,real 时间长是因为i/o时间长
- Erlang进程创建时间统计及SMP现象.
- linux clock()函数与real,user,sys时间
- APUE笔记:进程 real user ID, effective user ID, saved set-user-ID
- MR例子(统计各个手机号在某段时间内产生的总流量)
- 利用JMX统计远程JAVA进程的CPU和Memory
- CentOS安装按进程实时统计流量情况工具NetHogs笔记