[Nagiosplug-devel] Changed check_procs to add performance data output

Christian Lauf mailinglisten at brennt.net
Thu May 20 11:40:30 CEST 2010


I added the number of runing processes to the performance data output in
This fix means I just added a printf-function to add the performance data
output before the newline (see line 304).

The warn;crit;min;max ranges are not included because this would require
to check how the ranges are specified.
See Line 368 and following to get the idea.

I just needed the total sum for the specified states.

Line        Content
295         printf (ngettext ("%d process", "%d processes", (unsigned
long) procs), procs); //Prints: "n process" OR "n processes"
297         if (strcmp(fmt,"") != 0) {
298                 printf (_(" with %s"), fmt);  //Prints: with
299         }
301         if ( verbose >= 1 && strcmp(fails,"") )
302                 printf (" [%s]", fails);
304         printf ("|\'Total Processes\'=%d", procs);  //Adds "|'Total
Processes'=n" to output.
305         printf ("\n");
306         return result;
307 }

If you have any fixes, enhancements, etc. feel free to contact me.

For private mail please use my GPG-Key.
ID: 0xB7849C76

More information about the Devel mailing list