[Nagiosplug-devel] [ nagiosplug-Bugs-1920973 ] check_disk is not using statvfs64 structure (patch inc)
SourceForge.net
noreply at sourceforge.net
Thu Mar 20 13:13:17 CET 2008
Bugs item #1920973, was opened at 2008-03-20 13:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1920973&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Vincent Alloo (valloo99)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_disk is not using statvfs64 structure (patch inc)
Initial Comment:
--SSH-- > ./check_disk --version
check_disk v1793 (nagios-plugins 1.4.10)
--SSH-- > uname -a
SunOS xxx 5.10 Generic_127112-07 i86pc i386 i86pc
check_disk is failing on file system > 1TB.
--SSH-- > ./check_disk -w 10 -c 5 -p /pooldbnbu
DISK OK - free space: /pooldbnbu 4332308954993 MB (0% inode=-208438065308%);| /pooldbnbu=-2147483648MB;-2147483648;-2147483648;0;-2147483648
This can be solved by modifying gl/fusage.c (using statvfs64 type):
get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
{
#if defined STAT_STATVFS /* POSIX */
struct statvfs64 fsd;
if (statvfs64 (file, &fsd) < 0)
return -1;
/* f_frsize isn't guaranteed to be supported. */
fsp->fsu_blocksize = (fsd.f_frsize
? PROPAGATE_ALL_ONES (fsd.f_frsize)
: PROPAGATE_ALL_ONES (fsd.f_bsize));
Result is now:
--SSH-- > ./check_disk -w 10 -c 5 -p /pooldbnbu
DISK OK - free space: /pooldbnbu 1239417 MB (57% inode=99%);| /pooldbnbu=921731MB;2161139;2161144;0;2161149
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1920973&group_id=29880
More information about the Devel
mailing list