When I have a server with many multiple containers, some use more resource than other obviously. databases, I/o etc… Presently, I have to go into htop and check each container. Is there a way to tell how many resource it is using not just disk space. Many there is a way to tell in htop.
Here’s an example with the mycontainer container. It always shows processes, and groups them by the Control Group / cgroup. You would need to add up the values in the column to get, for example, the total memory use for the cgroup. There is likely a tool out there that already does that for you.
Note that by filtering per cgroup, we are able to easily group together (pun not intended) the relevant group of processes that make up a container.
We wrote a small Python script that helps us to quickly identify the load of individual Incus instances and it also spits out a list of processes (and which instance they belong to) that cause the most load.