Lines 1-4
Link Here
|
1 |
--- plugins/check_procs.c.orig 2020-12-09 21:38:01 UTC |
1 |
--- plugins/check_procs.c.orig 2022-10-19 12:50:27 UTC |
2 |
+++ plugins/check_procs.c |
2 |
+++ plugins/check_procs.c |
3 |
@@ -70,6 +70,7 @@ int options = 0; /* bitmask of filter criteria to test |
3 |
@@ -70,6 +70,7 @@ int options = 0; /* bitmask of filter criteria to test |
4 |
#define PCPU 256 |
4 |
#define PCPU 256 |
Lines 8-14
Link Here
|
8 |
|
8 |
|
9 |
#define KTHREAD_PARENT "kthreadd" /* the parent process of kernel threads: |
9 |
#define KTHREAD_PARENT "kthreadd" /* the parent process of kernel threads: |
10 |
ppid of procs are compared to pid of this proc*/ |
10 |
ppid of procs are compared to pid of this proc*/ |
11 |
@@ -101,6 +102,7 @@ char *fails; |
11 |
@@ -101,6 +102,7 @@ int usepid = 0; /* whether to test for pid or /proc/pi |
12 |
char tmp[MAX_INPUT_BUFFER]; |
12 |
char tmp[MAX_INPUT_BUFFER]; |
13 |
int kthread_filter = 0; |
13 |
int kthread_filter = 0; |
14 |
int usepid = 0; /* whether to test for pid or /proc/pid/exe */ |
14 |
int usepid = 0; /* whether to test for pid or /proc/pid/exe */ |
Lines 28-38
Link Here
|
28 |
procseconds = convert_to_seconds(procetime); |
28 |
procseconds = convert_to_seconds(procetime); |
29 |
|
29 |
|
30 |
if (verbose >= 3) |
30 |
if (verbose >= 3) |
31 |
- printf ("proc#=%d uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n", |
31 |
- printf ("proc#=%d uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n", |
32 |
+ printf ("proc#=%d uid=%d vsz=%d rss=%d pid=%d ppid=%d jid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n", |
32 |
+ printf ("proc#=%d uid=%d vsz=%d rss=%d pid=%d ppid=%d jid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n", |
33 |
procs, procuid, procvsz, procrss, |
33 |
procs, procuid, procvsz, procrss, |
34 |
- procpid, procppid, procpcpu, procstat, |
34 |
- procpid, procppid, procpcpu, procstat, |
35 |
+ procpid, procppid, procjid, procpcpu, procstat, |
35 |
+ procpid, procppid, procjid, procpcpu, procstat, |
36 |
procetime, procprog, procargs); |
36 |
procetime, procprog, procargs); |
37 |
|
37 |
|
38 |
/* Ignore self */ |
38 |
/* Ignore self */ |
Lines 49-59
Link Here
|
49 |
|
49 |
|
50 |
procs++; |
50 |
procs++; |
51 |
if (verbose >= 2) { |
51 |
if (verbose >= 2) { |
52 |
- printf ("Matched: uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n", |
52 |
- printf ("Matched: uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n", |
53 |
+ printf ("Matched: uid=%d vsz=%d rss=%d pid=%d ppid=%d jid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n", |
53 |
+ printf ("Matched: uid=%d vsz=%d rss=%d pid=%d ppid=%d jid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n", |
54 |
procuid, procvsz, procrss, |
54 |
procuid, procvsz, procrss, |
55 |
- procpid, procppid, procpcpu, procstat, |
55 |
- procpid, procppid, procpcpu, procstat, |
56 |
+ procpid, procppid, procjid, procpcpu, procstat, |
56 |
+ procpid, procppid, procjid, procpcpu, procstat, |
57 |
procetime, procprog, procargs); |
57 |
procetime, procprog, procargs); |
58 |
} |
58 |
} |
59 |
|
59 |
|
Lines 96-102
Link Here
|
96 |
printf (" %s\n", "-z, --vsz=VSZ"); |
96 |
printf (" %s\n", "-z, --vsz=VSZ"); |
97 |
printf (" %s\n", _("Only scan for processes with VSZ higher than indicated.")); |
97 |
printf (" %s\n", _("Only scan for processes with VSZ higher than indicated.")); |
98 |
printf (" %s\n", "-r, --rss=RSS"); |
98 |
printf (" %s\n", "-r, --rss=RSS"); |
99 |
@@ -784,7 +798,7 @@ void |
99 |
@@ -784,7 +798,7 @@ print_usage (void) |
100 |
print_usage (void) |
100 |
print_usage (void) |
101 |
{ |
101 |
{ |
102 |
printf ("%s\n", _("Usage:")); |
102 |
printf ("%s\n", _("Usage:")); |