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

SourceForge.net noreply at sourceforge.net
Wed Aug 18 13:28:07 CEST 2004


Patches item #984174, was opened at 2004-07-02 17:28
Message generated for change (Comment added) made by tonvoon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=984174&group_id=29880

Category: Perf data
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Garry W.  Cook (g_force)
>Assigned to: Ton Voon (tonvoon)
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)

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

>Comment By: Ton Voon (tonvoon)
Date: 2004-08-18 21:27

Message:
Logged In: YES 
user_id=664364

Thanks. Committed to check_disk 1.43

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

Comment By: Garry W.  Cook (g_force)
Date: 2004-07-02 22:10

Message:
Logged In: YES 
user_id=197417

OK, please disregard patch above. It did not behave the way
that I thought it did. New patch attached. If this one
doesn't work, I give up, but it seems to be correct now.
Keep in mind, that it does not display perfdata the way it
displays output. My output is in % free space, but the
perfdata is MB in use. 

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

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