diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-04-07 22:53:49 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-04-07 22:53:49 +0000 |
commit | 1a6c23309c5e57af28f6465610d98a6fc834c429 (patch) | |
tree | 740969fb573f9eaea4c6a0f10d0fce0fb71fea21 /plugins/check_nagios.c | |
parent | 8fa5d6d877b9810967396dd27dc6e0b7665ec2fa (diff) | |
download | monitoring-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c index 083b5028..64a828b9 100644 --- a/plugins/check_nagios.c +++ b/plugins/check_nagios.c @@ -55,6 +55,9 @@ main (int argc, char **argv) FILE *fp; int procuid = 0; int procppid = 0; + int procvsz = 0; + int procrss = 0; + float procpcpu = 0; char procstat[8]; char procprog[MAX_INPUT_BUFFER]; char *procargs; @@ -106,7 +109,7 @@ main (int argc, char **argv) /* count the number of matching Nagios processes... */ while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process)) { cols = sscanf (input_buffer, PS_FORMAT, PS_VARLIST); - if ( cols >= 4 ) { + if ( cols >= 6 ) { asprintf (&procargs, "%s", input_buffer + pos); strip (procargs); |