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

Add processes status stats in system input plugin #798

Closed
wants to merge 1 commit into from

Conversation

titilambert
Copy link
Contributor

It returns the number of processus grouped by their status (running/sleeping/zombie/...)

@titilambert
Copy link
Contributor Author

This add metrics asked here #235

@sparrc
Copy link
Contributor

sparrc commented Mar 7, 2016

this looks OK but I'm a little worried about the processing required for it, this is going to have to read every single process file in /proc/ and parse out all of the information, and then return the processes....

it likely would be more efficient to use ps, as well as working on both linux and bsd/darwin

@sparrc
Copy link
Contributor

sparrc commented Mar 7, 2016

from what I can tell, ps axo stat= will work on bsd/darwin/linux systems

@titilambert
Copy link
Contributor Author

@sparrc I understand, but I just did what collectd does ( but maybe this is not a right way :D see here: https://github.com/collectd/collectd/blob/master/src/processes.c#L1826 )
If you prefer the ps way, I will change it ;)

@sparrc
Copy link
Contributor

sparrc commented Mar 7, 2016

fair enough....but I don't think this is limited to linux, is it? it looks like gopsutil supports the status info for freebsd, darwin, etc.

@titilambert
Copy link
Contributor Author

Maybe there is some other status for those OSes ?
And windows compatibility ?

@sparrc
Copy link
Contributor

sparrc commented Mar 7, 2016

For all unix systems these should be it, I have no idea about Windows, but generally I've been trying to encourage people to use windows perf counters for system metrics

sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 8, 2016
sparrc added a commit that referenced this pull request Mar 9, 2016
sparrc added a commit that referenced this pull request Mar 9, 2016
sparrc added a commit that referenced this pull request Mar 9, 2016
sparrc added a commit that referenced this pull request Mar 9, 2016
sparrc added a commit that referenced this pull request Mar 9, 2016
sparrc added a commit that referenced this pull request Mar 9, 2016
sparrc added a commit that referenced this pull request Mar 9, 2016
sparrc added a commit that referenced this pull request Mar 9, 2016
sparrc added a commit that referenced this pull request Mar 9, 2016
@sparrc sparrc closed this in 2f45b8b Mar 9, 2016
geodimm pushed a commit to miketonks/telegraf that referenced this pull request Mar 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants