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

feat(inputs.cgroup): Added support for cpu.stat #12798

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

an0nfunc
Copy link
Contributor

@an0nfunc an0nfunc commented Mar 4, 2023

Required for all PRs

cgroup v2 mounted with hierarchy=unified do not provide cpuacct [0], so this PR adds . to valid characters in keys for key-value pairs, which in turn fixes parsing cpu.stat, making it possible to measure cpu usage on v2 cgroup mounts with hierarchy=unified (default since systemd v243).

[0] systemd/systemd#13477

Since cgroup v2 unified does not provide cpuacct, this provides a possibility to
measure cpu usage on v2 cgroup mounts with hierarchy=unified, which is
default since systemd v243.
@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Mar 4, 2023
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks!

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Mar 6, 2023
Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Nice feature @an0nfunc! Thanks for your contribution!

@srebhan srebhan merged commit 69d9a43 into influxdata:master Mar 7, 2023
@an0nfunc an0nfunc deleted the feat-cgroup-cpu.stat branch March 7, 2023 13:39
@srebhan srebhan added this to the v1.26.0 milestone Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants