-In order to use the (beta) live tracing features of LttngTop, you need these
+As of LTTng v2.4, we can now process traces while they are being recorded
+(called live-tracing). LTTngtop can read live traces either in the ncurses GUI
+or in text mode.
+
+In order to use this feature, start by creating a live session with at least
+the events and contexts required for LTTngtop (see the manpage for that). A
+simple script to do the basic setup is available in
+utils/create-live-session.sh
+
+Once the session is created, you can list the sessions established on the
+relay with :
+$ lttngtop -r net://relaydhostname
+
+And attach to a session with
+$ lttngtop -r net://relaydhostname/host/<hostname/<session-name>
+
+A few seconds later, you should begin to see your live trace being displayed in
+lttngtop gui.
+To use the textdump feature, use the -t (and see --help for more options). You
+can also use the new lttngtrace provided by lttngtop which does all the setup
+for a live trace in textdump on localhost.
+
+
+EXPERIMENTAL :
+In order to use the (beta) MMAP live tracing features of LttngTop, you need these
branches :
git clone -b lttngtop-live git://git.dorsal.polymtl.ca/~jdesfossez/lttng-tools
.nf
lttng create lttngtop
-lttng enable-event -k lttng_statedump_start,lttng_statedump_end,lttng_statedump_process_state,lttng_statedump_file_descriptor,lttng_statedump_vm_map,lttng_statedump_network_interface,lttng_statedump_interrupt,sched_process_free,sched_switch -s lttngtop
+lttng enable-event -k lttng_statedump_start,lttng_statedump_end,lttng_statedump_process_state,lttng_statedump_file_descriptor,lttng_statedump_vm_map,lttng_statedump_network_interface,lttng_statedump_interrupt,sched_process_free,sched_switchsched_process_fork -s lttngtop
lttng enable-event -k --syscall -a -s lttngtop
lttng add-context -k -t pid -t procname -t tid -t ppid -t perf:cache-misses -t perf:major-faults -t perf:branch-load-misses -s lttngtop
lttng start lttngtop
.SH "LIVE STREAMING"
.PP
-In addition to offline traces, LTTngTop can read traces while they are being recorded.
-The official supported way of doing live streaming is using lttng-tools >=2.4 and
-following the documentation in live-reading-howto.txt.
+In addition to offline traces, LTTngTop can read traces while they are being
+recorded. The official supported way of doing live streaming is using
+lttng-tools >=2.4 and following the documentation in live-reading-howto.txt of
+lttng-tools and README-LIVE of lttngtop.
An other experimental way of doing live tracing is with mmap, but this requires some
more work because is not officially supported and requires out-of-tree patches to
lttng-tools and babeltrace.
--- /dev/null
+#!/bin/bash
+
+# Just create the live session on localhost
+
+SESSION_NAME="lttngtop-live-simple"
+
+lttng create $SESSION_NAME --live 1000000 -U net://localhost
+lttng enable-event -s $SESSION_NAME -k lttng_statedump_start,lttng_statedump_end,lttng_statedump_process_state,lttng_statedump_file_descriptor,lttng_statedump_vm_map,lttng_statedump_network_interface,lttng_statedump_interrupt,sched_process_free,sched_switch,sched_process_fork
+lttng enable-event -s $SESSION_NAME -k --syscall -a
+lttng add-context -s $SESSION_NAME -k -t pid -t procname -t tid -t ppid -t perf:cache-misses -t perf:major-faults -t perf:branch-load-misses
+lttng start $SESSION_NAME