-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cgroupfs support #800
Comments
Generally we have that support already lingering as in Github Codespaces we also encountered older cgroup drivers and have migrated the cgroup providers to work there. The relevant code to identify the fileystem paths is here: https://github.com/green-coding-solutions/green-metrics-tool/blob/da82f39f823d351a919c1c58d53f33c3cdc58e99/metric_providers/cpu/utilization/cgroup/container/source.c#L138C9-L158C1 Effectively it would have to be moved to the domain that docker is setting for the created containers. To advance this issue a little: Can you post a |
Ah, I should have investigated the issue more closely. The cause for my issue seems to be, that the cgroup directory of the container is named exactly like the container ID on my system, without any prefix or suffix. GMT looks for the pattern Full output of the ls command: Error:
In the gist you can find the directory |
I tried to get cgroup v2 running under Windows with WSL2. This issue is intended to document my experiences with it so far.
cgroup v2 can generally be activated in WSL (see below), but its use in GMT currently fails because Docker Desktop on Windows uses the cgroup driver
cgroupfs
, but GMT only supports cgroup v2 with the cgroup driversystemd
. Helpful information about the two cgroup drivers can be found here.I can think of three ways, how the usage of cgroups in WSL could be possible:
cgroupfs
driverThe problem is not really important to me. But I thought it would make sense to document it here quickly.
How to activate cgroup v2 in WSL?
Create the file
%USERPROFILE%\.wslconfig
(or edit it) and add the following content:Source: Docker Desktop 4.17.0 Release Notes
Then restart WSL (
wsl.exe --shutdown
).You can check which cgroup version is activated via:
mount -l | grep cgroup
The text was updated successfully, but these errors were encountered: