linux下查杀stopped进程的方法-mile米乐体育

小编给大家分享一下linux下查杀stopped进程的方法,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!

在linux系统下面,top命令可以查看查看stopped进程。但是不能查看stopped进程的详细信息。那么如何查看stopped 进程,并且杀掉这些stopped进程呢?

ps-ej|grept

stopped进程的stat状态为t,一般而言,进程有下面这些状态码:

d uninterruptible sleep (usually io)

i idle kernel thread

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

一般较常见的是5种状态码:

d 不可中断 uninterruptible sleep (usually io)

r 运行 runnable (on run queue)

s 中断 sleeping

t 停止 traced or stopped

z 僵死 a defunct (”zombie”) process

所以,可以用下面命令ps -a -ostat,ppid,pid,cmd | grep -e '^[t]' 查看stopped的进程信息。如下所示:

#ps-a-ostat,ppid,pid,cmd|grep-e'^[t]'  t67778635morealert_pps.log t67779654tail-60falert_pps.log t677710724top #kill-98635 #ps-a-ostat,ppid,pid,cmd|grep-e'^[t]' t67779654tail-60falert_pps.log t677710724top #kill-99654 #kill-910724

看完了这篇文章,相信你对“linux下查杀stopped进程的方法”有了一定的了解,如果想了解更多相关知识,欢迎关注恰卡编程网行业资讯频道,感谢各位的阅读!

展开全文
内容来源于互联网和用户投稿,文章中一旦含有米乐app官网登录的联系方式务必识别真假,本站仅做信息展示不承担任何相关责任,如有侵权或涉及法律问题请联系米乐app官网登录删除

最新文章

网站地图