Comments (35)
Looks like an invalid argument to host_processors
:
#define KERN_INVALID_ARGUMENT 4
/* The function requested was not applicable to this
* type of argument, or an argument is invalid
*/
from collectd.
From http://www.linuxselfhelp.com/gnu/machinfo/html_chapter/mach_9.html:
"This function returns KERN_SUCCESS if the call succeeded, KERN_INVALID_ARGUMENT if host_priv is not a privileged host port, and KERN_INVALID_ADDRESS if processor_count points to inaccessible memory."
from collectd.
I can reproduce this as well details can be found #72 (comment)
from collectd.
@octo We should be able to close this issue as #72 is closed. One step closer to 4.10 :)
from collectd.
Hi Chris,
how are the two issues related? Is this fixed and working now?
Best regards,
โocto
from collectd.
I am confused as well. I must have been mistaken. I think I just wanted to confirm the issue and then later made the mistake of thinking it was resolved / related. This indeed does appear to be a different issue, my apologies.
from collectd.
This issue does not seem to be closed. I am getting the same error with a git clone I just made.
OS X 10.8
from collectd.
Nevermind. I noticed some permissions errors showing up in logs. Needed to run as root!
from collectd.
still not working for me with 5.3 on OSX 10.8:
$ sudo collectd -f
,[2013-07-15 09:54:50] cpu plugin: Found 4 processors.
[2013-07-15 09:54:50] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:54:50] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:54:50] Initialization complete, entering read-loop.
[2013-07-15 09:54:58] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:55:08] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:55:28] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:56:18] cpu plugin: processor_info failed: (os/kern) failure
This problem has been there since I started using collectd, cpu just never worked on my dev machine ;)
I can provide more infos if I know what to look for.
from collectd.
After doing some more tests the failure logged do not appear to cause any problem, the cpu stats are reported despite the error.
from collectd.
Same thing happens here. Plugin works, but claims to not be working. Here are log messages:
Jul 17 23:53:04 misao collectd[33503]: cpu plugin: processor_info failed: (os/kern) failure
Jul 17 23:53:04 misao kernel[0]: cpu_info(268435458,5,0xffffff801e76248c,0xffffff801e762488) not implemented
from collectd.
@dpzmick: do you remember which permissions the plugin complained about? I cannot run as root and I also don't have access to syslog :-(
from collectd.
@lorenzfischer I don't sorry. That machine is long gone now :/
from collectd.
OK I can repro this atm, on a macbook pro 15" running Mavericks. I've got a debug enabled build and can provide whatever is needed here, incl access if thats useful.
from collectd.
Created new plugin context.
[2014-06-05 19:34:45] [info] cpu plugin: Found 8 processors.
[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure
[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.821; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = user;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.821; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = nice;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.821; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = system;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.822; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = idle;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.822; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 1; type = cpu; type_instance = user;
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-user to the cache.
[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-nice to the cache.
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-system to the cache.
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-idle to the cache.
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-1/cpu-user to the cache.
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-user"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-nice"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-system"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-idle"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-1/cpu-user"
[2014-06-05 19:34:45] [debug] name = collectd; num_proc = 2; num_lwp = 17; vmem_size = 5106257920; vmem_rss = 6897664; vmem_data = 0; vmem_code = 0; vmem_minflt_counter = 280; vmem_majflt_counter = 17700; cpu_user_counter = 4817609760; cpu_system_counter = 8825174929; io_rchar = -1; io_wchar = -1; io_syscr = -1; io_syscw = -1;
[2014-06-05 19:34:45] [debug] name = beam; num_proc = 1; num_lwp = 35; vmem_size = 2840875008; vmem_rss = 82137088; vmem_data = 0; vmem_code = 0; vmem_minflt_counter = 502; vmem_majflt_counter = 28684; cpu_user_counter = 51953853006; cpu_system_counter = 6779186057; io_rchar = -1; io_wchar = -1; io_syscr = -1; io_syscw = -1;
[2014-06-05 19:34:45] [debug] name = java; num_proc = 0; num_lwp = 0; vmem_size = 0; vmem_rss = 0; vmem_data = 0; vmem_code = 0; vmem_minflt_counter = 0; vmem_majflt_counter = 0; cpu_user_counter = 0; cpu_system_counter = 0; io_rchar = -1; io_wchar = -1; io_syscr = -1; io_syscw = -1;
from collectd.
Still here, indeed. (Fails on all my Macs)
from collectd.
[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure
This error appears to be returned when querying the PROCESSOR_TEMPERATURE
property. This at least explains why the plugin "appears to be working": Reading the cpu performance works, but reading the temperature fails.
from collectd.
Prior Art for reading CPU temps on OS X
from collectd.
Thanks Chris! It actually very much looks like the temperature is (attempted to be) read, but after that the variable holding the temperature is never touched again, making this an entirely pointless endeavor.
Since this doesn't appear to break backwards compatibility, I'll likely just remove the code from the cpu plugin entirely and look into adding it to the apple_sensors plugin instead.
from collectd.
๐ That would simplify the cross platform concerns, and make for less code to maintain.
from collectd.
Thanks for very swift action!
from collectd.
Still fails on master...
cpu plugin: host_processors returned 4
Initialization of plugin `cpu' failed with status -1. Plugin will be unloaded.
from collectd.
Yeah, same here with 5.4 using homebrew on OSX 10.10.1
I get the log error and I also don't get any data for the CPU in graphite (everything else is working fine). There really isn't anywhere f710030 could have been reverted...
from collectd.
The problem still actual.
Mac OS X 10.8.5, Collectd 5.4.1 from Homebrew:
[error] cpu plugin: processor_info failed: (os/kern) failure
from collectd.
On Tue, Mar 03, 2015 at 12:41:11PM -0800, Ilya Evseev wrote:
The problem still actual.
Mac OS X 10.8.5, Collectd 5.4.1 from Homebrew:
Yes, 5.4.1 is know to have this problem. Give 5.4.2 a try please, and let
us know if you encounter any problem.
from collectd.
I'm running 5.4.2 and I have the same error.
from collectd.
OK, so it seems there is another issue resulting in the same error message. Can somebody build collectd with --enable-debug and post a gdb backtrace of the crash ? Thanks!
from collectd.
I built 5.4.2 with --enable-debug. Even though I don't see any [debug] messages.
My log (cleared prior to start):
08.05.15 20:43:23,824 collectd[75864]: cpu plugin: host_processors returned 4
08.05.15 20:43:23,824 collectd[75864]: Initialization of plugin `cpu' failed with status -1. Plugin will be unloaded.
Executing plugin test (-f -T):
Created new plugin context.
[New Thread 0x1047 of process 75864]
[New Thread 0x1203 of process 75864]
[New Thread 0x1303 of process 75864]
[New Thread 0x1403 of process 75864]
[New Thread 0x1503 of process 75864]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x1047 of process 75864]
0x000000010000ab08 in plugin_write (plugin=<optimized out>, ds=<optimized out>, vl=0x100200090) at plugin.c:1650
1650 status = (*callback) (ds, vl, &cf->cf_udata);
(gdb) bt
#0 0x000000010000ab08 in plugin_write (plugin=<optimized out>, ds=<optimized out>, vl=0x100200090) at plugin.c:1650
#1 0x00000001000067e7 in fc_bit_write_invoke (ds=0x7fff83a4b101 <__psynch_cvclrprepost+5>, vl=0x240056e429dafce5, meta=<optimized out>,
user_data=<optimized out>) at filter_chain.c:708
#2 fc_default_action (ds=0x100200090, vl=0x1002003c8) at filter_chain.c:1041
#3 0x000000010000c9d9 in plugin_dispatch_values_internal (vl=<optimized out>) at plugin.c:1989
#4 plugin_write_thread (args=<optimized out>) at plugin.c:734
#5 0x00007fff909e4268 in _pthread_body () from /usr/lib/system/libsystem_pthread.dylib
#6 0x00007fff909e41e5 in _pthread_start () from /usr/lib/system/libsystem_pthread.dylib
#7 0x00007fff909e241d in thread_start () from /usr/lib/system/libsystem_pthread.dylib
#8 0x0000000000000000 in ?? ()
(gdb)
from collectd.
Is there any update on this issue. I am seeing this on OSX 10
/usr/local/Cellar/collectd/5.4.2/sbin/collectd -C /usr/local/etc/collectd.conf -T -f
[2015-07-06 07:54:20] cpu plugin: host_processors returned 4
[2015-07-06 07:54:20] Initialization of plugin `cpu' failed with status -1. Plugin will be unloaded.
from collectd.
Actually facing the same problem when running it as current active user, but seem to get it passing when running collectd as root. The mach_host_self() doesnโt return the privileged host_priv port to non-root users in fact.
from collectd.
I'm running into the same issue on OS X 10, I was wondering if anybody has a work around as the cpu stats don't seem to be getting reported because of this issues. See below for messages found in syslog
cpu plugin: host_processors returned 4
Initialisation of plugin `cpu' failed with status -1. Plugin will be unloaded.
from collectd.
Same error here, collectd 5.5.0 on OSX 10.11.1, whether running collectd as my user or root
.
Update: seems like it is actually reporting stats correctly now that I run as root
; I guess I was mistaken!
from collectd.
Thanks @maikelvdh and @ryan-williams, I'll improve the logged error message. If there's any way to get a processor_t
without a privileged host control port, please let me know :)
โocto
from collectd.
I'm going to close this, since there's not much more we can from our point of view, sorry.
from collectd.
XRG uses a non-privileged call to retrieve CPU info:
https://github.com/mikepj/XRG/blob/f45e5b9a2d30816271d3f90d73bc937100c643b7/Data%20Miners/XRGCPUMiner.m
Maybe this issue could be re-opened as a feature request?
from collectd.
Related Issues (20)
- [collectd 6]: Port epics plugin to 6.0 HOT 5
- [collectd 6] RFC: Automatic release process HOT 9
- Unable to download tar gz from http://collectd.org/files/collectd-{{collectd_version}}.tar.gz HOT 1
- Export collectd API
- memory plugin: Metrics to not sum up to a stable physical memory size. HOT 7
- interface plugin no values returned on Solaris 11.4 (Patch included) HOT 1
- [collectd 6] Compiler warnings for collectd core with stricter compilation options HOT 3
- Incorrect diskstat value wrap up calculations for 64-bit platforms in disk plugin HOT 1
- GCC warnings with stricter compiler checks ("main" branch) HOT 1
- "README.md" vs. "configure" output mismatches HOT 2
- Disk plug-in failed to load and plug-in interface did not register for value uniquename HOT 4
- [collectd 6] Missing "StoreRates" support for "write_http" plugin (regression from v5)
- Disk plug-in failed to load and plug-in interface did not register for value uniquename -- after upgraded to 5.12 we got the same issue HOT 3
- [collectd 6] write_prometheus handles resource attributes incorrectly. HOT 15
- There should be an error when resource attributes uniqueness assumption is violated
- Add support for headers on open_telemetry exporter plugin HOT 1
- Online documentation: add linkable anchors to headings HOT 2
- MQTT plugin: option to disable unix timestamps on values. HOT 1
- smart plugin and NVME
- Build fails on MacOS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collectd.