check_disk question

Thomas Guyot-Sionnest dermoth at aei.ca
Thu Jul 10 12:28:29 CEST 2008


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

On 09/07/08 02:44 PM, Andy Moran wrote:
> 
> Sure:
> 
> nenc001:~ root# df -h /opt/itms_f39v4/
> Filesystem                  Size   Used  Avail Capacity  Mounted on
> nwk-its-filer39:/vol/vol4  9.6Ti  7.7Ti  1.9Ti    80%    /opt/itms_f39v4
> 
> nenc001:~ root# /opt/local/libexec/nagios/check_disk -w 20% -c 10% -p
> /opt/itms_f39v4/
> DISK CRITICAL - free space: /opt/itms_f39v4 0 MB (0% inode=99%);|
> /opt/itms_f39v4=*-2147483648MB*;1342616;1510443;0;1678270
> 
> nenc001:~ root# /opt/local/libexec/nagios/check_disk -vvv -w 20% -c 10%
> -p /opt/itms_f39v4/
> For /opt/itms_f39v4, total=3437097704, available=0,
> available_to_root=4164680672, used=18446744072981968648,
> fsp.fsu_files=31876689, fsp.fsu_ffree=31863221
> For /opt/itms_f39v4, used_pct=100 free_pct=0 used_units=1.75922e+13
> free_units=0 total_units=1.67827e+06 used_inodes_pct=1
> free_inodes_pct=99 fsp.fsu_blocksize=512 mult=1048576
> Freespace_units result=0
> Freespace% result=2
> Usedspace_units result=0
> Usedspace_percent result=0
> Usedinodes_percent result=0
> Freeinodes_percent result=0
> DISK CRITICAL - free space: /opt/itms_f39v4 0 MB (0% inode=99%);|
> /opt/itms_f39v4=*-2147483648MB*;1342616;1510443;0;1678270
> nenc001:~ root# 

Thanks for the details... It looks like the Gnulib fsusage module is not
using the 64-bit API to get file usage data. This part should be pretty
much automatic so I'm not sure what's going on (I don't have much
knowledge in that part of the build system)...

I'm not sure if it will help but ig you have automake/autoconf you could
try the following (commands below start with the prompt character '$';
beware of line wraps...):

1. Export from SVN:
$ svn export
http://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk/
nagiosplug
$ cd nagiosplug

2. Run the autoconf/automake stuff
$ tools/setup

3. Configure and build as usual (then to test you can run the plugin
straight from plugins/check_disk).


Also, if you can manage to grab the syscalls used by df and check_disk,
I could possibly make you a patch. I'm not sure how this is done on
OS-X, but on Linux it's "strace" and on Solaris it's "truss". I.e.
$ strace df

Hope this helps...

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

iD8DBQFIdeRN6dZ+Kt5BchYRAu/XAJ0deRXEuQIHji9amUQg04NcmB1IdwCgj26z
XvvJ5ii2RN0NjSoEO+GoB1I=
=tGYA
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list