summaryrefslogtreecommitdiffstats
path: root/plugins/check_nagios.c
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2003-04-07 22:53:49 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2003-04-07 22:53:49 (GMT)
commit1a6c23309c5e57af28f6465610d98a6fc834c429 (patch)
tree740969fb573f9eaea4c6a0f10d0fce0fb71fea21 /plugins/check_nagios.c
parent8fa5d6d877b9810967396dd27dc6e0b7665ec2fa (diff)
downloadmonitoring-plugins-1a6c23309c5e57af28f6465610d98a6fc834c429.tar.gz
Souped up check_procs with different metrics
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@474 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_nagios.c')
-rw-r--r--plugins/check_nagios.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c
index 083b502..64a828b 100644
--- a/plugins/check_nagios.c
+++ b/plugins/check_nagios.c
@@ -55,6 +55,9 @@ main (int argc, char **argv)
55 FILE *fp; 55 FILE *fp;
56 int procuid = 0; 56 int procuid = 0;
57 int procppid = 0; 57 int procppid = 0;
58 int procvsz = 0;
59 int procrss = 0;
60 float procpcpu = 0;
58 char procstat[8]; 61 char procstat[8];
59 char procprog[MAX_INPUT_BUFFER]; 62 char procprog[MAX_INPUT_BUFFER];
60 char *procargs; 63 char *procargs;
@@ -106,7 +109,7 @@ main (int argc, char **argv)
106 /* count the number of matching Nagios processes... */ 109 /* count the number of matching Nagios processes... */
107 while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process)) { 110 while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process)) {
108 cols = sscanf (input_buffer, PS_FORMAT, PS_VARLIST); 111 cols = sscanf (input_buffer, PS_FORMAT, PS_VARLIST);
109 if ( cols >= 4 ) { 112 if ( cols >= 6 ) {
110 asprintf (&procargs, "%s", input_buffer + pos); 113 asprintf (&procargs, "%s", input_buffer + pos);
111 strip (procargs); 114 strip (procargs);
112 115