LSN #6 Find docker OOM errors with dmesg

Sometimes I get into the frame of mind that docker and the dockerd service is very isolated from the host that runs it. I'll be using common docker commands such as docker logs, docker ps, docker stats or inspect to get a better understanding on what happens with containers or troubleshooting an issue.

I forget that the linux kernel still manages the resources for these containers to run, so its possible to use dmesg to see OOM errors for containers.

dmesg -T 

This error wont show you the container name, but will give you a process id if you wanted to trace it back. When you start a Docker container with resource limits, Docker uses cgroups under the hood to enforce those limits.