Skip to content

procstat data missing fields mentioned in documentation #1584

Closed
@rj33

Description

@rj33

Bug report

The procstat plugin documentation mentions the following stats that don't appear to be arriving:
procstat_[prefix_]read_count value=396
procstat_[prefix_]write_count value=1
procstat_[prefix_]read_bytes value=1019904
procstat_[prefix_]write_bytes value=1

procstat_[prefix_]num_fds value=4

Relevant telegraf.conf:

[[inputs.procstat]]
exe = "foo"

System info:

telegraf_1.0.0-beta3

Ubuntu 14.04.1

Steps to reproduce:

  1. Set any inputs.procstat plugin in telegraf.conf
  2. Restart telegraf
  3. Check incoming data

Expected behavior:

Stats included for things num_fds

Actual behavior:

Additional info:

num_fds and the io stats are not included, looking at the measurement in innodb I see these fields only:
cpu_time_guest cpu_time_guest_nice cpu_time_idle cpu_time_iowait cpu_time_irq cpu_time_nice cpu_time_soft_irq cpu_time_steal cpu_time_stolen cpu_time_system cpu_time_user cpu_usage exe host involuntary_context_switches memory_rss memory_swap memory_vms num_threads pid process_name voluntary_context_switches

Activity

added
bugunexpected problem or unintended behavior
on Aug 5, 2016
added a commit that references this issue on Aug 5, 2016
b55e9e7
added a commit that references this issue on Aug 9, 2016
21f54d2
andrii-rymar

andrii-rymar commented on Feb 13, 2017

@andrii-rymar

I'm able to reproduce this with Telegraf 1.2.0-1 and 1.2.1-1 on CentOS 6.5 x64

cchanning

cchanning commented on Jul 21, 2017

@cchanning

Hi, this may need to be reopened. I've just tested this again on version 1.3.4 running on Ubuntu 16.04 as root. I'm getting the following fields after running (telegraf -test -config telegraf.conf):

procstat,exe=dd,process_name=dd,host=8196018c6b73 cpu_time_steal=0,cpu_time_stolen=0,memory_rss=1075146752i,num_threads=1i,involuntary_context_switches=18i,cpu_time_iowait=0,cpu_time_irq=0,pid=3395i,cpu_time_guest=0,memory_vms=1078280192i,cpu_usage=3.9598084197168877,num_fds=3i,voluntary_context_switches=131i,cpu_time_user=0,cpu_time_system=1.9,memory_swap=0i,cpu_time_idle=0,cpu_time_nice=0,cpu_time_soft_irq=0,cpu_time_guest_nice=0 1500637292000000000

The target process running is dd (dd if=/dev/zero of=/root/testfile bs=1G count=8 oflag=direct). The telegraf config is the default with the procstat plugin uncommented and the exe parameter set as 'dd'.

As you can see, all of the disk I/O metrics are missing.

danielnelson

danielnelson commented on Jul 21, 2017

@danielnelson
Contributor

When these stats are missing it generally means that Telegraf does not have permission to read the necessary files in /proc/${pid}/. The easiest way to get this to work is to run Telegraf as root, but I don't recommend it.

cchanning

cchanning commented on Jul 21, 2017

@cchanning

Hi Daniel, thanks for responding. As I mentioned in my earlier comment though, telegraf was running as root when I ran the test.

danielnelson

danielnelson commented on Jul 21, 2017

@danielnelson
Contributor

The io stats are read from /proc/${pid}/io, can you cat that file?

cchanning

cchanning commented on Jul 24, 2017

@cchanning

Hey, I've done some further investigation on this issue and it appears to be related to docker on Mac rather than to Telegraf. Sorry for the noise =)

danielnelson

danielnelson commented on Jul 24, 2017

@danielnelson
Contributor

No problem, I'd love to hear the details if you have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugunexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      procstat data missing fields mentioned in documentation · Issue #1584 · influxdata/telegraf