# Check RAM & CPU usage of containers

If your server host is experiencing high RAM and/or CPU usage, despite adhering to the tech specs, you can check via the command line which container is consuming the available host RAM/CPU.

To do this, establish a connection to your host and run the following command (as sudo):

```sh
sudo docker stats
```

<figure><img src="/files/unBGAp4jFln6HyakjGBt" alt=""><figcaption><p>docker stats: showing CPU &#x26; RAM usage of the individual containers</p></figcaption></figure>

All containers share the resources available within the Docker environment, except for those that haven't been restricted via [resource constraints](https://docs.docker.com/config/containers/resource_constraints/) (optional, not by default).

For example, CPU usage can range from 0% to 800% for an 8-core CPU, or 900% for a 9-core CPU, and so forth.

RAM usage is displayed in the MEM USAGE column, while the maximum amount of RAM (for all containers) is visible in the LIMIT column.

It's important to note that the LIMIT is the same for all containers, so you need to tally up the values from the MEM USAGE column to determine the current actively used RAM.

{% hint style="warning" %}
If a container is consuming a significantly high amount of RAM, for example, if IO is using 9GB, it should be restarted to free up memory.

Please perform this action only when there are no active jobs being executed and avoid doing so during high production time slots, if possible.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.helmut.de/helmut4-releases/support/debug-or-log-collection/helmut4-server/check-ram-and-cpu-usage-of-containers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
