在linux中,“top”中的所有值是什么,命令是什么意思? [英] In linux, what do all the values in the "top" command mean?

查看:329
本文介绍了在linux中,“top”中的所有值是什么,命令是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您运行top并查看所有正在运行的进程时,我总是想知道什么是实际意义。例如所有各种单字母状态代码(R = Running,S = Sleeping等)

When you run "top" and see all running processes, I've always wanted to know just what everything actually means. e.g. all the various single-letter state codes for a running process (R = Running, S = Sleeping, etc...)

我在哪里可以找到这个?

Where can I find this?

推荐答案

手册页说明了状态代码映射到什么,而不是它们实际意义。从顶部手册页:

The man page says what the state codes are mapped to, but not what they actually mean. From the top man page:

'D' = uninterruptible sleep
'R' = running
'S' = sleeping
'T' = traced or stopped
'Z' = zombie

'R'是最简单的;

'S'和'D'是两个睡眠状态,其中进程是可以运行的,并且将在每次转向使用CPU时运行。等待事情发生。不同的是,'S'可以被信号中断,而'D'不能(当进程正在等待磁盘时通常会看到)。

'S' and 'D' are two sleep states, where the process is waiting for something to happen. The difference is that 'S' can be interrupted by a signal, while 'D' cannot (it is usually seen when the process is waiting for the disk).

T'是进程停止的状态,通常通过 SIGSTOP SIGTSTP 停止。它也可以由调试器( ptrace )停止。当你看到那个状态,通常是因为你使用Ctrl-Z在背景上放置一个命令。

'T' is a state where the process is stopped, usually via SIGSTOP or SIGTSTP. It can also be stopped by a debugger (ptrace). When you see that state, it usually is because you used Ctrl-Z to put a command on the background.

'Z'是一个状态,它已经完成了它的执行),唯一剩下的是在内核上描述它的结构。它正在等待其父进程检索其退出代码,而不是更多。在父进程完成后,它将消失。

'Z' is a state where the process is dead (it has finished its execution), and the only thing left is the structure describing it on the kernel. It is waiting for its parent process to retrieve its exit code, and not much more. After its parent process is finished with it, it will disappear.

这篇关于在linux中,“top”中的所有值是什么,命令是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆