Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

top命令 实时显示进程动态 Linux命令大全(手册) #119

Open
jwenjian opened this issue Oct 10, 2019 · 0 comments
Open

top命令 实时显示进程动态 Linux命令大全(手册) #119

jwenjian opened this issue Oct 10, 2019 · 0 comments

Comments

@jwenjian
Copy link
Owner

jwenjian commented Oct 10, 2019

top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,常用于服务端性能分析。 在top命令中按f按可以查看显示的列信息,按对应字母来开启/关闭列,大写字母表示开启,小写字母表示关闭。


  1. 监控某一个进程
top -p {pid}
  1. 将监控结果输出到文件
top -p {pid} -n 100 -b > top.log

-n , 监控次数
-b , 批量模式, 和-n配合输出监控结果

  1. 对某一线程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

@jwenjian jwenjian changed the title [From Instapaper] : top命令 实时显示进程动态 Linux命令大全(手册) top命令 实时显示进程动态 Linux命令大全(手册) Oct 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant