Lttng is a kernel tracer who allows kernel- and userspace tracing sessions with a simple to use interface. Lttng provides the following features:
- produces CTF natively
- detailed syscall tracing
- function tracer
- cpu performance monitoring
- integrated interface for kernel- and userspace tracing
- ability to attach context information to events in traces
- graphical and commandline interface
For userspace-tracing the user had to be member of the group tracing which is a part of lttng. The ability to provide kernelspace needs membership in the group root.
For first steps you can use following commands:
- lttng create "sessionname"
- lttng enable-event sched_switch -u
(-u for userspace -k for kernelspace)
- lttng enable-event -a -u
(-a for all) (-u for userspace -k for kernelspace)
- lttng start
- lttng stop
- lttng destroy "sessionname"
In your homedirectory you found an directory called "lttng-traces". There are all files generated by lttng-daemon during the last tracing-session.
You can watch these files using any editor or using babeltrace or other tracing-read-tools. There are also own lttng-tracing-tools in the package. Try lttv or lttv-gui if you want a graphical user interface.
For more possibilities have a look at the man-pages of lttng, lttv, lttv-gui. Further Information for analysing your traces using a graphical user interface have a look at http://lttng.org/files/lttv-doc/user_guide/c42.html
for using lttv-gui and http://www.eclipse.org/linuxtools/projectPages/lttng/
for integrating tracing in your eclipse environment.
- 21 Feb 2013