zoukankan      html  css  js  c++  java
  • Linux查看进程的所有子进程和线程

    得到进程的pid:
    ps -ef | grep process_name | grep -v "grep" | awk '{print $2}'


    查看进程的所有线程
    # ps mp 6648 -o THREAD,tid
    USER     %CPU PRI SCNT WCHAN  USER SYSTEM   TID
    root      0.0   -    - -         -      -     -
    root      0.0  24    - -         -      -  6648
    root      0.0  21    - -         -      -  6650
    root      1.0  24    - -         -      - 14214
    root      0.0  23    - futex_    -      - 14216
    root      0.0  22    - 184466    -      - 15374
    root      0.0  23    - 184466    -      - 15376
    root      0.0  23    - 184466    -      - 15378
    root      0.0  23    - 184466    -      - 15380
    root      0.0  23    - 184466    -      - 15392
    root      0.0  23    - 184466    -      - 15394
    root      0.0  23    - 184466    -      - 15398


    查看所有子进程:
    # pstree -p 6648
    agent_executor(6648)─┬─tar(15601)───gzip(15607)
                         ├─{agent_executor}(6650)
                         ├─{agent_executor}(14214)
                         ├─{agent_executor}(14216)
                         ├─{agent_executor}(15374)
                         ├─{agent_executor}(15376)
                         ├─{agent_executor}(15378)
                         ├─{agent_executor}(15380)
                         ├─{agent_executor}(15392)
                         ├─{agent_executor}(15394)
                         └─{agent_executor}(15398)

  • 相关阅读:
    斯皮尔曼+假设检验
    53. Maximum Subarray
    工具网站
    Win10 不稳定经常死机 -蓝屏-电脑-电脑 系统启动后 键盘等一会才有反应
    MFC 代码无错却无法运行
    为什么喝酒不能吃头孢
    基于靶机的SQL注入的探测
    SQlMap注入的基本原理
    burp suite 简单靶机验证码绕过【前台|后台验证】自娱自乐系列
    burp suite 基于自娱自乐的靶机简单密码爆破
  • 原文地址:https://www.cnblogs.com/ThinkVenus/p/7491000.html
Copyright © 2011-2022 走看看