Linux 명령어 - systemd-cgtop 서비스 그룹별 모니터링 

     

     

     

    이번 포스팅에서는 리눅스에서 서비스 그룹별로 모니터링에 대해서 알아보도록 하겠습니다.

     

     

       Linux systemd-cgtop 서비스 그룹별 모니터링

     

     

    systemd에 의해서 실행된 서비스들을 그룹별로 CPU 사용량, 메모리 사용량, 프로세스 개수 등을 실시간으로 간편히 모니터링할 수 있습니다.

     

     

    # systemd-cgtop

     

     

    systemd-cgtop 명령어를 입력하면 아래의 내용과 같이 실시간으로 모니터링할 수 있습니다.

     

     

     

     

    Control Group                                                 Tasks   %CPU   Memory  Input/s Output/s
    /                                                               107      -   595.6M        -        -
    system.slice                                                     32      -   142.8M        -        -
    system.slice/accounts-daemon.service                              3      -     6.3M        -        -
    system.slice/atd.service                                          1      -   780.0K        -        -
    system.slice/cron.service                                         1      -   524.0K        -        -
    system.slice/dbus.service                                         1      -     2.0M        -        -
    system.slice/dev-hugepages.mount                                  -      -   152.0K        -        -
    system.slice/dev-mqueue.mount                                     -      -    96.0K        -        -
    system.slice/multipathd.service                                   7      -    13.1M        -        -
    system.slice/networkd-dispatcher.service                          1      -     9.3M        -        -
    system.slice/polkit.service                                       3      -     1.3M        -        -
    system.slice/proc-sys-fs-binfmt_misc.mount                        -      -    12.0K        -        -
    system.slice/rsyslog.service                                      4      -     2.8M        -        -
    system.slice/ssh.service                                          1      -     6.1M        -        -
    system.slice/swap.img.swap                                        -      -   540.0K        -        -
    system.slice/sys-fs-fuse-connections.mount                        -      -    96.0K        -        -
    system.slice/sys-kernel-config.mount                              -      -    96.0K        -        -
    system.slice/sys-kernel-debug.mount                               -      -    96.0K        -        -
    system.slice/sys-kernel-tracing.mount                             -      -    96.0K        -        -
    system.slice/system-getty.slice                                   1      -   492.0K        -        -
    system.slice/system-getty.slice/getty@tty1.service                1      -   492.0K        -        -
    system.slice/systemd-journald.service                             1      -    13.0M        -        -
    system.slice/systemd-logind.service                               1      -     1.5M        -        -
    system.slice/systemd-networkd.service                             1      -     3.4M        -        -
    system.slice/systemd-resolved.service                             1      -     8.1M        -        -
    system.slice/systemd-timesyncd.service                            2      -     1.6M        -        -
    system.slice/systemd-udevd.service                                1      -    15.0M        -        -
    Control Group                                                 Tasks   %CPU   Memory  Input/s Output/s

     

    위 내용과 같이 각각의 서비스 그룹별 프로세스, CPU사용률, 메모리 사용량, 디스크 입/출력에 대한 실시간 정보를 얻을 수 있습니다.

     

    Posted by 서버이야기