Skip to content

feat: add coder stat command #6938

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

Closed
wants to merge 2 commits into from
Closed

feat: add coder stat command #6938

wants to merge 2 commits into from

Conversation

ammario
Copy link
Member

@ammario ammario commented Mar 31, 2023

closes #7076

@mafredri
Copy link
Member

mafredri commented Apr 4, 2023

Suggestion: Should we call this stats or info so as to not be confused with https://en.wikipedia.org/wiki/Stat_(system_call)?

@ammario
Copy link
Member Author

ammario commented Apr 4, 2023

@mafredri the stat name (by itself) is not great. I was trying to be consistent with dstat, vmstat, sysstat and friends. We could follow in the footsteps of dstat and make it cstat? I worry that info or stats could be confused for a command that gets the stats of a workspace. I'm also hesitant to use a long name because this invocation will be repeated frequently in templates.

@mafredri
Copy link
Member

mafredri commented Apr 4, 2023

@ammario fair. Given that, I don't really have any great suggestions or alternatives. Calling it sysstat would be quite good, but wouldn't want it to be confused with the actual suite of tools. Likewise cstat is good but doesn't inherently mean much to the casual user. I guess that leaves stat or cstat as options, or if you manage to come up with a better one 😄

@ammario
Copy link
Member Author

ammario commented Apr 4, 2023

@mafredri sysstat is my favorite as well. Might just steal the name.

@github-actions
Copy link

This Pull Request is becoming stale. In order to minimize WIP, prevent merge conflicts and keep the tracker readable, I'm going close to this PR in 3 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Apr 19, 2023
@ammario
Copy link
Member Author

ammario commented Apr 19, 2023

I'm not going to have time to work on this in the next couple of weeks. @bpmct may assist in finding someone new.

@ammario ammario closed this Apr 19, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2023
}

cpuAcct := func() (int64, error) {
path := fmt.Sprintf("/sys/fs/cgroup/cpu,cpuacct/%s/cpuacct.usage", groupDir)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bpmct go pkg doesn't handle this on its own, and we need to specify the path of the cgroup, which is kernel/release dependent.

@github-actions github-actions bot deleted the easy-metadata branch October 1, 2023 00:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale This issue is like stale bread.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

agent metadata: add coder stat to identify Kubernetes cgroup usage
3 participants