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

cpu collector failed after 0.000248s: more CPU's than MAXCPU? #339

Closed
robinbowes opened this issue Nov 13, 2016 · 9 comments
Closed

cpu collector failed after 0.000248s: more CPU's than MAXCPU? #339

robinbowes opened this issue Nov 13, 2016 · 9 comments

Comments

@robinbowes
Copy link

I'm trying to get node_exporter running on a FreeNAS box, which is based on FreeBSD 10.3 STABLE.

I did this:

  • fired up a vagrant box running FreeBSD 10.3 STABLE
  • installed node_exporter (from ports)
  • copied the node_exporter binary and rc script over the my FreeNAS box.

This works, but I see this error from the node_exporter regularly:

ERRO[1073] ERROR: cpu collector failed after 0.000035s: more CPU's than MAXCPU?  source=node_exporter.go:91

Any idea why I see this?

R.

@SuperQ
Copy link
Member

SuperQ commented Nov 13, 2016

The code for this error comes from cpu_freebsd.go.

I guess there must be something wrong with the way BSD cpu is retrieved.

@McQueen2063
Copy link

Yes, it seems that MAXCPU in const maxCPUTimesLen = C.MAXCPU * C.CPUSTATES is always 1. So this collector works on a single vm with 1 cpu / 1 core, but will never work on a multicore system.
CPUSTATES is 5, which is correct. I can't figure out yet, how to provide the actual number of cpu's, as reported by sysctl hw.ncpu or sysctl kern.smp.cpus...

@discordianfish
Copy link
Member

Here is a snippet how to get the number of cpus on various OSes: http://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine

@discordianfish
Copy link
Member

This should be fixed now that the collector is replaced by a pure Go version.

@robinbowes
Copy link
Author

Just to confirm - I built this and am running it on my FreeNAS box and it's working just fine.

I wrote up what I did here: https://blog.yo61.com/installing-prometheus-node_exporter-on-freenas/

@discordianfish
Copy link
Member

Awesome! And great article, that should help me setting up some VM based tests too!

@reverson
Copy link

Will this get pushed to the FreeBSD repos? I just installed from the latest repo for FreeBSD 10 amd64 and I'm still seeing this issue.

@discordianfish
Copy link
Member

@reverson You still see the issues with the 0.14-rc1 release? https://github.com/prometheus/node_exporter/releases/tag/v0.14.0-rc.1
The final 0.14.0 isn't released yet. See #441 for status on the next rc.

@reverson
Copy link

reverson commented Feb 26, 2017 via email

tamcore pushed a commit to gitgrave/node_exporter that referenced this issue Oct 22, 2024
…theus#339)

* Fix for mountstats error due to multiline "impl_id" on FreeNAS
This commit fixes an error happening when trying to parse data from FreeNAS NFS
mount point. "impl_id" is printed in multiple lines, which triggers "not enough
information for NFS stats" error.

Signed-off-by: Jakub Wesolowski <jakubwesolowski@posteo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants