[Nagiosplug-devel] [ nagiosplug-Bugs-1348746 ] check_disk reports incorrect disk free with neg space on BSD
SourceForge.net
noreply at sourceforge.net
Tue Nov 8 03:29:44 CET 2005
Bugs item #1348746, was opened at 2005-11-04 19:59
Message generated for change (Comment added) made by seanius
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1348746&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: Parsing problem
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: Ted Cabeen (secabeen)
>Assigned to: M. Sean Finney (seanius)
Summary: check_disk reports incorrect disk free with neg space on BSD
Initial Comment:
With check_disk running on FreeBSD 5-STABLE, when a
disk has negative free space remaining, the amount of
free space goes hugely positive:
DISK CRITICAL - free space: /usr 36028797018963968 MB
(1191472380510208%):
Here's a df from the time:
/dev/ad4s1g 3096462 2989082 -140336 105%
/usr
----------------------------------------------------------------------
>Comment By: M. Sean Finney (seanius)
Date: 2005-11-08 06:28
Message:
Logged In: YES
user_id=226838
hi,
well chalk this up to my having been away from traditional
unix/bsd implementations. afaict in linux such reserved
space is still taken into
calculation of total available space (ie, you could get
ENOSPC before the disk reached 0%).
but anyway, i think the fix is still obvious, that we should
do all scans and assignments as signed integers instead of
unsigned. if i don't hear any complaints from anyone else
on the plugins team, i'll probably do this at some point
(and hope that it doesn't break
something else)
also, having taken a look at the check_disk code, i can't
seem to find any references to the df program... so i guess
if you're using 1.4.2 or later that it's purely within the
internal disk space routines.
----------------------------------------------------------------------
Comment By: Ted Cabeen (secabeen)
Date: 2005-11-07 16:25
Message:
Logged In: YES
user_id=40466
All modern unix file-systems reserve a portion (5-10%) of
the disk space for use by root only and to speed disk
accesses. If the root user exceeds the normal disk space
and uses some of the reserve space, the system will
represent the amount of free space as negative.
I don't know how check_disk is checking the disk space (df
or internal routines). Is there an easy way to check?
check_disk (nagios-plugins 1.4.2) 1.57 is the version I'm
running.
----------------------------------------------------------------------
Comment By: M. Sean Finney (seanius)
Date: 2005-11-07 07:56
Message:
Logged In: YES
user_id=226838
hi,
um, i just have to ask. how do you have negative free space?
some other information that would be helpful:
- is check_disk using the df command or internal disk space
routines?
- if df, what df command syntax is check_disk using?
- what version of the plugins are you using?
i believe that the plugin is making an assumption that the
amount of disk space available is unsigned, because, er...
well i'd never heard of negative disk space, anyway :)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1348746&group_id=29880
More information about the Devel
mailing list