linux进程状态d状态,Linux下进程的状态

如下信息来自于命令man ps

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 by job control signal

t stopped by debugger during the tracing

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

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

< high-priority (not nice to other users)

N low-priority (nice to other users)

L has pages locked into memory (for real-time and custom IO)

s is a session leader

l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)

+ is in the foreground process group

执行命令ps aux可以查看到进程的状态,如下是样例输出

$ ps aux

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

root 823 0.0 0.4 172272 16980 ? Ssl 7月13 0:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers

root 837 0.0 0.4 562900 17232 ? Ssl 7月13 0:00 /usr/sbin/NetworkManager --no-daemon

root 845 0.0 0.1 70584 6088 ? Ss 7月13 0:00 /lib/systemd/systemd-logind

root 850 0.0 0.0 4552 824 ? Ss 7月13 0:00 /usr/sbin/acpid

syslog 852 0.0 0.1 263036 5364 ? Ssl 7月13 0:01 /usr/sbin/rsyslogd -n

root 908 0.0 0.0 110472 3600 ? Ssl 7月13 0:01 /usr/sbin/irqbalance --foreground

root 912 0.0 0.4 1435684 19288 ? Ssl 7月13 0:01 /usr/lib/snapd/snapd

root 945 0.0 0.2 298416 9960 ? Ssl 7月13 0:00 /usr/lib/policykit-1/polkitd --no-debug

root 1162 0.0 1.2 913624 48188 ? Ssl 7月13 0:53 /usr/bin/dockerd -H fd://

root 1227 0.0 0.1 302804 7868 ? Ssl 7月13 0:00 /usr/sbin/gdm3

...

比较有意思的地方是,当进程进入状态D之后,使用命令kill -9无法杀掉这个进程;除非事先知晓进入状态D的原因,否则最快捷的恢复方法即是重启操作系统。

参考资料

若非注明,均为原创,欢迎转载,转载请注明来源:Linux下进程的状态

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值