linux下命令执行时间统计工具time使用小结
来源:互联网 发布:罗百吉 什么世界 知乎 编辑:程序博客网 时间:2024/05/01 06:30
1.time
time命令常用于测量一个命令的运行时间,注意不是用来显示和修改系统时间的(这是date命令干的事情)。
2.使用格式
time [option] comand [arguments...]
[root@web186 root]# time find . -name "mysql.sh" ./work186/sms/bin/mysql.sh./work186/sms/src/scripts/mysql.sh./work186/sms/src/scripts1/mysql.sh./work186/sms1/bin/mysql.sh./work186/sms1/src/scripts/mysql.sh./temp/sms/bin/mysql.sh./temp/sms/src/scripts/mysql.shreal 0m14.837suser 0m0.030ssys 0m0.120s其中,
real表示time后的命令实际使用时间(real time),即是从command命令开始执行到运行终止的消耗的总时间。
user表示time后的命令执行完成花费的用户CPU时间,即命令在用户态中执行时间总和。
sys表示time后的命令执行完成花费的系统CPU时间,即命令在核心态中执行时间总和。
备注,通常来说real>user+sys,比说说命令执行会等待IO,等待IO时并没有实际消耗CPU的时间。
参考学习资料来源于:
http://codingstandards.iteye.com/blog/798788
0 0
- linux下命令执行时间统计工具time使用小结
- linux下命令执行时间统计工具time使用小结
- Linux使用time命令获取命令执行时间
- linux使用time命令获取命令执行时间
- linux使用time命令获取命令执行时间
- 使用time命令获取命令执行时间
- 计算命令执行时间time
- linux 下的sar工具命令小结
- linux 下的sar工具命令小结
- linux下的sar工具命令小结
- linux 下的sar工具命令小结
- linux 下的sar工具命令小结
- linux 下的sar工具命令小结
- linux 下的sar工具命令小结
- linux 下的sar工具命令小结
- linux 下的sar工具命令小结
- linux 下的sar工具命令小结
- linux 下的sar工具命令小结
- 一台MySQL服务器启动多个端口
- 利用Python进行机器学习和数据挖掘概述
- [漫画]程序员的日常生活 46
- 《笨办法学Python》 第4课手记
- QML 动画特效之撞墙反弹
- linux下命令执行时间统计工具time使用小结
- [漫画]程序员的日常生活 47
- signalfd API 使用总结
- Codeforces Round #337 (Div. 2) A Pasha and Stick B Vika and Squares
- Python源码解析——PyType_GenericAlloc
- [漫画]程序员的日常生活 48
- Spring+myBatis3
- [漫画]程序员的日常生活 49
- windows上 使用msysgit的步骤及遇到的若干问题