[Nagiosplug-devel] Patch to check_load to cater for multiple CPUs

Ton Voon ton.voon at altinity.com
Tue Apr 17 10:19:42 CEST 2007


Hi!

Wanted to get a 2nd (or 3rd or 4th...) opinion on this. I've received  
a patch from a customer for check_load so that it divides the load  
averages by the number of CPUs (based on returned values from  
sysconf). This works on their Redhat servers, but I don't know if all  
unices provide this system call. I guess configure could see if  
sysconf was available and just return -1 if not - would that be  
sufficient?

Would we need to check for the existence of the _SC_NPROCESSORS_CONF  
attribute too?

Patch attached. Opinions?

Ton

http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_load_percpu_v2.diff
Type: text/x-patch
Size: 2275 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20070417/469dd2de/attachment.bin>
-------------- next part --------------



More information about the Devel mailing list