summaryrefslogtreecommitdiffstats
path: root/web/attachments/355994-check_procs.c.patch
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/355994-check_procs.c.patch')
-rw-r--r--web/attachments/355994-check_procs.c.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/web/attachments/355994-check_procs.c.patch b/web/attachments/355994-check_procs.c.patch
new file mode 100644
index 0000000..3aa9724
--- /dev/null
+++ b/web/attachments/355994-check_procs.c.patch
@@ -0,0 +1,46 @@
1*** plugins/check_procs.org.c Mon Dec 21 15:11:31 2009
2--- plugins/check_procs.c Mon Dec 21 15:12:17 2009
3***************
4*** 280,293 ****
5 }
6
7 if ( result == STATE_OK ) {
8! printf ("%s %s: ", metric_name, _("OK"));
9 } else if (result == STATE_WARNING) {
10! printf ("%s %s: ", metric_name, _("WARNING"));
11 if ( metric != METRIC_PROCS ) {
12 printf (_("%d warn out of "), warn);
13 }
14 } else if (result == STATE_CRITICAL) {
15! printf ("%s %s: ", metric_name, _("CRITICAL"));
16 if (metric != METRIC_PROCS) {
17 printf (_("%d crit, %d warn out of "), crit, warn);
18 }
19--- 280,293 ----
20 }
21
22 if ( result == STATE_OK ) {
23! printf ("%s %s - ", metric_name, _("OK"));
24 } else if (result == STATE_WARNING) {
25! printf ("%s %s - ", metric_name, _("WARNING"));
26 if ( metric != METRIC_PROCS ) {
27 printf (_("%d warn out of "), warn);
28 }
29 } else if (result == STATE_CRITICAL) {
30! printf ("%s %s - ", metric_name, _("CRITICAL"));
31 if (metric != METRIC_PROCS) {
32 printf (_("%d crit, %d warn out of "), crit, warn);
33 }
34***************
35*** 301,306 ****
36--- 301,310 ----
37 if ( verbose >= 1 && strcmp(fails,"") )
38 printf (" [%s]", fails);
39
40+ // Print performance statistics for drawing graphs etc. tayfunsen
41+ // Not sure what 0 in the end of the line is for.
42+ printf (" | processes=%d;%d;%d;0", procs, warn, crit);
43+
44 printf ("\n");
45 return result;
46 }