This repository was archived by the owner on Sep 6, 2023. It is now read-only.
This repository was archived by the owner on Sep 6, 2023. It is now read-only.
Open
Description
top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,常用于服务端性能分析。 在top命令中按f按可以查看显示的列信息,按对应字母来开启/关闭列,大写字母表示开启,小写字母表示关闭。
- 监控某一个进程
top -p {pid}
- 将监控结果输出到文件
top -p {pid} -n 100 -b > top.log
-n , 监控次数
-b , 批量模式, 和-n配合输出监控结果
- 对某一线程5s钟监控一次,监控100次并将监控结果输出到文件
nohup top -p {pid} -d 5 -n 100 -b > top.log
October 10, 2019 at 10:58AM
via Instapaper https://ift.tt/2MqPOPr