How do I see all processes with their container and resource limits?

Quick Linux Tip #9:

Try: systemd-cgls --unit=docker.service

Info: systemd-cgls shows the cgroup tree with processes organized by their control groups. It is useful for understanding container isolation and process organization.

Examples:

  • $ systemd-cgls --unit=user.slice
  • $ systemd-cgtop  # Real-time cgroup resource usage
  • $ cat /proc/1234/cgroup  # Show cgroups for a specific PID

Note: Use systemd-cgtop for real-time CPU and memory usage per cgroup. These tools are useful for container troubleshooting and understanding process isolation.




LinuxTeck.com
linuxteck@ubuntu:~$ systemd-cgls --unit=docker.service

docker.service
├─2456 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
└─docker
  ├─a1b2c3d4/ (nginx-container)
  │ ├─3456 nginx: master process
  │ ├─3457 nginx: worker process
  │ └─3458 nginx: worker process
  └─e5f6g7h8/ (mysql-container)
    ├─4567 mysqld_safe
    └─4568 mysqld

linuxteck@ubuntu:~$

PREVIOUS ARTICLE Quick Linux Tip #08: How do I who modified a critical file and when? NEXT ARTICLE Quick Linux Tip #10: How do I capture only specific HTTP traffic to a specific host?
About John Britto

John Britto Founder & Chief-Editor @LinuxTeck. A Computer Geek and Linux Intellectual having more than 20+ years of experience in Linux and Open Source technologies.

View all posts by John Britto →

Leave a Reply

Your email address will not be published.