[Nagiosplug-devel] [ nagiosplug-Patches-995761 ] check_disk to include inode percentage.
SourceForge.net
noreply at sourceforge.net
Wed Nov 2 01:03:42 CET 2005
Patches item #995761, was opened at 2004-07-22 04:21
Message generated for change (Comment added) made by seanius
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=995761&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: Enhancement
Group: None
>Status: Pending
Resolution: None
Priority: 5
Submitted By: Jorgen Lundman (lundman)
>Assigned to: M. Sean Finney (seanius)
Summary: check_disk to include inode percentage.
Initial Comment:
Since the 1.4.0alpha1 plugins code in check_disk, which
calls fsusage.c, already retrieves the inode values I
thought to patch it to also print inode percentage free.
Additionally, I changed the static "0" in perfdata to
be inode percent free.
I added -W and -K (sorry, -C was taken) for inode
percent warning and critical levels. Alas, only
percentage implemented as of now. (No integer value
support).
Current output looks like:
# ./check_disk -l -w 10% -c 2% -X tmpfs -W 10% -K 2%
DISK OK - free space: / 31266 MB (93% inode=98%);|
/=31266MB;30168;32850;97;33521
And indeed, brining up the -W warning value triggers a
warning:
# ./check_disk -l -w 10% -c 2% -X tmpfs -W 98% -K 2%
DISK WARNING - free space: / 31266 MB (93% inode=98%);|
/=31266MB;30168;32850;97;33521
Hope it helps more than it annoys. I could also have
patched contrib/check_inodes for Solaris's "df -o i"
call, but since nearly all the work was already done in
check_disk I opted for that approach.
Sincerely,
Lundy
----------------------------------------------------------------------
Comment By: M. Sean Finney (seanius)
Date: 2005-11-02 04:02
Message:
Logged In: YES
user_id=226838
this patch has been committed to the nagiosplug CVS repository.
thank you for your contribution.
----------------------------------------------------------------------
Comment By: Jorgen Lundman (lundman)
Date: 2004-07-22 23:45
Message:
Logged In: YES
user_id=286650
Additionally, there is a bug when you use -p, or -x, to list
paths to
include or exclude. The nodes allocated do not get w_df etc
variables
cleared, so when you walk the list, they get assigned to
global w_df
variables, and all tests are out the window. This is a side
effect of
an OS where malloc() returned memory is not zero'd.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=995761&group_id=29880
More information about the Devel
mailing list