-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Support I (idle) process state on procfs+Linux #3530
Conversation
👍 |
I think it would be nice to not emit this field on systems which don't support it. |
How can we tell if its supported though, it looks like we are running |
Oh whoops I was looking at the wrong code :/ |
Now I'm looking at |
Not sure. I was hoping for bright ideas, but the only thing I can think of is the kernel version. Which I'm not sure is justified to bother checking when it's just a field that's always 0. |
plugins/inputs/system/processes.go
Outdated
"total": int64(0), | ||
"unknown": int64(0), | ||
} | ||
switch runtime.GOOS { | ||
case "freebsd": | ||
fields["idle"] = int64(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should leave these as before, and add "idle" to the linux section. In my opinion better to report 0 than unset.
`I` is a Linux process state: https://github.com/torvalds/linux/blob/master/fs/proc/array.c#L135 This is a fairly recent change but causes lots of Telegraf log noise with 4.x kernels.
@danielnelson thanks for the review. I've updated the README and signed the CLA. I changed it to do the minimum possible, which was to do I'm not sure how to do the tests, since they will depend on the right version of Linux and you don't have anything in that direction currently in the processes tests. Would you like to add the tests yourself after merge? Either way, I appreciate the help and attention. |
Thank you! |
I see that this got added to the 1.6.0 milestone. Is there a plan to support I (idle) process state in version 1.4.x? |
I'm not planning to make another release on the 1.4 branch, but I will add this to the upcoming 1.5.0 release. |
(cherry picked from commit 663a5b1)
I
is a Linux process state: https://github.com/torvalds/linux/blob/master/fs/proc/array.c#L135This is a fairly recent change but causes lots of Telegraf log noise with 4.x kernels.
I'll do the rest of the paperwork for the PR if the underlying idea is acceptable.
Required for all PRs: