[Nagiosplug-devel] [ nagiosplug-Bugs-1920973 ] check_disk is not using statvfs64 structure (patch inc)

SourceForge.net noreply at sourceforge.net
Thu Mar 20 14:25:15 CET 2008


Bugs item #1920973, was opened at 2008-03-20 12:13
Message generated for change (Comment added) made by tonvoon
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: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Vincent Alloo (valloo99)
Assigned to: Ton Voon (tonvoon)
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



----------------------------------------------------------------------

>Comment By: Ton Voon (tonvoon)
Date: 2008-03-20 13:25

Message:
Logged In: YES 
user_id=664364
Originator: NO

No problem. Thanks for reporting. Closing this call.

----------------------------------------------------------------------

Comment By: Vincent Alloo (valloo99)
Date: 2008-03-20 13:13

Message:
Logged In: YES 
user_id=1977333
Originator: YES

You're correct, it is fixed. Sorry for duplicate bug :)

--SSH-- > pwd
/home/valloo/nagios/nagios-plugins-trunk-200803201300/plugins
--SSH-- > ././check_disk --version
check_disk v1933 (nagios-plugins 1.4.11)
--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


----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2008-03-20 12:59

Message:
Logged In: YES 
user_id=664364
Originator: NO

Hi Vincent,

I think has been fixed already. Can you try the snapshot at
http://nagiosplug.sf.net/snapshot?

This will be in the upcoming 1.4.12 release.

Ton

----------------------------------------------------------------------

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