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

processes: null (Linux) #20

Open
codeisallaround opened this issue Apr 30, 2017 · 4 comments
Open

processes: null (Linux) #20

codeisallaround opened this issue Apr 30, 2017 · 4 comments

Comments

@codeisallaround
Copy link

codeisallaround commented Apr 30, 2017

Trying out current master (latest commit e9cf24b on Mar 27 2017) the "processes" object is not set.

With debug output enabled it looks like this:

{
  "system": {
     ...
  },
  "processes": null,
  "host": {
    ...
  },
  "plugins": {},
  "checks": null
}

I see the '"processes": null,' on Ubuntu Linux 17.04 and Raspbian. I read that the processes listing isn't for Windows yet, but it should work for Linux - right?
I used 'go get github.com/amonapp/amonagent' and added the missing packages also with go get. I altered a path in makefile (building works fine) and altered address in the conf file to point to a local script that just writes down the POST data to a log file.

@martinrusev
Copy link
Member

martinrusev commented May 1, 2017

@codeisallaround Can you try listing them with pidstat -ruhtd? The agent relies on sysstat for process metrics

https://github.com/amonapp/amonagent/blob/master/collectors/processes.go#L45

@codeisallaround
Copy link
Author

Thanks, it was my mistake.

I just looked at the makefile. The deb would install systat. I had compiled the arm binary from source and run it without using the deb file. With systat enabled it, processes object is filled with data.

@codeisallaround
Copy link
Author

codeisallaround commented May 1, 2017

I closed it too early.

pidstat -ruht shows me correct values but amonagent's JSON lists gives me only 0 or 0.00 as values. e.g. for Firefox:

Edit2: With number format set to US-english it works, but not with using a non-US format (number separator ',' instead of '.').

...
{
"cpu":0,
"memory_mb":"0.00",
"kb_read":0,
"kb_write":0,
"name":"firefox"
}
...
> pidstat -ruht
#      Time   UID      TGID       TID    %usr %system  %guest    %CPU   CPU  minflt/s  majflt/s     VSZ     RSS   %MEM  Command
...
 1493588239  1000      3232         0    3,70    0,21    0,00    3,91     0    153,76      0,01 2792760  744472  23,90  firefox
 1493588239  1000         0      3232    3,05    0,12    0,00    3,17     0    131,16      0,01 2792760  744472  23,90  |__firefox
...

Edit: It might be because my Linux uses non-US regional format for numbers and dates (number separator ',' instead of '.')

@martinrusev
Copy link
Member

martinrusev commented May 1, 2017

@codeisallaround Can you try with the precompiled ARM binary from releases: https://github.com/amonapp/amonagent/releases

I will take a look, I usually optimize for both separators - . and ,, because my Linux install also uses non-US regional format as well

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

2 participants