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

ps -e j | grep T

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

rs 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]'

 

T     6777  8635 more alert_pps.log

T     6777  9654 tail -60f alert_pps.log

T     6777 10724 top

# kill -9 8635

#  ps -A -ostat,ppid,pid,cmd | grep -e '^[T]'

T     6777  9654 tail -60f alert_pps.log

T     6777 10724 top

# kill -9 9654

# kill -9 10724

Linux查杀stopped进程的更多相关文章

  1. 如何查杀stopped进程

    在Linux系统下面,top命令可以查看查看stopped进程.但是不能查看stopped进程的详细信息.那么如何查看stopped 进程,并且杀掉这些stopped进程呢? ps -e j | gr ...

  2. Linux 系统 杀Oracle 进程

    Linux 系统 杀Oracle 进程 杀掉进程用此方法比较好,能保证杀得干净,而不是用SQL  alter system kill kill -9 `ps -ef|grep "oracle ...

  3. Linux下杀僵尸进程办法

    1) 检查当前僵尸进程信息 # ps -ef | grep defunct | grep -v grep | wc -l 175 # top | head -2 top - 15:05:54 up 9 ...

  4. linux查杀minergate-cli/minerd病毒

    redis的漏洞让公司的服务器中了挖矿的病毒,入侵者在服务器上留了后门.每次只是把进程杀杀,但是过段时间病毒又回来了,这个事情一直让人头疼.先是minerd的病毒入侵,后是minergate-cli入 ...

  5. db2 查杀死锁进程

    db2 查杀死锁进命令 db2 get snapshot for locks on (需要snapshot的访问权限) db2 list applications db2 "force ap ...

  6. Oracle锁表查杀会话进程

    一.逐条--锁表 (1)查表名 和 sessionidselect b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_obj ...

  7. Linux 查杀进程

    ps -eaf |grep "stoporder.php" | grep -v "grep"| awk '{print $2}'|xargs kill -9 # ...

  8. Linux 查杀病毒的常见命令

    1. 查看异常连接的网络端口及其对应的相应的进程 netstat -anlp | grep EST 2.看下相关的进程ID对应的可执行文件的位置 ps 2393 可以看到进程的可执行文件在哪? 3.临 ...

  9. 解决“Can't bind to local 8630 for debugger”错误--查杀多余进程

    Can't bind to local 8630 for debugger 表明本地8630端口被占用 1.Windows平台 在windows命令行窗口下执行: 1.查看所有的端口占用情况 C:\& ...

随机推荐

  1. [Swift]LeetCode417. 太平洋大西洋水流问题 | Pacific Atlantic Water Flow

    Given an m x n matrix of non-negative integers representing the height of each unit cell in a contin ...

  2. [Swift]LeetCode916.单词子集 | Word Subsets

    We are given two arrays A and B of words.  Each word is a string of lowercase letters. Now, say that ...

  3. python高级-生成器(17)

    1. 什么是⽣成器 通过列表⽣成式,我们可以直接创建⼀个列表.但是,受到内存限制,列表容量肯定是有限的.⽽且,创建⼀个包含100万个元素的列表,不仅占⽤很⼤的存储空间,如果我们仅仅需要访问前⾯⼏个元素 ...

  4. mongo 删除 表中字段

    查询语句 db.getCollection("A表").update( { } ,{   $unset:{"a":1}  } , {multi: true} ) ...

  5. 【Storm篇】--Storm中的同步服务DRPC

    一.前述 Drpc(分布式远程过程调用)是一种同步服务实现的机制,在Storm中客户端提交数据请求之后,立刻取得计算结果并返回给客户端.同时充分利用Storm的计算能力实现高密度的并行实时计算. 二. ...

  6. 1、MySQL主从同步机制及同步中的问题处理

    http://www.drupal001.com/2012/03/mysql-master-slave-troubles/ http://www.jb51.net/article/33052.htm

  7. .NET Core实战项目之CMS 第四章 入门篇-Git的快速入门及实战演练

    写在前面 上篇文章我带着大家通过分析了一遍ASP.NET Core的源码了解了它的启动过程,然后又带着大家熟悉了一遍配置文件的加载方式,最后引出了依赖注入以及控制反转的概念!如果大家把前面几张都理解了 ...

  8. Netty(三) 什么是 TCP 拆、粘包?如何解决?

    前言 记得前段时间我们生产上的一个网关出现了故障. 这个网关逻辑非常简单,就是接收客户端的请求然后解析报文最后发送短信. 但这个请求并不是常见的 HTTP ,而是利用 Netty 自定义的协议. 有个 ...

  9. AspNetCore taghelpers标签的使用

    下面介绍几种常用的Tag标签 asp-for 类似于name asp-validation-for 类似于mvc下的验证,将的验证来源于model的验证特性 asp-validation-summar ...

  10. C# int数据类型呵呵

    int16=short; int32=int; int64=long; Int16 值类型表示值介于 -32768 到 +32767 之间的有符号整数. Int32 值类型表示值介于 -2,147,4 ...