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

SourceForge.net <[email protected]>
Newsgroups gmane.network.nagios.plugins.devel
Message-ID <[email protected]>
Bugs item #3611599, was opened at 2013-04-22 13:44
Message generated for change (Tracker Item Submitted) made by 
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: Open
Resolution: None
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. 


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

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

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________________
Nagios Plugin Development Mailing List Nagiosplug-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.