Code

Fixed perfdata so that shows amount used (Garry Cook)
authorTon Voon <tonvoon@users.sourceforge.net>
Wed, 18 Aug 2004 20:21:59 +0000 (20:21 +0000)
committerTon Voon <tonvoon@users.sourceforge.net>
Wed, 18 Aug 2004 20:21:59 +0000 (20:21 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@885 f882894a-f735-0410-b71e-b25c423dba1c

plugins/check_disk.c

index 09c6b0a1c05581fc20f0b9f62f62c333d13817fa..3beb568986aa1f71327a0a97994a27bfad9bf156 100644 (file)
@@ -191,7 +191,7 @@ main (int argc, char **argv)
                        psize = fsp.fsu_blocks*fsp.fsu_blocksize/mult;
                        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,
+                                           psize-(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, 0,