linux查询子线程,Linux 查看进程以及子进程/线程

1、 查看进程信息

# ps  -ef | grep

114

root       114     2  0 Jun23 ?        00:00:00 [kswapd1]

2、查看进程的子进程/线程

# pstree -p5346

dataserver(5346)─┬─jsagent(5802)─┬─{jsagent}(5807)

│               ├─{jsagent}(5811)

│               ├─{jsagent}(5812)

│               ├─{jsagent}(5813)

│               ├─{jsagent}(5814)

│               ├─{jsagent}(5815)

│               ├─{jsagent}(5816)

│               ├─{jsagent}(5817)

│               ├─{jsagent}(5818)

│               └─{jsagent}(5819)

├─{dataserver}(5435)

├─{dataserver}(5436)

├─{dataserver}(5437)

├─{dataserver}(5438)

├─{dataserver}(5439)

├─{dataserver}(5440)

├─{dataserver}(5441)

├─{dataserver}(5442)

├─{dataserver}(5443)

├─{dataserver}(5444)

├─{dataserver}(5445)

├─{dataserver}(5446)

├─{dataserver}(5447)

├─{dataserver}(5448)

└─{dataserver}(5449)

或者#ps mp5346-o THREAD,tid

USER     %CPU PRI SCNT WCHAN  USER SYSTEM   TID

root      7.3   -    - -         -      -     -

root      0.0  19    - futex_    -      -  5346

root      0.0  19    - -         -      -  5435

root      0.0  19    - futex_    -      -  5436

root      0.0  19    - futex_    -      -  5437

root      0.0  19    - futex_    -      -  5438

root      0.0  19    - futex_    -      -  5439

root      2.7  19    - futex_    -      -  5440

root      2.4  19    - futex_    -      -  5441

root      2.0  19    - futex_    -      -  5442

root      0.0  19    - pipe_w    -      -  5443

root      0.0  19    - futex_    -      -  5444

root      0.0  19    - futex_    -      -  5445

root      0.0  19    - futex_    -      -  5446

root      0.0  19    - -         -      -  5447

root      0.0  19    - -         -      -  5448

root      0.0  19    - read_e    -      -  5449

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值