The scenario
A developer reports that a service running in a container can see processes it should not see, and that a memory limit seems to be ignored. The container runtime is not available on the workstation, but the service is running as a process on a Linux host. The question is what the container actually consists of, and what the kernel has been told to do. The goal is to answer it from the kernel's own records, not from the runtime's configuration file.
Step 1: find the process
A container has an init process that the host sees as an ordinary PID. The first question is which PID that is, and the answer comes from the process table. Tools such as ps list the processes with their parent PIDs, so a container's init shows a parent that belongs to the runtime, not to a login shell.
Once you have a candidate PID, the status file confirms it. Its parent PID, user IDs, and name tell you whether the process is a container init or an ordinary program. A user ID that is not zero on the host, while the process believes it is root, is a sign of a user namespace.
Step 2: compare the namespaces
The namespace links in /proc/PID/ns are the core of the answer. Compare them with the links of your own shell. Every type that matches is shared with the host. Every type that differs is private to the container. A container that shows a different pid link and a different mnt link, but the same net link, has its own process view and mount table and shares the host network stack. That pattern is common, and it explains why the container's processes are hidden from the host shell but its network is not.
ls -l /proc/self/nsRun this in the host shell and in a shell inside the container, then compare the two listings. The comparison is a list of yes and no answers, which you can write down before reading anything else.
Step 3: read the cgroup
The membership file shows the group that the container belongs to. Under cgroups v2 there is one line. The path after the last colon shows the container's group, and the control files in that directory show its limits. The limits are the answer to the memory complaint. If memory.max holds a value, the kernel enforces it, and if it reads max, there is no limit at all. A missing limit explains the complaint without any mystery in the application.
The same reasoning applies to cgroup namespaces. When the cgroup namespace is private, the container sees its own group as the root, so the path it reads looks shorter than the path on the host. Two readers can see different paths for the same group, and both are correct.
Step 4: read the root filesystem
The container's view of the filesystem comes from its mount namespace and its root, which chroot or pivot_root set. The mountinfo file lists what the container can see. A container whose mountinfo lists the host /proc as a bind mount can see host processes through /proc, which breaks the process isolation from step 2. A correct container shows a fresh proc mount and a root that is a directory from its image.
The lab cannot create these mounts, so the exercise is about reading the evidence and recognizing a broken setup. The method is the same on a real host.
Step 5: the system call filter
Namespaces and cgroups do not stop a process from calling a dangerous system call. A seccomp filter does that, and it is attached to the process and inherited by children. The status file has a Seccomp line that shows the mode: 0 for none, 1 for strict, and 2 for a filter. A container that reports mode 2 is filtering calls, and the rules are in the runtime's profile. You can see which calls are blocked by watching for EPERM in an strace run of a failing command.
grep Seccomp /proc/self/statusPutting the answer together
The complaint about visible processes is explained by a shared PID namespace or a /proc mount from the host. The complaint about memory is explained by a missing limit in memory.max. Both answers came from /proc, not from the runtime's configuration, which is the point of the exercise: the kernel records what is in effect, and the files show it. A container is ordinary processes with a documented set of settings, and any of them can be checked from a shell.
Step 6: write down what you found
A useful investigation ends with a short record. List the PID, the namespace comparison, the cgroup path and its limit, the mount evidence, and the Seccomp mode. Each entry should name the file it came from, so that another person can repeat the reading. The record also becomes the test plan for a fix: after a change, read the same files again and check that each answer changed in the expected way.
Limits of this method
Reading /proc shows the kernel state for the processes you can see. It cannot show the intent of the runtime, such as a configuration that was meant to set a limit but failed to write it. When the files and the intent disagree, the files win, because they describe what is actually in effect. The disagreement is then a bug to trace, and the trace starts from the files.