A function that returns a populated Resources
struct
#4414
iholder101
started this conversation in
Ideas
Replies: 1 comment
-
Though we want to move most packages into internal, but I think ‘libct/cgroups’ is not included. So SGTM, please feel free to open a PR to implement this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The problem:
AFAICT, currently there is no way of getting a populated
Resources
struct from the cgroup manager.This means that in order to understand the current configuration of a cgroup, there's a need to:
manager.GetPaths()
.The above should be written in two versions to support both cgroup v1 and v2.
The solution:
I would expect that the manager would support a
GetResources()
function that returns a populatedResources
struct. This seems like a very valuable action that has to be re-implemented in many different projects.If this idea would be accepted, I'm willing to invest time in implementing it.
p.s. the
manager.GetStats()
method is not enough, since it can't, as a single example, getcpu.wight
's value.Beta Was this translation helpful? Give feedback.
All reactions