Linux 查看进程以及子进程/线程
Linux查看进程以及子进程/线程
1、 查看进程信息
# ps -ef | grep 114
root 114 2 0 Jun23 ? 00:00:00 [kswapd1]
2、查看进程的子进程/线程
# pstree -p 5346
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 mp 5346 -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
更多推荐
所有评论(0)