[Pkg-nagios-devel] Bug#800345: Bug#800345: check_disk sees wrong disk consumption on btrfs

Klaus Ethgen Klaus at Ethgen.de
Tue Oct 27 12:29:45 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

here is a patch for that issue:
commit f7715c698e3f39a5ad81d6544d18ee182df77b1b
Author: Klaus Ethgen <Klaus at Ethgen.de>
Date:   Tue Oct 27 12:19:16 2015 +0100

    Fixing the stuff that is broken on btrfs

diff --git a/debian/patches/fix_check_disk_for_btrfs.patch b/debian/patches/fix_check_disk_for_btrfs.patch
new file mode 100644
index 0000000..e629a9a
- --- /dev/null
+++ b/debian/patches/fix_check_disk_for_btrfs.patch
@@ -0,0 +1,14 @@
+--- a/plugins/check_disk.c
++++ b/plugins/check_disk.c
+@@ -1038,10 +1038,7 @@ get_stats (struct parameter_list *p, str
+ 
+ void
+ get_path_stats (struct parameter_list *p, struct fs_usage *fsp) {
+-  /* 2007-12-08 - Workaround for Gnulib reporting insanely high available
+-  * space on BSD (the actual value should be negative but fsp->fsu_bavail
+-  * is unsigned) */
+-  p->available = fsp->fsu_bavail > fsp->fsu_bfree ? 0 : fsp->fsu_bavail;
++  p->available = fsp->fsu_bavail;
+   p->available_to_root = fsp->fsu_bfree;
+   p->used = fsp->fsu_blocks - fsp->fsu_bfree;
+   if (freespace_ignore_reserved) {
diff --git a/debian/patches/series b/debian/patches/series
index 051cf08..919e7cd 100644
- --- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@
 15_check_smtp_expect
 16_check_smtp_quit
 17_check_smtp_forcetls_on_cert
+fix_check_disk_for_btrfs.patch

Regards
   Klaus
- -- 
Klaus Ethgen                              http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16   Klaus Ethgen <Klaus at Ethgen.de>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQGcBAEBCgAGBQJWL24zAAoJEKZ8CrGAGfasDhYMAJ+PSGtrxBI+qen9Q2KjHrXO
ghJQYyYhJWUtlDhPpDif3tsJfyZaHWLeBcOwq+uUcTvVIv0UnI+LF9qYwpKdm+xO
IRmwn2dO1NzkN0R2eKoj3sjxKB/q4MLmXH6Rt7S8fc2bIH2gOPkTeQ/Dr94+cgFC
784AORHkgJVLWK8suHu5l9hrfHnyb25CjID7N4kogVau1n99zak6oAo/Ri6JKNrt
FEmPMYdBEJA03vISFKyWAh3FbijXVsDCp5m1U/gL29WqkJ6wP4UNJUSBblYbxRoY
BVRVl9ct8QlWCq+s/vw91I1OK3a7XckyuwlDcJd/pH3m2FT7l54Nkq9os1QBhwRl
zdzST8mlgp8GSLwdeH7oYjE2fhDQtBmzbhEmdnB9tI2+D69UTuHeKSy62fpAi1FP
GWRkoCV00bDObj2iiQaQMKIW2hrQDPcybvsjVuVEnDqsImZ7bOoCqNobN09zT5UH
wC7gMb4LPPQK9AOT+qspVnQH73LSLHa0BXaWfoIgEw==
=ajUg
-----END PGP SIGNATURE-----



More information about the Pkg-nagios-devel mailing list