[Nagiosplug-devel] [ nagiosplug-Bugs-1348746 ] check_disk reports incorrect disk free with neg space on BSD
SourceForge.net
noreply at sourceforge.net
Thu Oct 19 21:49:05 CEST 2006
Bugs item #1348746, was opened at 2005-11-05 00:59
Message generated for change (Comment added) made by tonvoon
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: Pending
Resolution: None
Priority: 5
Submitted By: Ted Cabeen (secabeen)
Assigned to: Ton Voon (tonvoon)
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: Ton Voon (tonvoon)
Date: 2006-10-19 20:49
Message:
Logged In: YES
user_id=664364
Doesn't look like any updates since I last requested in July. Marking call into
pending.
Ton
----------------------------------------------------------------------
Comment By: Ton Voon (tonvoon)
Date: 2006-07-20 00:18
Message:
Logged In: YES
user_id=664364
Ted,
Can you try the latest snapshot at http://nagiosplug.sf.net/snapshot. There
have been major changes to check_disk to sync it with coreutils' df so there
shouldn't be sign problems.
If you still have problems, can you tell me what version of df are you using?
Ton
----------------------------------------------------------------------
Comment By: Ton Voon (tonvoon)
Date: 2005-11-08 12:05
Message:
Logged In: YES
user_id=664364
>From 1.4 onwards, we use the GNU coreutils library to get df data. I don't
know if FreeBSD use their own routines or not, but GNU coreutils should
support it.
Yes, I guess signed integers should fix. Was an assumption on our part
that values would be always positive.
----------------------------------------------------------------------
Comment By: M. Sean Finney (seanius)
Date: 2005-11-08 11: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 21: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 12: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