-
Notifications
You must be signed in to change notification settings - Fork 887
agent metadata: add coder stat
to identify Kubernetes cgroup usage
#7076
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
Comments
For Docker, Kubernetes this can be done by utilizing check
Note cgroups paths can be different on different Linux kernel version [see attached screenshot] |
@deansheather, would you like to make Pittsburgh and Helsinki identical? |
If this differs by kernel version then we probably should use some other way to determine the memory usage instead for compatibility |
I will install the same kernel on Pittsburgh though, but I can't restart it during work hours |
Nope I can't install the same kernel version because it doesn't install on fossa due to uninstallable dependencies, and it's not worth upgrading the entire server unless we have to IMO. I could try compiling the kernel myself at some point though |
The image is jammy but the hosts run different OSes. Only the Pittsburgh region runs the old kernel and 20.04 release. |
I added metadata but most of the devs in us so it doesn't work for them. 😞 |
@sreya will look into this. I'm a bit concerned that, without a |
@johnstcn expressed interest in doing this so re-assigning to him |
An alternative (or additional enhancement) could be to extend https://github.com/coder/coder-logstream-kube to query the Kubernetes |
Status update: roughly 90% complete. |
Running
free
ortop
inside a container does not give accurate usage info and reading cgroup values, particularly for CPUs can be tricky. Acoder stat
command can help helpcoder stat
for CPU, DIsk, Memory in Docker and Kubernetes containersThe text was updated successfully, but these errors were encountered: