当前位置: 首页 > news >正文

[LINUX使用] top 命令的使用

COLUMNS=150 LINES=100 top

序号

是否为启动命令

命令模板

详解

1

no

vh

帮助

2

yes

-d 0.01

0.01秒的间隔刷新top输出

3

no

c

COMMAND列切换

4

yes

-e [k | m | g | t | p]

 

以何种计量单位显示内存列

k-kb,m-mb,g-gb,t-tb

5

yes

-i

不显示idel状态的进程,即不占cpu的进程不会显示出来

6

yes

-o [field name]

启动就按照某个字段进行排序,不如 -o %CPU表示启动就以 cpu 使用率排序

7

yes

-O

列出 -o 选项所有可以使用的值

8

yes

-p [N1, N2...]

 

跟踪某些进程号的进程,逗号隔开

非启动命令u取消此命令的筛选效果

9

yes

-1 / -2 / -3 / -4 / ...

跟踪具体某个CPU,不常用

10

no

k

向某个进程号的进程发送 signal , 按k后会要求先输入进程号,再要求输出信号值

11

no

M / N / T / P

按照 内存/PID/运行时间/CPU使用率 排序

12

yes

-u [username]

只罗列某个用户创建的进程

13

no

t

切换cpu统计显示的格式

 

no

m

切换内存统计显示的格式

yes

-n

只刷新n次就退出,用处不大

no

r

改变某个进程的nice值

no

o

对当前输出增加过滤条件,比如 %CPU>90.0 只显示所有CPU 大于 90%的进程。与-O配合使用

 

no

f

自定义输出内容,上下focus到条目上,d用来改变是否显示,右抓起条目再通过上下来调整显示在哪一列,左来释放抓起状态从而将指定列安插到目标位置。

每一列的解释:

PID (Process Identification) - The process ID assigned to each task. This is assigned a unique number which is not assigned in numerical order, so it is normal to what appears to be a random selection of numbers.

PPID (Parent Process Identification) - PIDs can share a single PPID. A single process can create several child processes. Typically a PPID of 1 will be seen within this column however other values will be seen depending on the parent process which it was derived from. This also indicates that the process was derived from the Init process which is also referred to the grandfarther process. The PID is unique whereas the PPID can be a duplicate value.

USER - The process or task in which user it was created under. Since EXOS runs on a Linux platform, the root user is used within the core background.

STAT (State) - Represent the state of the process/task running. The state flags include:

S - sleeping

D - uninterruptible sleep

R - running

W - swapped out process

Z - zombies

T - stopped or traced

N - process with positive nice value

< - process with negative nice value

 

RSS (Resident Set Size) - The amount of memory total used for the task/process used. This statistical information is also show in further detail within the command show memory process <name>.

当前使用的物理内存

%MEM - The share of physical memory in percentage being used by the process/task.

使用的物理内存占使用的虚拟内存的百分之几

CPU - The physical processor being used. This can be represented by CPU0 or CPU1 depending on the CPU architecture type.

%CPU - The total CPU percentage in which is being used by the CPU. This is typical used to identify problematic process/tasks that could be overutilize the CPU.

http://www.lryc.cn/news/117569.html

相关文章:

  • 通过redis进行缓存分页,通过SCAN扫描进行缓存更新
  • C#小轮子 Debug,Release,发布模式如何运行不同的代码
  • 【【萌新的STM32 学习-6】】
  • “深入解析JVM:探索Java虚拟机的工作原理“
  • 【目标检测系列】YOLOV2解读
  • 【深入浅出程序设计竞赛(基础篇)第一章 算法小白从0开始】
  • openGauss学习笔记-36 openGauss 高级数据管理-TRUNCATE TABLE语句
  • ChatGPT生成文本检测器算法挑战大赛
  • O2OA开发平台实施入门指南
  • 服装行业多模态算法个性化产品定制方案 | 京东云技术团队
  • MySQL表空间结构与页、区、段的定义
  • RaabitMQ(三) - RabbitMQ队列类型、死信消息与死信队列、懒队列、集群模式、MQ常见消息问题
  • Unity3D GPU Selector/Picker
  • 灰度非线性变换之c++实现(qt + 不调包)
  • 轻量级Web框架Flask
  • 【gridsample】地平线如何支持gridsample算子
  • JPA实现存储实体类型信息
  • 阿里云快速部署开发环境 (Apache + Mysql8.0+Redis7.0.x)
  • 语音秘书:让录音转文字识别软件成为你的智能工作助手
  • 【腾讯云 Cloud Studio 实战训练营】用于编写、运行和调试代码的云 IDE泰裤辣
  • [C#] 简单的俄罗斯方块实现
  • postman官网下载安装登录详细教程
  • (贪心) 剑指 Offer 14- I. 剪绳子 ——【Leetcode每日一题】
  • 如何将Linux上的cpolar内网穿透设置成 - > 开机自启动
  • 50.两数之和(力扣)
  • k8s基础
  • 【自然语言处理】大模型高效微调:PEFT 使用案例
  • FFmpeg将编码后数据保存成mp4
  • 设置VsCode 将打开的多个文件分行(栏)排列,实现全部显示
  • Vue.js2+Cesium1.103.0 六、标绘与测量