[Nagiosplug-help] check_procs 1.4.2 returns 0 processes inSolaris8
Ton Voon
ton.voon at altinity.com
Mon May 8 10:05:32 CEST 2006
pst3 is a new executable which returns more information than ps does
on Solaris boxes (longer command names, if I recall correctly).
Looks like there is a library missing. Could you cd plugins-root and
run:
gcc -g -O -o pst3 pst3.o -L/usr/local/nagiosbuild/nagios-plugins-
HEAD-200605081152/plugins-root ../intl/libintl.a -lgen -lsocket -lkvm
Which version of Solaris are you compiling on?
Ton
On 8 May 2006, at 14:38, Jacob Laack wrote:
> I've ran ./configure --without-ssl --without-openssl --without-
> crypto and finally got past the compile problem for check_disk.
> Now it seems something called pst3 won't compile now:
>
> /bin/bash ../libtool --mode=link gcc -g -O2 -L. -o pst3
> pst3.o ../intl/libintl.a -lgen -lsocket
> gcc -g -O2 -o pst3 pst3.o -L/usr/local/nagiosbuild/nagios-plugins-
> HEAD-200605081152/plugins-root ../intl/libintl.a -lgen -lsocket
> Undefined first referenced
> symbol in file
> kvm_close pst3.o
> kvm_getcmd pst3.o
> kvm_getu pst3.o
> kvm_open pst3.o
> kvm_getproc pst3.o
> ld: fatal: Symbol referencing errors. No output written to pst3
> collect2: ld returned 1 exit status
> *** Error code 1
> make: Fatal error: Command failed for target `pst3'
> Current working directory /usr/local/nagiosbuild/nagios-plugins-
> HEAD-200605081152/plugins-root
> *** Error code 1
> make: Fatal error: Command failed for target `all-recursive'
> Current working directory /usr/local/nagiosbuild/nagios-plugins-
> HEAD-200605081152
> *** Error code 1
> make: Fatal error: Command failed for target `all'
>
> I'm just about to give up and either keep my solaris machines with
> plugins 1.4 or change all of my processes to use an absolute path.
> Anyone have any idea what's causing this problem?
>
> Jake Laack
> Alegent Health Open Systems Engineer
>
>>>> "Jacob Laack" <JLaack at alegent.org> 4/27/2006 3:06:34 PM >>>
> Thank you, thank you for responding! I downloaded the file,
> configured it (./configure), then compiled (make all) on the same
> machine... Unfortunately, I get this mid compile:
>
> gcc -Wall -g -O2 -o check_disk check_disk.o utils.o popen.o -L/usr/
> local/nagiosbuild/nagios-plugins-HEAD-200604271152/plugins ../lib/
> libnagiosplug.a ../lib/libcoreutils.a ../intl/libintl.a -lgen -
> lsocket -lssl -lcrypto -R/usr/local/ssl/lib
> ld: fatal: library -lssl: not found
> ld: fatal: library -lcrypto: not found
> ld: fatal: File processing errors. No output written to check_disk
> collect2: ld returned 1 exit status
> *** Error code 1
> make: Fatal error: Command failed for target `check_disk'
> Current working directory /usr/local/nagiosbuild/nagios-plugins-
> HEAD-200604271152/plugins
> *** Error code 1
> make: Fatal error: Command failed for target `all-recursive'
> Current working directory /usr/local/nagiosbuild/nagios-plugins-
> HEAD-200604271152/plugins
> *** Error code 1
> make: Fatal error: Command failed for target `all-recursive'
> Current working directory /usr/local/nagiosbuild/nagios-plugins-
> HEAD-200604271152
> *** Error code 1
> make: Fatal error: Command failed for target `all'
>
> The 1.4.2 plugins compile just fine on the same machine. The
> matching lines there are:
>
> if gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -
> DHAVE_CONFIG_H -I. -I. -I
> .. -I.. -I../lib -I../intl -g -O2 -MT popen.o -MD -MP -MF
> ".deps/popen.Tpo"
> -c -o popen.o popen.c; \
> then mv -f ".deps/popen.Tpo" ".deps/popen.Po"; else rm -f ".deps/
> popen.Tpo"; exi
> t 1; fi
> gcc -g -O2 -L. -o check_disk check_disk.o utils.o ../lib/
> libnagiosplug.a ../l
> ib/libcoreutils.a popen.o ../intl/libintl.a -lgen -lsocket
> if gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -
> DHAVE_CONFIG_H -I. -I. -I
> .. -I.. -I../lib -I../intl -g -O2 -MT check_dummy.o -MD -MP -MF
> ".deps/check
> _dummy.Tpo" -c -o check_dummy.o check_dummy.c; \
> then mv -f ".deps/check_dummy.Tpo" ".deps/check_dummy.Po"; else rm -
> f ".deps/che
> ck_dummy.Tpo"; exit 1; fi
> gcc -g -O2 -L. -o check_dummy check_dummy.o utils.o ../lib/
> libnagiosplug.a ..
> /lib/libcoreutils.a ../intl/libintl.a -lgen -lsocket
>
> I notice that the -lssl and -lcrypto the compiler is complaining
> about are not in this text. What can I do about that?
>
> Jake Laack
> Alegent Health Open Systems Engineer
>
>>>> Ton Voon <ton.voon at altinity.com> 4/27/2006 8:27 AM >>>
> 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
>
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any
> issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any
> issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
>
>
> This message has been scanned for viruses by MailController -
> www.MailController.altohiway.com
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