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

namedprocess_namegroup_read_bytes_total and namedprocess_namegroup_write_bytes_total always 0 #95

Closed
lumi017 opened this issue Apr 30, 2019 · 3 comments

Comments

@lumi017
Copy link

lumi017 commented Apr 30, 2019

namedprocess_namegroup_read_bytes_total and namedprocess_namegroup_write_bytes_total seems not be functional. They always report 0. Using the latest version available: 0.5.0
Example of the config:

      - name: "{{.Comm}}"
        comm:
          - dockerd
          - python

Might be related to #66

@ncabatoff
Copy link
Owner

I have no problem making write_bytes_total nonzero, e.g. in one window run

dd if=/dev/zero of=test bs=1M

and in another window run

$ /opt/process-exporter/bin/process-exporter  -procnames dd -once-to-stdout-delay=5s |grep bytes_total |grep -v memstats
2019/05/03 02:12:46 Reading metrics from /proc for procnames: [dd]
# HELP namedprocess_namegroup_read_bytes_total number of bytes read by this group
# TYPE namedprocess_namegroup_read_bytes_total counter
namedprocess_namegroup_read_bytes_total{groupname="dd"} 0
# HELP namedprocess_namegroup_write_bytes_total number of bytes written by this group
# TYPE namedprocess_namegroup_write_bytes_total counter
namedprocess_namegroup_write_bytes_total{groupname="dd"} 3.178496e+07

To see read_bytes_total nonzero, it's a little trickier, but this worked for me:

WARNING: do not drop_caches on production systems

Window 1:

$ echo 3 | sudo tee /proc/sys/vm/drop_caches
$ dd if=test of=/dev/null bs=1

Window 2:

$ /opt/process-exporter/bin/process-exporter  -procnames dd -once-to-stdout-delay=5s |grep bytes_total |grep -v memstats
2019/05/03 02:14:31 Reading metrics from /proc for procnames: [dd]
# HELP namedprocess_namegroup_read_bytes_total number of bytes read by this group
# TYPE namedprocess_namegroup_read_bytes_total counter
namedprocess_namegroup_read_bytes_total{groupname="dd"} 2.62144e+06
# HELP namedprocess_namegroup_write_bytes_total number of bytes written by this group
# TYPE namedprocess_namegroup_write_bytes_total counter
namedprocess_namegroup_write_bytes_total{groupname="dd"} 0

@toyota790
Copy link

toyota790 commented May 20, 2020

Hi @ncabatoff ,

I have the same this issue in my environment.

  • OS: Ubuntu 16.04 LTS
  • Process exporter version: 0.6.0

Do you have any idea what's causing this problem?
If you need any further information, please feel free to contact me. Thank you so much! :)

@diborodin
Copy link

Faced the same issue. Please make sure the process-exporter processes is run with the root user privileges, otherwise namedprocess_namegroup_read_bytes_total and namedprocess_namegroup_write_bytes_total are both 0.

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

No branches or pull requests

4 participants