From 1c3359dfd4c7c0e3435b06ed1d640d2e8cff70bb Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Fri, 4 Sep 2015 01:22:30 -0400 Subject: [PATCH] viewing-and-analyzing-your-traces: minox fixes Signed-off-by: Philippe Proulx --- .../getting-started/viewing-and-analyzing.md | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/contents/getting-started/viewing-and-analyzing.md b/contents/getting-started/viewing-and-analyzing.md index 988ddec..a00a814 100644 --- a/contents/getting-started/viewing-and-analyzing.md +++ b/contents/getting-started/viewing-and-analyzing.md @@ -5,24 +5,22 @@ id: viewing-and-analyzing-your-traces This section describes how to visualize the data gathered after tracing the Linux kernel or a user space application. -Many ways exist to read your LTTng traces: +Many ways exist to read LTTng traces: * **`babeltrace`** is a command line utility which converts trace formats; it supports the format used by LTTng, CTF, as well as a basic text output which may be `grep`ed. The `babeltrace` command is part of the - Babeltrace project. - * Babeltrace also includes a **Python binding** so that you may + Babeltrace project. + * Babeltrace also includes **Python bindings** so that you may easily open and read an LTTng trace with your own script, benefiting from the power of Python. - * **Trace Compass** + * **Trace Compass** is an Eclipse plugin used to visualize and analyze various types of - traces, including LTTng's. It also comes as a standalone application - and can be downloaded from - here. + traces, including LTTng's. It also comes as a standalone application. -LTTng trace files are usually recorded in the `~/lttng-traces` directory. +LTTng trace files are recorded in the `~/lttng-traces` directory by default. Let's now view the trace and perform a basic analysis using `babeltrace`. @@ -33,7 +31,7 @@ path to `babeltrace` with no options: babeltrace ~/lttng-traces/my-session -`babeltrace` finds all traces within the given path recursively and +`babeltrace` finds all traces recursively within the given path and prints all their events, merging them in order of time. Listing all the system calls of a Linux kernel trace with their arguments is @@ -56,13 +54,13 @@ are not trivial to write using a shell. Moreover, reductions and even the most basic computations involving multiple events are virtually impossible to implement. -Fortunately, Babeltrace ships with a Python 3 binding which makes it +Fortunately, Babeltrace ships with Python 3 bindings which makes it really easy to read the events of an LTTng trace sequentially and compute the desired information. -Here's a simple example using the Babeltrace Python binding. The following +Here's a simple example using the Babeltrace Python bindings. The following script accepts an LTTng Linux kernel trace path as its first argument and -outputs the short names of the top 5 running processes on CPU 0 during the +prints the short names of the top 5 running processes on CPU 0 during the whole trace: ~~~ python @@ -144,7 +142,7 @@ python3 top5proc.py ~/lttng-sessions/my-session-.../kernel Make sure the path you provide is the directory containing actual trace files (`channel0_0`, `metadata`, and the rest): the `babeltrace` utility -recurses directories, but the Python binding does not. +recurses directories, but the Python bindings do not. Here's an example of output: -- 2.34.1