Skip to content
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

cgroupv2 support #3

Open
elelayan opened this issue Aug 20, 2024 · 1 comment · May be fixed by #5
Open

cgroupv2 support #3

elelayan opened this issue Aug 20, 2024 · 1 comment · May be fixed by #5

Comments

@elelayan
Copy link

Hi,
thank you for sharing this nice tool!
I've needed to adapt it to cgroups v2 for my slurm cluster:

  • there is no cpu or memory (/sys/fs/cgroup/{cpu,memory}) at the root of the path
  • there is no cpuacct.usage, but we can use the usage_usec field in the cpu.stat file
  • we have to look in the slurmstepd.scope:
    /sys/fs/cgroup/system.slice/slurmstepd.scope/job_%v instead of /sys/fs/cgroup/.../slurm/uid_%v/job_%v

It is a small patch to cmd/jobperf/nodestats.go. I'll propose a MR shortly.

@dougnd
Copy link
Contributor

dougnd commented Aug 22, 2024

Thanks for looking into this! An MR would be appreciated -- there's a good chance we'll be moving to cgroupv2 in the not too distant future.

elelayan pushed a commit to elelayan/jobperf that referenced this issue Aug 26, 2024
detect v1/v2 presence at each call to nodestats (via a single file stat).
Parse the cpu.stat file and memory.current, memory.peak for cgroupv2
@elelayan elelayan linked a pull request Aug 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants