[Nagiosplug-checkins] nagiosplug/plugins check_disk.c,1.82,1.83

Thomas Guyot dermoth at users.sourceforge.net
Sat Jan 27 22:49:24 CET 2007


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv20584/plugins

Modified Files:
	check_disk.c 
Log Message:
Fix #1643463: Miscalculating thresholds check_disk


Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- check_disk.c	7 Jan 2007 07:14:04 -0000	1.82
+++ check_disk.c	27 Jan 2007 21:49:21 -0000	1.83
@@ -306,16 +306,16 @@
       critical_high_tide = UINT_MAX;
 
       if (path->freespace_units->warning != NULL) {
-        warning_high_tide = dtotal_units - path->freespace_units->warning->end;
+        warning_high_tide = path->freespace_units->warning->end;
       }
       if (path->freespace_percent->warning != NULL) {
-        warning_high_tide = abs( min( (double) warning_high_tide, (double) (1.0 - path->freespace_percent->warning->end/100)*dtotal_units ));
+        warning_high_tide = abs( min( (double) warning_high_tide, (double) path->freespace_percent->warning->end/100*dtotal_units ));
       }
       if (path->freespace_units->critical != NULL) {
-        critical_high_tide = dtotal_units - path->freespace_units->critical->end;
+        critical_high_tide = path->freespace_units->critical->end;
       }
       if (path->freespace_percent->critical != NULL) {
-        critical_high_tide = abs( min( (double) critical_high_tide, (double) (1.0 - path->freespace_percent->critical->end/100)*dtotal_units ));
+        critical_high_tide = abs( min( (double) critical_high_tide, (double) path->freespace_percent->critical->end/100*dtotal_units ));
       }
 
       asprintf (&perf, "%s %s", perf,





More information about the Commits mailing list