Description
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:
- Set any inputs.procstat plugin in telegraf.conf
- Restart telegraf
- 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
gopsutil, fix /proc/pid/io naming issue
gopsutil, fix /proc/pid/io naming issue
andrii-rymar commentedon Feb 13, 2017
I'm able to reproduce this with Telegraf 1.2.0-1 and 1.2.1-1 on CentOS 6.5 x64
cchanning commentedon Jul 21, 2017
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 commentedon Jul 21, 2017
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 commentedon Jul 21, 2017
Hi Daniel, thanks for responding. As I mentioned in my earlier comment though, telegraf was running as root when I ran the test.
danielnelson commentedon Jul 21, 2017
The io stats are read from
/proc/${pid}/io
, can you cat that file?cchanning commentedon Jul 24, 2017
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 commentedon Jul 24, 2017
No problem, I'd love to hear the details if you have time.