<meta http-equiv="Content-Type" content="text/html; charset=GB18030"><div>Hi,</div><div><br></div><div>Thanks for your reply. Some other stuff. I found that lttng is working on container awareness in this slides: https://archive.fosdem.org/2019/schedule/event/containers_lttng/attachments/slides/3419/export/events/attachments/containers_lttng/slides/3419/lttng_containers_fosdem19.pdf</div><div><br></div><div>On page #13, there is a command:  lttng add-context -k -t procname -t pid -t vpid -t tid -t vtid -t
pid_ns, where pid_ns and other namespace identifiers are very useful for tracing containers. However, it seems like that lttng of current version doesn't support adding context pid_ns(Error: Unknown context type pid_ns). Do you know how to enable these features?</div><div><br></div><div><div>Thanks a lot.</div><div>Btw, have a nice holiday!</div><div><br></div><div>Serica</div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="font-size: 12px; background: rgb(239, 239, 239); padding: 8px; --darkreader-inline-bgimage: initial; --darkreader-inline-bgcolor:#282723;" data-darkreader-inline-bgimage="" data-darkreader-inline-bgcolor=""><div><b>发件人:</b>                                                                                                                        "Mathieu Desnoyers"                                                                                    <mathieu.desnoyers@efficios.com>;</div><div><b>发送时间:</b> 2020年12月17日(星期四) 晚上11:27</div><div><b>收件人:</b> "Serica"<serica_law@qq.com>;<wbr></div><div><b>抄送:</b> "lttng-dev"<lttng-dev@lists.lttng.org>;<wbr></div><div><b>主题:</b> Re: [lttng-dev] Possibilities to customize lttng tracepoints in kernel space</div></div><div><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); --darkreader-inline-color:#fffddd;" data-darkreader-inline-color=""><div><br></div><div><br></div><div><span id="zwchr" data-marker="__DIVIDER__">----- On Dec 16, 2020, at 4:19 AM, lttng-dev <lttng-dev@lists.lttng.org> wrote:<br></span></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; --darkreader-inline-border-left:#100f62; --darkreader-inline-color:#fffddd;" data-darkreader-inline-border-left="" data-darkreader-inline-color=""><div>Hi,</div><br><div>I send this email to consult that whether it is possible to customize lttng tracepoints in kernel space. I have learnt that lttng leverages linux tracepoint to collect audit logs like system calls. Also, I have found that user can define their customized tracepoints in user space by using lttng-ust so that they can trace their user applications.</div><br><div>Is it possible for lttng users to customize the existing tracepoints in kernel space? For example, after the system call sys_clone, or read, called and then collected by lttng, I want to process some data ( e.g., the return value of the syscall ), and place the result in a new field in the audit log ( or using another approach, by emitting a new type of event in the audit log ), and later when parsed by babeltrace, we can see the newly-added field or event in the parsed result.</div><br><div>Looking forward to your reply.</div></blockquote><div><br></div><div>Hi,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>You will want to start by having a look at this section of the LTTng documentation: https://lttng.org/docs/v2.12/#doc-instrumenting-linux-kernel<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>You can indeed modify lttng-modules to change the fields gathered by the system call tracing facility (see include/instrumentation/syscalls/README section (3)).</div><div>Those changes will be reflected in the resulting trace data.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thanks,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Mathieu<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; --darkreader-inline-border-left:#100f62; --darkreader-inline-color:#fffddd;" data-darkreader-inline-border-left="" data-darkreader-inline-color=""><br><div>Best wishes,</div><br><div>Serica</div><br>_______________________________________________<br>lttng-dev mailing list<br>lttng-dev@lists.lttng.org<br>https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev<br></blockquote></div><div><br></div><div data-marker="__SIG_POST__">-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com</div></div></div>