[Nagiosplug-devel] [ nagiosplug-Patches-854538 ] check_nt - add check USEDDISKSPACE against remaining Mb

SourceForge.net noreply at sourceforge.net
Thu Dec 4 21:45:01 CET 2003


Patches item #854538, was opened at 2003-12-05 15:44
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=854538&group_id=29880

Category: Enhancement
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Greg Vickers (daehenoc)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_nt - add check USEDDISKSPACE against remaining Mb

Initial Comment:
Please find attached my patch for version 1.7.2.3 of
check_nt.c. This patch adds the ability to check disk
space based on the amount of Mb left on a partition. I
wrote this because 1% of a 100Gb partition is still a
lot of space! :D

The command line option is -m or --mb. The logic behind
the checks is reversed against the percentage checks:
the percentage method checks against the amount of disk
space used; the Mb method checks against the amount of
free space left.

Technical stuff:
I used Mb values rather than Gb values because of the
use of the unsigned long type for the percentage
values, which are used extensively through out
check_nt.c. So rather than rewrite a lot of check_nt.c
so you could specify, say, -w 1.2 (Gb), I decided to
use Mb value on the command line. (Debugging revealed
that when a float value is converted into an unsigned
long, you would get a negative value in that unsigned
long - not good when checking remaining disk space!)

Thanks,
Greg Vickers


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=854538&group_id=29880




More information about the Devel mailing list