Site icon New Generation Enterprise Linux

See inside your container’s cgroup limits before they kill your app

Container Basics On Linux (Namespaces/Cgroups)

See inside your container’s cgroup limits before they kill your app

🧩 The Challenge

Dealing with OOM-killed processes inside a container is a nightmare because the host sees the container’s memory usage differently than the process does. I’ve wasted way too many hours trying to guess why my app gets axed when the host says there is plenty of free RAM.

💡 The Fix

Use systemd-cgtop to get a live view of exactly what the kernel thinks your container is doing. It shows you the actual resource pressure in real-time so you can stop playing guessing games with your limits.

systemd-cgtop

⚙️ Why It Works

Because it hooks directly into the cgroup v2 hierarchy, it bypasses the misleading stats you get from standard tools like top. The output clearly breaks down memory and CPU usage per controller, which makes tracking down those hard memory limits a lot easier.

🚀 Pro-Tip: Check your /sys/fs/cgroup path if the tool doesn’t populate, as some older distros have moved things around.

Linux Tips & Tricks | © ngelinux.com | 9/28/2026

0 0 votes
Article Rating
Exit mobile version