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

Fix undefined process.Processes when building telegraf on Solaris-based system #561

Merged
merged 1 commit into from
Jul 28, 2018

Conversation

szaydel
Copy link
Contributor

@szaydel szaydel commented Jul 26, 2018

I attempted to build telegraf today on OmniOS, which is a Solaris derived system, but based on the Illumos kernel, and ran into this issue. A bit of digging revealed that nothing builds that would satisfy this requirement. As such, this hack happened.

# github.com/influxdata/telegraf/plugins/inputs/procstat
plugins/inputs/procstat/native_finder.go:24:16: undefined: process.Processes
plugins/inputs/procstat/native_finder_notwindows.go:18:16: undefined: process.Processes
plugins/inputs/procstat/native_finder_notwindows.go:43:16: undefined: process.Processes

It seems like there's not really much there to support process information on Solaris and friends, and I am wondering if there is any demand, and if so, I have done some work to expose but a small subset of what seems to be made available from other operating systems, but perhaps if there is interest, I can at least add a few of those bits as time permits and maybe enhance from there.

Thanks, Sam.

@Lomanic
Copy link
Collaborator

Lomanic commented Jul 27, 2018

You might be interested in #378 that adds some support for Illumos.

About your PR, I don't have any objections, it would fix compilation for any platform not currently implemented, the error will appear at runtime instead.

@szaydel
Copy link
Contributor Author

szaydel commented Jul 27, 2018

This sounds good. I did look at that PR, and I see that there's nothing for process, which is what telegraf actually demands. I think I could add memory bits if there's interest, at least 64bit support initially. If you don't mind pulling in this PR, it will make it easier for me to build telegraf. :)

Thanks!

@shirou
Copy link
Owner

shirou commented Jul 28, 2018

I think this PR is not only Solaris-based system but also other systems. And we can check err to avoid runtime error after build success. Thank you for your contribution!

@shirou shirou merged commit c06610b into shirou:master Jul 28, 2018
@szaydel
Copy link
Contributor Author

szaydel commented Jul 28, 2018

Glad to contribute in a tiny way. I will look into getting Solaris-centric process information and making it available through psutil. It would be nice to have.

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.

3 participants