[Nagiosplug-help] check_procs 1.4.2 returns 0 processes in Solaris8
Ton Voon
ton.voon at altinity.com
Thu Apr 27 06:28:14 CEST 2006
Jacob,
Thanks for your investigations. I've just committed a patch where if
HAVE_BASENAME is not found, an internal version of basename is used
instead.
Can you try the CVS snapshot at http://nagiosplug.sf.net/snapshot and
let us know if this is fixed for you.
Ton
On 13 Apr 2006, at 17:28, Jacob Laack wrote:
> Johan-
> Your option 1 and 2 both worked so I tried to figure out why. A
> diff on check_procs.c from 1.4 and 1.4.2 reveals this:
>
> 175,179c181,184
> < temp_string = strtok ((char *)procprog, "/");
> < while (temp_string) {
> < strcpy(procprog, temp_string);
> < temp_string = strtok (NULL, "/");
> < }
> ---
>> #ifdef HAVE_BASENAME
>> temp_string = strdup(procprog);
>> procprog = basename(temp_string);
>> #endif /* HAVE_BASENAME */
>
> It looks like the basename function is being used now, however, on
> the Solaris machine HAVE_BASENAME is not defined and the entire
> section is being skipped. I've grep'ed all the files in the
> plugins source but nowhere is that constant defined. I'm assuming
> it's being defined elsewhere on other OSes. Other than manually
> patching the old over the new, what do you all suggest?
Ton
http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon
More information about the Help
mailing list