Telegraf: system input plugin call lsb_release causing high cpu usage

Created on 15 Mar 2019  路  6Comments  路  Source: influxdata/telegraf

Relevant telegraf.conf:

[[inputs.system]]

System info:

  • Telegraf 1.10.0 (git: HEAD fe33ee89)
  • Linux foobar 4.14.98+ #1200 Tue Feb 12 20:11:02 GMT 2019 armv6l GNU/Linux
  • Raspbian GNU/Linux 9.8 (stretch)
  • Raspberry Pi

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.

aresystem bug

All 6 comments

Workaround: uninstall lsb-release

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.

Thanks, that was quick!

Just to illustrate the effect on the Pi

Bildschirmfoto_2019-03-15_21-14-17

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

Here are those linux builds to test out:

Yes, this solved the issue.

Was this page helpful?
0 / 5 - 0 ratings