2019-03-18 04:17:18 +00:00
|
|
|
|
# top
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
> 显示运行进程的动态实时信息。
|
2019-03-18 04:17:18 +00:00
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 执行 top 命令,界面中提供所有选项:
|
2019-03-18 04:17:18 +00:00
|
|
|
|
|
|
|
|
|
`top`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 按内部内存大小排序进程(默认顺序 - 进程 ID):
|
2019-03-18 04:17:18 +00:00
|
|
|
|
|
|
|
|
|
`top -o mem`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 首先按 CPU 启动顺序排序进程,然后按运行时间排序:
|
2019-03-18 04:17:18 +00:00
|
|
|
|
|
|
|
|
|
`top -o cpu -O time`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 只显示给定用户拥有的进程:
|
2019-03-18 04:17:18 +00:00
|
|
|
|
|
|
|
|
|
`top -user {{用户名}}`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 获取有关交互式命令的帮助(我测试并没看到这个功能):
|
2019-03-18 04:17:18 +00:00
|
|
|
|
|
|
|
|
|
`?`
|