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

Thomas Guyot dermoth at users.sourceforge.net
Sun Jan 7 08:14:06 CET 2007


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

Modified Files:
	check_disk.c 
Log Message:
Fix bug #1627970: check_disk performance output for more then one partition


Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- check_disk.c	20 Dec 2006 19:25:59 -0000	1.81
+++ check_disk.c	7 Jan 2007 07:14:04 -0000	1.82
@@ -164,8 +164,8 @@
   double dfree_pct = -1, dused_pct = -1;
   double dused_units, dfree_units, dtotal_units;
   double dused_inodes_percent, dfree_inodes_percent;
-  double warning_high_tide = UINT_MAX;
-  double critical_high_tide = UINT_MAX;
+  double warning_high_tide;
+  double critical_high_tide;
   int temp_result;
 
   struct mount_entry *me;
@@ -300,6 +300,11 @@
          Hack here. Trying to get warn/crit levels from freespace_(units|percent) for perf
          data. Assumption that start=0. Roll on new syntax...
       */
+
+      /* *_high_tide must be reinitialized at each run */
+      warning_high_tide = UINT_MAX;
+      critical_high_tide = UINT_MAX;
+
       if (path->freespace_units->warning != NULL) {
         warning_high_tide = dtotal_units - path->freespace_units->warning->end;
       }





More information about the Commits mailing list