乱读天书, 不求甚解
周祎骏的个人云笔记
Toggle navigation
乱读天书, 不求甚解
主页
Linux:系统配置
Linux:用户管理
Linux:优化排错
Linux:进程调度
Linux:文件系统
Linux:网络
Linux:系统服务
Linux:安全
Linux:内核
容器:Docker
容器:containerd
容器编排:Kubernetes
IAC:Terraform
大数据:Hadoop
大数据:Zookeeper
大数据:Hbase
消息队列:rsyslog
消息队列:kafka
数据库:MySQL
数据库:MongoDB
搜索引擎:Elasticsearch
时序数据库:OpenTSDB
网站服务:Nginx
编程:Bash
编程:Perl
编程:Python
编程:C
编程:JAVA
编程:Rust
版本控制:gitlab
知识管理:docusaurus
常用小工具
关于我
标签
Linux优化排错 2.0 进程运行时间,占用资源
2017-08-12 01:46:59
60
0
0
admin
> 命令time 和bash关键词 time #用bash 关键词“time”统计一个命令的运行时间 ``` [root@test1 ~]# time sleep 1 real 0m1.001s user 0m0.000s sys 0m0.000s ``` *** #用time 命令统计一个命令运行的时间,占用的资源 ``` [root@test1 ~]# which time /usr/bin/time [root@test1 ~]# /usr/bin/time -v sleep 1 Command being timed: "sleep 1" User time (seconds): 0.00 System time (seconds): 0.00 Percent of CPU this job got: 0% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:01.00 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 596 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 180 Voluntary context switches: 2 Involuntary context switches: 0 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 ``` *** #查看进程信息 [查看进程信息](/blog/post/admin/Linux_process-0)
上一篇:
Linux优化排错 1.33 用dd命令测试IO性能或者创建文件
下一篇:
Linux优化排错 2.1 查看一个进程的系统调用
文档导航