summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/check_procs.c56
1 files changed, 27 insertions, 29 deletions
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 5777ba0..53c93c0 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -51,17 +51,17 @@ const char *email = "devel@monitoring-plugins.org";
51#include <sys/stat.h> 51#include <sys/stat.h>
52#endif 52#endif
53 53
54int process_arguments (int, char **); 54static int process_arguments (int /*argc*/, char ** /*argv*/);
55int validate_arguments (void); 55static int validate_arguments (void);
56int convert_to_seconds (char *); 56static int convert_to_seconds (char * /*etime*/);
57void print_help (void); 57static void print_help (void);
58void print_usage (void); 58void print_usage (void);
59 59
60char *warning_range = NULL; 60static char *warning_range = NULL;
61char *critical_range = NULL; 61static char *critical_range = NULL;
62thresholds *procs_thresholds = NULL; 62static thresholds *procs_thresholds = NULL;
63 63
64int options = 0; /* bitmask of filter criteria to test against */ 64static int options = 0; /* bitmask of filter criteria to test against */
65#define ALL 1 65#define ALL 1
66#define STAT 2 66#define STAT 2
67#define PPID 4 67#define PPID 4
@@ -89,27 +89,25 @@ enum metric {
89}; 89};
90enum metric metric = METRIC_PROCS; 90enum metric metric = METRIC_PROCS;
91 91
92int verbose = 0; 92static int verbose = 0;
93int uid; 93static int uid;
94pid_t ppid; 94static pid_t ppid;
95int vsz; 95static int vsz;
96int rss; 96static int rss;
97float pcpu; 97static float pcpu;
98char *statopts; 98static char *statopts;
99char *prog; 99static char *prog;
100char *exclude_progs; 100static char *exclude_progs;
101char **exclude_progs_arr = NULL; 101static char **exclude_progs_arr = NULL;
102char exclude_progs_counter = 0; 102static char exclude_progs_counter = 0;
103char *args; 103static char *args;
104char *input_filename = NULL; 104static char *input_filename = NULL;
105regex_t re_args; 105static regex_t re_args;
106char *fmt; 106static char *fmt;
107char *fails; 107static char *fails;
108char tmp[MAX_INPUT_BUFFER]; 108static char tmp[MAX_INPUT_BUFFER];
109int kthread_filter = 0; 109static int kthread_filter = 0;
110int usepid = 0; /* whether to test for pid or /proc/pid/exe */ 110static int usepid = 0; /* whether to test for pid or /proc/pid/exe */
111
112FILE *ps_input = NULL;
113 111
114static int 112static int
115stat_exe (const pid_t pid, struct stat *buf) { 113stat_exe (const pid_t pid, struct stat *buf) {