[Xymon] Patch: rrd disk fix

Malcolm Hunter malcolm.hunter at gmx.com
Sat Jul 23 15:47:42 CEST 2011


Hi,

This is a patch to fix a bug with parsing of disk data for RRD graphing. The original code assumed that if the drive letter was longer than one character, the system was actually a UNIX system. In fact, this column also holds the directory where volumes can be mounted - just like with UNIX systems. The patch removes this restriction - so it now only checks if there's a '/' at the start of the first column.

Regards,
Malcolm


Index: xymond/rrd/do_disk.c
===================================================================
--- xymond/rrd/do_disk.c        (revision 6701)
+++ xymond/rrd/do_disk.c        (working copy)
@@ -103,8 +103,7 @@
                 * So check if there's a slash in the NT filesystem letter - if yes,
                 * then it's really a Unix system after all.
                 */
-               if ( (dsystype == DT_NT) && (*(columns[5])) &&
-                    ((strchr(columns[0], '/')) || (strlen(columns[0]) > 1)) )
+               if ( (dsystype == DT_NT) && (*(columns[5])) && (strchr(columns[0], '/')) )
                        dsystype = DT_UNIX;

                switch (dsystype) {



More information about the Xymon mailing list