top

top- display Linux processes

The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of processes or threads currently being managed by the Linux kernel. The types of system summary information shown and the types, order and size of information displayed for processes are all user configurable and that configuration can be made per‐sistent across restarts.
The program provides a limited interactive interface for process manipulation as well as a much more extensive interface for personal configuration -- encompassing every aspect of its operation. And while top is referred to throughout this document,you are free to name the program anything you wish. That new name, possibly an alias, will then be reflected on top's display and used when reading and writing a configuration file.

top基本视图

  • 第1行:
  • 第2行:
  • 第3行:
  • 第4-5行:
  • 进程:
    通过top命令进入基本视图,默认情况下,各进程按CPU占用情况来排序,如下图中,进程id为980的teamviewerd进程排在第一(CPU占用4%),进程id为11996的teamviewerd进程排在第一(CPU占用4%)。
    1374134-20190218153326007-1952087441.png

top常用交互命令

帮助命令

h或?
1374134-20190218153327356-1002790627.png

打开/关闭加亮效果

- 敲击键盘b,top视图变化如下:

1374134-20190218153328428-1345997609.png
可以通过敲击y键关闭或打开运行态进程的加亮效果。
- 敲击键盘x(打开或关闭排序列的加亮效果),top视图变化如下:
1374134-20190218153329775-789372085.png
可以看到,默认的排序是按CPU的占用情况降序排列。

改变排序列,可以通过shift+>和shift+<改变排序列,下图是按shift+>后的效果图:

1374134-20190218153331403-1534148011.png

改变进程显示字段

敲击f键,top进入另一个视图,在这里可以编排基本视图中的显示字段:
1374134-20190218153332602-713128133.png
这里列出了所有可在top基本视图中显示的进程字段,有并且标注为大写字母的字段是可显示的,没有并且是小写字母的字段是不显示的。按提示进行相应的操作,隐藏或显示某些列,以增加CODE和DATA列为例:
1374134-20190218153333883-853678248.png
按Enter键返回到基本视图后,发现多了CODE和DATA这2列:
1374134-20190218153335369-1032386478.png

显示多个CPU

数字键:1 2 3 4

持续更新......

参考链接:
https://www.cnblogs.com/bolwing-1991/p/3557287.html
https://www.cnblogs.com/zhoug2020/p/6336453.html





转载于:https://www.cnblogs.com/whatislinux/p/8a4c36575f763d17f74ff7596dd3f14b.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值