summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2003-03-08 12:08:24 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2003-03-08 12:08:24 (GMT)
commitd8e43fd6ce5f1d77e80bf84ad9e42d15a0be499a (patch)
tree5d3a8fe04ac25f3e5d424f270d09890b3db1401e
parentbc6ce874fbec767dd0047911de60ee16a0256b32 (diff)
downloadmonitoring-plugins-d8e43fd6ce5f1d77e80bf84ad9e42d15a0be499a.tar.gz
Fix AIX /proc filesystem (Ian Duggan)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/branches/release-1.3.0@387 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/check_disk.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 3c1cfef..feeff56 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -15,7 +15,7 @@
15 * currently mounted filesystems. If the percent used disk space is 15 * currently mounted filesystems. If the percent used disk space is
16 * above <c_dfp>, a STATE_CRITICAL is returned. If the percent used 16 * above <c_dfp>, a STATE_CRITICAL is returned. If the percent used
17 * disk space is above <w_dfp>, a STATE_WARNING is returned. If the 17 * disk space is above <w_dfp>, a STATE_WARNING is returned. If the
18 * speicified filesystem cannot be read, a STATE_CRITICAL is returned, 18 * specified filesystem cannot be read, a STATE_CRITICAL is returned,
19 * other errors with reading the output result in a STATE_UNKNOWN 19 * other errors with reading the output result in a STATE_UNKNOWN
20 * error. 20 * error.
21 * 21 *
@@ -96,6 +96,10 @@ main (int argc, char **argv)
96 if (!index (input_buffer, '/')) 96 if (!index (input_buffer, '/'))
97 continue; 97 continue;
98 98
99 /* Fixes AIX /proc fs which lists - for size values */
100 if (strstr (input_buffer, "/proc ") == input_buffer)
101 continue;
102
99 if (sscanf (input_buffer, "%s %d %d %d %d%% %s", file_system, 103 if (sscanf (input_buffer, "%s %d %d %d %d%% %s", file_system,
100 &total_disk, &used_disk, &free_disk, &usp, mntp) == 6 || 104 &total_disk, &used_disk, &free_disk, &usp, mntp) == 6 ||
101 sscanf (input_buffer, "%s %*s %d %d %d %d%% %s", file_system, 105 sscanf (input_buffer, "%s %*s %d %d %d %d%% %s", file_system,