Linux命令之time - 测定一个命令的运行时间!
来源:互联网 发布:下载别人网站前端源码 编辑:程序博客网 时间:2024/05/02 02:49
time命令常用于测量一个命令的运行时间,注意不是用来显示和修改系统时间的(这是date命令干的事情)。包括实际使用时间(realtime)、用户态使用时间(the process spent in user mode)、内核态使用时间(the process spent in kernel mode)。
常用参数
time命令最常用的使用方式就是在其后面直接跟上命令和参数:
time <command> [<arguments...>]
在命令执行完成之后就会打印出CPU的使用情况:
real 0m5.064s <== 实际使用时间(real time)
user 0m0.020s <== 用户态使用时间(the process spent in user mode)
sys 0m0.040s <==内核态使用时间(the process spent in kernel mode)
time命令跟上-p参数可以只打印时间数值(秒数),不打印单位。
使用示例
[root@linux ~]# time -p date2012年 07月 05日 星期四 00:32:51 CSTreal 0.01user 0.00sys 0.01[root@linux ~]# time date2012年 07月 05日 星期四 00:33:00 CSTreal 0m0.010suser 0m0.001ssys 0m0.008s
- Linux命令之time - 测定一个命令的运行时间!
- Linux命令之time - 测定一个命令的资源使用情况
- Linux time --测定一个命令的资源使用情况
- Linux命令之time
- Linux 的 time 命令
- Linux 的time命令
- linux的time命令
- ios代码段运行时间的测定
- Linux系统使用time计算命令执行的时间
- Linux系统使用time计算命令执行的时间
- 图解Linux命令之--time命令
- Linux周期运行一个命令的脚本
- linux下的time 命令
- Linux终端的time命令
- Linux命令之查询系统运行时间-uptime
- 【每天一个Linux命令】08. Linux中time命令的用法
- linux/UNIX统计程序运行时间的命令
- 在 Linux 下查看进程运行时间的命令
- java中的常用正则
- 消息中间件 Apache Qpid 简介
- 使用动画增强您的 Windows 应用程序体验
- 牛式
- perl和mysql的api
- Linux命令之time - 测定一个命令的运行时间!
- IOS 添加广告的主要委托方法
- 享45个android实例源码
- 如何用DOS命令,获取一个目录下的文件数目
- 通过域名解决服务器故障自动转移
- File操作注意
- 大象---Thinking in UML-UML核心元素
- c++ console prject 几个头文件
- Android TouchEvent 分发流程