Commit 4578cd9
tools/execsnoop: Add -M,--print-pcomm argument
Sometimes the parent process is executed instantly, tracing the parent command
would be a good choice know who executed the command. Thus, add PCOMM. At the
same time, rename the original PCOMM to COMM, and use PCOMM as the parent
command.
Before:
$ sudo ./execsnoop.py
COMM PID PPID RET ARGS
sh 44789 44682 0 /bin/sh -c cd /home/...
gcc 44788 44682 0 /usr/bin/gcc -DCAPST...
After:
$ sudo ./execsnoop.py -M
COMM PID PCOMM PPID RET ARGS
sh 44789 make 44682 0 /bin/sh -c cd /home/...
gcc 44788 make 44682 0 /usr/bin/gcc -DCAPST...
^^^^^^^^^^^^^^^^
Signed-off-by: Jiang Guirong <[email protected]>
Signed-off-by: Rong Tao <[email protected]>1 parent 5d2ef17 commit 4578cd9
2 files changed
+26
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| 137 | + | |
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
| |||
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
| 187 | + | |
183 | 188 | | |
184 | 189 | | |
185 | 190 | | |
| |||
222 | 227 | | |
223 | 228 | | |
224 | 229 | | |
| 230 | + | |
225 | 231 | | |
226 | 232 | | |
227 | 233 | | |
| |||
275 | 281 | | |
276 | 282 | | |
277 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
278 | 288 | | |
279 | | - | |
280 | | - | |
281 | | - | |
| 289 | + | |
| 290 | + | |
282 | 291 | | |
283 | 292 | | |
284 | 293 | | |
| |||
332 | 341 | | |
333 | 342 | | |
334 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
335 | 348 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
| 349 | + | |
| 350 | + | |
341 | 351 | | |
342 | 352 | | |
343 | 353 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
0 commit comments