[Nagiosplug-devel] [ nagiosplug-Patches-984174 ] Fix for check_disk.c Perfdata

SourceForge.net noreply at sourceforge.net
Fri Jul 2 09:29:04 CEST 2004


Patches item #984174, was opened at 2004-07-02 10:28
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=984174&group_id=29880

Category: Perf data
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Garry W.  Cook (g_force)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix for check_disk.c Perfdata

Initial Comment:
Perfdata for check_disk was reporting wrong, -w and -c 
reported backwards when using %. Patch follows:

--- check_disk.c.orig   2004-07-02 
09:50:32.000000000 -0600
+++ check_disk.c.new    2004-07-02 
10:22:10.000000000 -0600
@@ -192,8 +192,8 @@
                        asprintf (&perf, "%s %s", perf,
                                  perfdata ((!strcmp
(file_system, "none") || display_mntp) ? me-
>me_devname : me->me_mountdir,
                                            
fsp.fsu_bavail*fsp.fsu_blocksize/mult, units,
-                                           TRUE, min ((uintmax_t)
psize-(uintmax_t)w_df, (uintmax_t)((1.0-w_dfp/100.0)
*psize)),
-                                           TRUE, min ((uintmax_t)
psize-(uintmax_t)c_df, (uintmax_t)((1.0-c_dfp/100.0)
*psize)),
+                                           TRUE, min ((uintmax_t)
psize-(uintmax_t)w_df, (uintmax_t)((w_dfp/100.0)
*psize)),
+                                           TRUE, min ((uintmax_t)
psize-(uintmax_t)c_df, (uintmax_t)((c_dfp/100.0)
*psize)),
                                            TRUE, 0,
                                            TRUE, psize));
                        if (disk_result==STATE_OK && erronly 
&& !verbose)

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

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




More information about the Devel mailing list