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

system input plugin call lsb_release causing high cpu usage #5589

Closed
quantenschaum opened this issue Mar 15, 2019 · 6 comments
Closed

system input plugin call lsb_release causing high cpu usage #5589

quantenschaum opened this issue Mar 15, 2019 · 6 comments
Assignees
Labels
area/system bug unexpected problem or unintended behavior
Milestone

Comments

@quantenschaum
Copy link

Relevant telegraf.conf:

[[inputs.system]]

System info:

Steps to reproduce:

  1. install and run telegraf on a raspberry pi
  2. watch cpu usage

Expected behavior:

cpu usage <5%

Actual behavior:

cpu usage ~25% caused by telegraf

Additional info:

Investigating the situation with atop shows, that lsb_release is called on every collection interval (10s by default), firing up a python interpreter each time.

Reading the docs for input.system I ask myself, why it is actually calling lsb_release? input.system reads load, uptime, #cpus and #users, I don't get the point for running lsb_release?

I would be nice to have this removed or at least to add an option to be able to turn this off.

@quantenschaum
Copy link
Author

Workaround: uninstall lsb-release

@glinton
Copy link
Contributor

glinton commented Mar 15, 2019

Good catch, looks like it's from gopsutil, the library we are using to gather metrics. The only data we are using from that call, however, is the system uptime, which they have a more efficient means of gathering.

@glinton glinton added bug unexpected problem or unintended behavior area/system labels Mar 15, 2019
@glinton glinton added this to the 1.10.1 milestone Mar 15, 2019
@glinton glinton self-assigned this Mar 15, 2019
@quantenschaum
Copy link
Author

Thanks, that was quick!

Just to illustrate the effect on the Pi

Bildschirmfoto_2019-03-15_21-14-17

@glinton
Copy link
Contributor

glinton commented Mar 15, 2019

Yikes! Once circle gets sorted, and assuming I remember, I'll get you a link to the new build for you to test.

@glinton
Copy link
Contributor

glinton commented Mar 16, 2019

Here are those linux builds to test out:

@quantenschaum
Copy link
Author

Yes, this solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/system bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants