diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-01-15 11:34:15 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-01-15 11:34:15 +0000 |
commit | b7676a7e6df517827f48c2f105261d5676b5e694 (patch) | |
tree | 74d9c79187df934319b8dfb9b0b8f6fb64a70519 | |
parent | 546410a5f94cd796ff6b7ba531dca8f0d1971471 (diff) | |
download | monitoring-plugins-b7676a7e6df517827f48c2f105261d5676b5e694.tar.gz |
Fix check_disk disk usage calculation when using --group=NAME (related to bug #1348746)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1907 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | plugins/check_disk.c | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -6,6 +6,7 @@ This file documents the major additions and syntax changes between releases. | |||
6 | check_dns now sorts addresses for testing results for more than one returned IP (Matthias Urlichs) | 6 | check_dns now sorts addresses for testing results for more than one returned IP (Matthias Urlichs) |
7 | Fix segfault in check_ntp_time and (deprecated) check_ntp. (Bug #1862300) | 7 | Fix segfault in check_ntp_time and (deprecated) check_ntp. (Bug #1862300) |
8 | check_disk should now work with large file systems (2TB+) on all archs that supports it | 8 | check_disk should now work with large file systems (2TB+) on all archs that supports it |
9 | Fixed check_disk disk usage calculation when using --group=NAME (related to bug #1348746) | ||
9 | 10 | ||
10 | 1.4.11 13th December 2007 | 11 | 1.4.11 13th December 2007 |
11 | Fixed check_http regression in 1.4.10 where following redirects to | 12 | Fixed check_http regression in 1.4.10 where following redirects to |
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index b8bbdbda..5ef957de 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
@@ -265,7 +265,8 @@ main (int argc, char **argv) | |||
265 | (fsp.fsu_blocks + tmpfsp.fsu_blocks); /* Size of a block. */ | 265 | (fsp.fsu_blocks + tmpfsp.fsu_blocks); /* Size of a block. */ |
266 | fsp.fsu_blocks += tmpfsp.fsu_blocks; /* Total blocks. */ | 266 | fsp.fsu_blocks += tmpfsp.fsu_blocks; /* Total blocks. */ |
267 | fsp.fsu_bfree += tmpfsp.fsu_bfree; /* Free blocks available to superuser. */ | 267 | fsp.fsu_bfree += tmpfsp.fsu_bfree; /* Free blocks available to superuser. */ |
268 | fsp.fsu_bavail += tmpfsp.fsu_bavail; /* Free blocks available to non-superuser. */ | 268 | /* Gnulib workaround - see comment about it a few lines below */ |
269 | fsp.fsu_bavail += (tmpfsp.fsu_bavail > tmpfsp.fsu_bfree ? 0 : tmpfsp.fsu_bavail); /* Free blocks available to non-superuser. */ | ||
269 | fsp.fsu_files += tmpfsp.fsu_files; /* Total file nodes. */ | 270 | fsp.fsu_files += tmpfsp.fsu_files; /* Total file nodes. */ |
270 | fsp.fsu_ffree += tmpfsp.fsu_ffree; /* Free file nodes. */ | 271 | fsp.fsu_ffree += tmpfsp.fsu_ffree; /* Free file nodes. */ |
271 | 272 | ||