[Nagiosplug-help] plugin 'check_disk' fails on Solaris 10 with 16 TiB volume (with research) (SUCCESS)

Thomas Guyot-Sionnest dermoth at aei.ca
Thu Jan 31 09:57:49 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29/01/08 10:42 AM, Dennis Jenkins wrote:
> Holger Weiss wrote:
>> * Dennis Jenkins <djenkins at istreamimaging.com> [2008-01-29 08:53]:
>>   
>>>     If you would agree to it, please prepare the source as you need to 
>>> on your Solaris 10 system, run autoconf and then tar it up.  Email it to 
>>> me privately and I will test it in a zone on the server and return the 
>>> results to you.
>>>     
>> You can simply use the daily snapshot:
>>
>> http://nagiosplug.sf.net/snapshot/nagios-plugins-HEAD.tar.gz
>>
>> Thanks a lot for your tests, greatly appreciated.
>>
>> Holger
>>
>>   
> 
> Thank you for the info about the snapshot.  And you're welcome for the 
> testing.
> 
> This is the current status of our adventure:
> 
> $ cd nagios-plugins-trunk-200801291300/
> 
> $ PATH=/usr/sfw/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin ./configure
> 
> $ PATH=/usr/sfw/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin make
> 
> ### lots of stuff built, but then this error:
> make: Fatal error: Command failed for target `all-recursive'
> Current working directory 
> /export/home/djenkins/nagios-plugins-trunk-200801291300
> *** Error code 1
> make: Fatal error: Command failed for target `all'
> 
> 
> So let's try gmake instead. (who knows, maybe we'll get lucky?)
> 
> $ PATH=/usr/sfw/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin gmake clean all
> 
> gcc -g -O2 -o check_pgsql check_pgsql.o netutils.o utils.o  
> -L/export/home/djenkins/nagios-plugins-trunk-200801291300/plugins 
> -L/usr/local/ssl/lib ../lib/libnagiosplug.a ../gl/libgnu.a -lresolv -lpq 
> -lcrypt -lnsl -lsocket
> if gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H 
> -I. -I. -I.. -I.. -I../lib -I../gl -I../intl  -I/usr/include/pgsql 
> -I/usr/local/ssl/include -I/usr/sfw/include/mysql -D_REENTRANT 
> -I/usr/local/ssl/include -I/usr/sfw/include/mysql -xstrconst -mt -g -O2 
> -MT check_mysql-check_mysql.o -MD -MP -MF 
> ".deps/check_mysql-check_mysql.Tpo" -c -o check_mysql-check_mysql.o 
> `test -f 'check_mysql.c' || echo './'`check_mysql.c; \
> then mv -f ".deps/check_mysql-check_mysql.Tpo" 
> ".deps/check_mysql-check_mysql.Po"; else rm -f 
> ".deps/check_mysql-check_mysql.Tpo"; exit 1; fi
> gcc: language strconst not recognized
> gcc: check_mysql.c: linker input file unused because linking not done
> mv: cannot access .deps/check_mysql-check_mysql.Tpo
> gmake[2]: *** [check_mysql-check_mysql.o] Error 2
> gmake[2]: Leaving directory 
> `/export/home/djenkins/nagios-plugins-trunk-200801291300/plugins'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory 
> `/export/home/djenkins/nagios-plugins-trunk-200801291300'
> gmake: *** [all] Error 2
> 
> 
> well.... the box does not have mysql installed on it, let alone the 
> development header files....

I believe it's a known issue if you have Sun's MySQL package installed
while using GCC to compile Nagios-Plugins.

I'll add the workaround to compile the plugin in a FAQ on
nagiosplugins.com. If you don't need it just do:

./configure --without-mysql

> But, for our testing of "check_disk", we are in luck.
> 
> $ find . -name check_disk
> ./plugins/check_disk
> 
> 
> So, let's repeat the previous tests:
> 
> $ ./plugins/check_disk -w 20% -c 10% /
> DISK OK - free space: / 5476 MB (51% inode=81%);| /=5253MB;8670;9754;0;10838
> 
> $ ./plugins/check_disk -w 20% -c 10% /zpool1/
> DISK OK - free space: /zpool1 16778470 MB (99% inode=99%);| 
> /zpool1=62548MB;13472815;15156917;0;16841019
> 
> Looks good.  And for fun, the last few lines of running the check on the 
> 16T volume through truss:
> 
> ioctl(3, (('m'<<8)|7), 0x08047A94)              = 0
> ioctl(3, (('m'<<8)|7), 0x08047A94)              = 1
> llseek(3, 0, SEEK_CUR)                          = 0
> close(3)                                        = 0
> sysconfig(_CONFIG_PAGESIZE)                     = 4096
> xstat(2, "/zpool1/", 0x08079C30)                = 0
> statvfs64("/zpool1", 0x08047A80)                = 0
> ioctl(1, TCGETA, 0x08046EA4)                    = 0
> fstat64(1, 0x08046E10)                          = 0
> DISK OK - free space: /zpool1 16778470 MB (99% inode=99%);| 
> /zpool1=62548MB;13472815;15156917;0;16841019
> write(1, " D I S K   O K   -   f r".., 105)     = 105
> _exit(0)
> 
> 
> Thomas, Holger, thank you for your time.  I hope that my tests help 
> Thomas decide if his patch was correct or not.

Thanks, it works.

> ps- could the patch have broken an older system that does not define any 
> 64 bit file system interfaces?

I believe the 64bit interface have been there for long time now... And
I'm pretty sure the patch in SVN detects the availability first. I also
verified other reputed OSS projects use this.

Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHoY2M6dZ+Kt5BchYRAsZqAKCrGufIeTKbOJiNPkiFLZGuWTwIRQCg1FEf
EBAok3UCafWirmWkAqX4cgk=
=jYOW
-----END PGP SIGNATURE-----




More information about the Help mailing list