a: PID -- Process Id
The task's unique process ID, which periodically wraps, though never restarting at zero.
b: PPID -- Parent Process Pid
The process ID of a task's parent.
c: RUSER -- Real User Name
The real user name of the task's owner.
d: UID -- User Id
The effective user ID of the task's owner.
e: USER -- User Name
The effective user name of the task's owner.
f: GROUP -- Group Name
The effective group name of the task's owner.
g: TTY -- Controlling Tty
The name of the controlling terminal. This is usually the device (serial port, pty, etc.) from which the process was started, and which it uses for input or output. However, a
task need not be associated with a terminal, in which case you'll see '?' displayed.
h: PR -- Priority
The priority of the task.
i: NI -- Nice value
The nice value of the task. A negative nice value means higher priority, whereas a positive nice value means lower priority. Zero in this field simply means priority will not
be adjusted in determining a task's dispatchability.
j: P -- Last used CPU (SMP)
A number representing the last used processor. In a true SMP environment this will likely change frequently since the kernel intentionally uses weak affinity. Also, the very
act of running top may break this weak affinity and cause more processes to change CPUs more often (because of the extra demand for cpu time).
k: %CPU -- CPU usage
The task's share of the elapsed CPU time since the last screen update, expressed as a percentage of total CPU time. In a true SMP environment, if 'Irix mode' is Off, top will
operate in 'Solaris mode' where a task's cpu usage will be divided by the total number of CPUs. You toggle 'Irix/Solaris' modes with the 'I' interactive command.
l: TIME -- CPU Time
Total CPU time the task has used since it started. When 'Cumulative mode' is On, each process is listed with the cpu time that it and its dead children has used. You toggle
'Cumulative mode' with 'S', which is a command-line option and an interactive command. See the 'S' interactive command for additional information regarding this mode.
m: TIME+ -- CPU Time, hundredths
The same as 'TIME', but reflecting more granularity through hundredths of a second.
n: %MEM -- Memory usage (RES)
A task's currently used share of available physical memory.
o: VIRT -- Virtual Image (kb)
The total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that have been swapped out.
VIRT = SWAP + RES.
p: SWAP -- Swapped size (kb)
The swapped out portion of a task's total virtual memory image.
q: RES -- Resident size (kb)
The non-swapped physical memory a task has used.
RES = CODE + DATA.
r: CODE -- Code size (kb)
The amount of physical memory devoted to executable code, also known as the 'text resident set' size or TRS.
s: DATA -- Data+Stack size (kb)
The amount of physical memory devoted to other than executable code, also known as the 'data resident set' size or DRS.
t: SHR -- Shared Mem size (kb)
The amount of shared memory used by a task. It simply reflects memory that could be potentially shared with other processes.
u: nFLT -- Page Fault count
The number of major page faults that have occurred for a task. A page fault occurs when a process attempts to read from or write to a virtual page that is not currently present
in its address space. A major page fault is when backing storage access (such as a disk) is involved in making that page available.
v: nDRT -- Dirty Pages count
The number of pages that have been modified since they were last written to disk. Dirty pages must be written to disk before the corresponding physical memory location can be
used for some other virtual page.
w: S -- Process Status
The status of the task which can be one of:
'D' = uninterruptible sleep
'R' = running
'S' = sleeping
'T' = traced or stopped
'Z' = zombie
分享到:
相关推荐
linux top 的源码,可以自己改写,获取cpu 内存,进程的及时信息
Linux中的`top`命令是系统监控工具,它实时显示系统中各个进程的资源占用状况,如CPU使用率、内存使用量、虚拟内存、进程状态等。`top`命令的源代码解析可以帮助我们深入理解其工作原理,对于系统管理员和开发者来说...
Linux系统中的`top`命令是系统管理员和开发者用于实时监控系统资源使用情况的重要工具,它提供了动态视图,展示CPU利用率、内存使用、进程状态等关键信息。`top`源码包的分析可以帮助我们深入了解其内部工作原理,...
"Linux top 命令详解" Linux top 命令是 Linux 下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于 Windows 的任务管理器。下面详细介绍它的使用方法。 认识 top 的显示结果 --------------...
假设我们想要定制 `top` 的输出,仅显示PID、用户、CPU使用率和内存使用率,并将结果保存到CSV文件中,可以使用以下命令: ```bash top -b -n 1 -c -f -o PID,USER,%CPU,%MEM > output.csv ``` 其中: - `-b` 表示...
从这里下载的,还有其他很多源代码。 https://github.com/soarpenguin/procps-3.0.5/blob/master/top.c
Linux 下 top 命令详细简介 top 命令是 Linux 下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于 Windows 的任务管理器。下面详细介绍它的使用方法。 系统整体的统计信息 在 top 命令的...
### Linux下的Top命令参数详解 #### 一、Top命令简介 `top` 命令是Linux系统中一个非常强大的工具,它能够实时地显示系统的各种资源使用情况,特别是CPU和内存的使用情况,以及各个进程的状态。对于系统管理员来说...
### Linux中的Top命令详解 #### 一、Top命令概述 `top`命令是Linux系统中一个非常实用且强大的工具,用于实时显示系统中各个进程的资源占用状况。它提供了CPU使用率、内存使用情况以及系统运行时间等信息,是系统...
本文定位:想通过python调用top命令获取cpu使用率但暂时没有思路的情况。 如果单纯为了获得cpu的利用率,通过top命令重定向可以轻松实现,命令如下: 复制代码 代码如下: top -bi > cpuHistory.log 或 复制代码 代码...
在Linux操作系统中,`top`命令是一个实时动态显示系统状态的工具,它是系统管理员监控系统资源使用情况的重要手段。本文将深入解析`top`命令的使用,包括其基本功能、参数选项以及如何解读其输出结果。 `top`命令...
### Linux 下 `top` 命令的使用详解 `top` 命令是 Linux 系统中非常重要的实时监控工具之一,主要用于查看和监控系统资源使用情况,特别是 CPU 和内存的使用情况。虽然大多数程序员都熟悉 `top` 命令的基本使用,但...
### Linux中top命令参数介绍及查询结果详细分析 #### 一、top命令概述 `top` 命令是Linux操作系统中一个非常实用且强大的工具,它可以实时地展示系统中各个进程的资源占用情况,包括CPU使用率、内存使用量等关键...
在Linux操作系统中,掌握一些基础的系统管理命令是至关重要的,比如`top`, `ps`, `kill`, `free`和`vmstat`等。这些命令提供了监控系统性能、查看进程状态、管理进程以及分析内存和虚拟内存使用情况的能力。本源码包...
### Linux下top命令使用方法详解 #### 一、top 命令简介 `top` 命令是Linux系统中一个非常强大的实时监控工具,它可以帮助用户了解系统的整体运行状态,包括CPU使用率、内存使用情况以及各个进程的状态等。通过`...
top是一个动态显示过程,即可以通过用户按键来不断刷新当前状态.如果在前台执行该命令,它将独占前台,直到用户终止该程序为止. 比较准确的说,top命令提供了实时的对系统处理器的状态监视.它将显示系统中CPU最“敏感”...
在Linux系统中,`top`命令是一个实时动态查看运行中的系统的工具,它提供了对系统资源利用率的详细且实时的监控,包括CPU、内存、虚拟内存、进程等信息。要深入理解`top`命令的工作原理,阅读其源码是最佳的学习方式...
4. **Linux top显示结果解析** `top`命令的输出通常包括以下部分: - 系统运行时间、用户数、平均负载等信息。 - 进程总数、运行、睡眠、停止和僵尸进程的数量。 - CPU状态(用户、系统、空闲、等待I/O等)。 -...