amonagent icon indicating copy to clipboard operation
amonagent copied to clipboard

processes: null (Linux)

Open codeisallaround opened this issue 8 years ago • 4 comments

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.

codeisallaround avatar Apr 30 '17 15:04 codeisallaround

@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

martinrusev avatar May 01 '17 07:05 martinrusev

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 avatar May 01 '17 07:05 codeisallaround

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 '.')

codeisallaround avatar May 01 '17 07:05 codeisallaround

@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

martinrusev avatar May 01 '17 09:05 martinrusev