[Nagiosplug-devel] [ nagiosplug-Bugs-3611599 ] check_load -r uses misleading value for ncpus.

SourceForge.net noreply at sourceforge.net
Mon Aug 19 23:14:07 CEST 2013


Bugs item #3611599, was opened at 2013-04-22 13:44
Message generated for change (Settings changed) made by hweiss
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3611599&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Nobody/Anonymous (nobody)
Summary: check_load -r uses misleading value for ncpus.

Initial Comment:
check_load -r uses the macro 

sysconf(__SC_nprocessors_conf)

If you are on a system with hyper-threading disabled after boot, this value is incorrect since it counts configured rather than active CPUS. 

The code works correctly in this case if you change the macro to 

sysconf(__SC_nprocessors_ONLN)

I've attached a patch to implement this change. 


----------------------------------------------------------------------

Comment By: Holger Weiss (hweiss)
Date: 2013-08-19 14:13

Message:
This problem is now fixed in Git. Thank you for your report.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3611599&group_id=29880




More information about the Devel mailing list