docker / docker/docs

Not able to read memory metrics with cgroup v2 and latest docker + ubuntu 22.04

Open
#14,961 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/engine lifecycle/frozen lifecycle/stale
Dominant language
Markdown
Stars
4.7k
Forks
8.5k
Avg merge
2d 18h
Merged PRs (30d)
108

Description

I'm trying to read docker memory metrics from /sys/fs.
What worked previously on Ubuntu 18.04 and 20.04 doesn't work with latest ubuntu 22.04 and latest available docker: Docker version 20.10.17, build 100c701

Previously we were reading metrics from /sys/fs/cgroup/memory/docker/CONTAINER_ID/ and since now we have cgroup v2 then according to official documentation we should be reading those from: /sys/fs/cgroup/docker/CONTAINER_ID/ but /sys/fs/cgroup/docker doesn't exist.

root@srv01:/home/tuser# docker info | grep -i driver
Storage Driver: overlay2
Logging Driver: json-file
Cgroup Driver: systemd

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the reported /sys/fs/cgroup/memory/docker/CONTAINER_ID/ and /sys/fs/cgroup/docker/CONTAINER_ID/ paths with Docker 20.10.17, Ubuntu 22.04, cgroup v2, and the systemd cgroup driver described in the official documentation. Done means the documentation accurately identifies where to read container memory metrics or explains the required configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, linux, ubuntu
Domain
devops, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.