본문 바로가기

OS/Linux

Linux child process 중 cpu가 높은 pid 확인 방법

반응형

ps -mo pid,lwp,stime,time,%cpu -C <process name>

> pstree
systemd─┬─NetworkManager───2*[{NetworkManager}]
...
        ├─filebeat───15*[{filebeat}]
...


> ps -mo pid,lwp,stime,time,%cpu -C filebeat
  PID   LWP STIME     TIME %CPU
32727     - Mar02 14:47:04  0.8
    - 32727 Mar02 00:00:00  0.0
    - 32728 Mar02 00:26:49  0.0
    - 32729 Mar02 01:24:39  0.0
    - 32730 Mar02 00:00:00  0.0
    - 32731 Mar02 00:00:00  0.0
    - 32732 Mar02 01:25:07  0.0
    - 32733 Mar02 01:12:42  0.0
    - 32734 Mar02 00:00:01  0.0
    - 32735 Mar02 01:16:07  0.0
    - 32736 Mar02 01:25:49  0.0
    - 32737 Mar02 00:41:47  0.0
    -   377 Mar02 01:23:36  0.0
    -   378 Mar02 01:25:14  0.0
    -   523 Mar02 01:24:05  0.0
    -   882 Mar02 01:14:16  0.0
    -   883 Mar02 01:26:46  0.0
반응형