From 3e06508b0899221e86b317af0576338c05fde5f2 Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Mon, 10 Feb 2014 19:02:20 -0500 Subject: [PATCH] live documentation Signed-off-by: Julien Desfossez --- README-LIVE | 26 +++++++++++++++++++++++++- doc/lttngtop.1 | 9 +++++---- utils/create-live-session.sh | 11 +++++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) create mode 100755 utils/create-live-session.sh diff --git a/README-LIVE b/README-LIVE index d7b6557..8ce585b 100644 --- a/README-LIVE +++ b/README-LIVE @@ -1,4 +1,28 @@ -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/ + +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 diff --git a/doc/lttngtop.1 b/doc/lttngtop.1 index f83af75..54f7c14 100644 --- a/doc/lttngtop.1 +++ b/doc/lttngtop.1 @@ -48,7 +48,7 @@ launched as root. .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 @@ -60,9 +60,10 @@ lttng destroy 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. diff --git a/utils/create-live-session.sh b/utils/create-live-session.sh new file mode 100755 index 0000000..923d860 --- /dev/null +++ b/utils/create-live-session.sh @@ -0,0 +1,11 @@ +#!/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 -- 2.34.1