linux进程的状态


在使用ps命令的时候有一列为进程的状态,例如

[davidp@supernova:~]$ ps u  

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND

davidp 3995 0.0 0.4 3324 1956 pts/2 Ss Aug17 0:00 /bin/bash

davidp 25049 0.0 0.8 7104 3908 pts/5 S+ Aug19 0:10 irssi

davidp 26180 0.0 0.1 2656 908 pts/0 R+ 14:41 0:00 ps u

 

其中STAT列为进程的状态

 

The codes used are:

CodeMeaning
DUninterruptible sleep (usually IO)
RRunning or runnable (on run queue)
SInterruptible sleep (waiting for an event to complete)
TStopped, either by a job control signal or because it is being traced.
Wpaging (not valid since the 2.6.xx kernel)
Xdead (should never be seen)
ZDefunct (“zombie”) process, terminated but not reaped by its parent.

For BSD formats and when the stat keyword is used, additional characters may be displayed:

CodeMeaning
<high-priority (not nice to other users)
Nlow-priority (nice to other users)
Lhas pages locked into memory (for real-time and custom IO)
sis a session leader
lis multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
+is in the foreground process group

~~DISCUSSION~~

 

转自:http://wiki.preshweb.co.uk/doku.php?id=linux:psflags 
 

posted @   iTech  阅读(698)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
历史上的今天:
2011-06-08 Linux系统性能检测
2010-06-08 .Net第三方工具列表
点击右上角即可分享
微信分享提示