当前位置: 技术问答>linux和unix
关于ps命令
来源: 互联网 发布时间:2016-02-01
本文导语: 我用 ps -el 察看进程信息: 0 O 100 25512 1 21 68 20 ? 4087 ? 0 R 100 25516 1 20 69 20 ? 4515 ? 0 R ...
我用 ps -el 察看进程信息:
0 O 100 25512 1 21 68 20 ? 4087 ?
0 R 100 25516 1 20 69 20 ? 4515 ?
0 R 100 25513 1 20 69 20 ? 4833 ?
00 进程终止,而且它们在进程表中的空间已释放。
R 表示运行结束,
第二行和第三行前两列都是0和R。
请问什么情况下会出现这样的状态, 既然为“R 运行结束“, 为什么进程没有退出,还可以用ps查看到
0 O 100 25512 1 21 68 20 ? 4087 ?
0 R 100 25516 1 20 69 20 ? 4515 ?
0 R 100 25513 1 20 69 20 ? 4833 ?
00 进程终止,而且它们在进程表中的空间已释放。
R 表示运行结束,
第二行和第三行前两列都是0和R。
请问什么情况下会出现这样的状态, 既然为“R 运行结束“, 为什么进程没有退出,还可以用ps查看到
|
建议使用kill 直接杀死进程
再使用 ps -ef|100 查看
再使用 ps -ef|100 查看
|
R 表示运行结束,
=============
是么?
R Running or runnable (on run queue)
=============
是么?
R Running or runnable (on run queue)
|
这是那里来的哦!Linux 2.6.18-1.2798.fc6 x86_64 x86_64 GNU/Linux 下 man ps的部分输出:
--------
PROCESS STATE CODES
Here are the different values that the s, stat and state output specifiers
(header "STAT" or "S") will display to describe the state of a process.
D Uninterruptible sleep (usually IO)
R Running or runnable (on run queue)
S Interruptible sleep (waiting for an event to complete)
T Stopped, either by a job control signal or because it is being traced.
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z Defunct ("zombie") process, terminated but not reaped by its parent.
这里是FreeBSD 6.2-RELEASE下man ps的部分输出:
state The state is given by a sequence of characters, for example,
``RWNA''. The first character indicates the run state of the
process:
D Marks a process in disk (or other short term, uninter-
ruptible) wait.
I Marks a process that is idle (sleeping for longer than
about 20 seconds).
L Marks a process that is waiting to acquire a lock.
R Marks a runnable process.
S Marks a process that is sleeping for less than about 20
seconds.
T Marks a stopped process.
W Marks an idle interrupt thread.
Z Marks a dead process (a ``zombie'').
Additional characters after these, if any, indicate additional
state information:
+ The process is in the foreground process group of its
control terminal.
--------
PROCESS STATE CODES
Here are the different values that the s, stat and state output specifiers
(header "STAT" or "S") will display to describe the state of a process.
D Uninterruptible sleep (usually IO)
R Running or runnable (on run queue)
S Interruptible sleep (waiting for an event to complete)
T Stopped, either by a job control signal or because it is being traced.
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z Defunct ("zombie") process, terminated but not reaped by its parent.
这里是FreeBSD 6.2-RELEASE下man ps的部分输出:
state The state is given by a sequence of characters, for example,
``RWNA''. The first character indicates the run state of the
process:
D Marks a process in disk (or other short term, uninter-
ruptible) wait.
I Marks a process that is idle (sleeping for longer than
about 20 seconds).
L Marks a process that is waiting to acquire a lock.
R Marks a runnable process.
S Marks a process that is sleeping for less than about 20
seconds.
T Marks a stopped process.
W Marks an idle interrupt thread.
Z Marks a dead process (a ``zombie'').
Additional characters after these, if any, indicate additional
state information:
+ The process is in the foreground process group of its
control terminal.
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
站内导航:
特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!