diff options
Diffstat (limited to 'plugins/check_vsz.c')
-rw-r--r-- | plugins/check_vsz.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/check_vsz.c b/plugins/check_vsz.c index c8ca82b..f53eeae 100644 --- a/plugins/check_vsz.c +++ b/plugins/check_vsz.c | |||
@@ -93,7 +93,7 @@ main (int argc, char **argv) | |||
93 | terminate (STATE_UNKNOWN, | 93 | terminate (STATE_UNKNOWN, |
94 | "check_vsz: could not malloc message (1)"); | 94 | "check_vsz: could not malloc message (1)"); |
95 | sprintf (message, "%s %s(%d)", message, proc_name, proc_size); | 95 | sprintf (message, "%s %s(%d)", message, proc_name, proc_size); |
96 | result = max (result, STATE_WARNING); | 96 | result = max_state (result, STATE_WARNING); |
97 | } | 97 | } |
98 | if (proc_size > crit) { | 98 | if (proc_size > crit) { |
99 | result = STATE_CRITICAL; | 99 | result = STATE_CRITICAL; |
@@ -107,7 +107,7 @@ main (int argc, char **argv) | |||
107 | "check_vsz: could not malloc message (2)"); | 107 | "check_vsz: could not malloc message (2)"); |
108 | sprintf (message, "%s %d", message, proc_size); | 108 | sprintf (message, "%s %d", message, proc_size); |
109 | if (proc_size > warn) { | 109 | if (proc_size > warn) { |
110 | result = max (result, STATE_WARNING); | 110 | result = max_state (result, STATE_WARNING); |
111 | } | 111 | } |
112 | if (proc_size > crit) { | 112 | if (proc_size > crit) { |
113 | result = STATE_CRITICAL; | 113 | result = STATE_CRITICAL; |
@@ -118,13 +118,13 @@ main (int argc, char **argv) | |||
118 | 118 | ||
119 | /* If we get anything on STDERR, at least set warning */ | 119 | /* If we get anything on STDERR, at least set warning */ |
120 | while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) | 120 | while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) |
121 | result = max (result, STATE_WARNING); | 121 | result = max_state (result, STATE_WARNING); |
122 | 122 | ||
123 | (void) fclose (child_stderr); | 123 | (void) fclose (child_stderr); |
124 | 124 | ||
125 | /* close the pipe */ | 125 | /* close the pipe */ |
126 | if (spclose (child_process)) | 126 | if (spclose (child_process)) |
127 | result = max (result, STATE_WARNING); | 127 | result = max_state (result, STATE_WARNING); |
128 | 128 | ||
129 | if (result == STATE_OK) | 129 | if (result == STATE_OK) |
130 | printf ("ok (all VSZ<%d): %s\n", warn, message); | 130 | printf ("ok (all VSZ<%d): %s\n", warn, message); |