X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;fp=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=28166c8be28e5a9588d14d8f14adfd56a39810dd;hp=d43127d1d444b24c1675a07ec4cda908c058bcc6;hb=5b89fc92cbb5a2a9d1fd2994edebb0453584f87c;hpb=beede00c4c60130c7689231b2dd4cb61a6aae34f diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index d43127d1d..28166c8be 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -24,6 +24,7 @@ #include #include +#include #include #include "../command.h" @@ -1858,7 +1859,6 @@ static int list_sessions(const char *session_name) MSG("Available tracing sessions:"); } - for (i = 0; i < count; i++) { if (session_name != NULL) { if (strncmp(sessions[i].name, session_name, NAME_MAX) == 0) { @@ -1866,20 +1866,25 @@ static int list_sessions(const char *session_name) MSG("Tracing session %s: [%s%s]", session_name, active_string(sessions[i].enabled), snapshot_string(sessions[i].snapshot_mode)); - MSG("%sTrace path: %s\n", indent4, sessions[i].path); + if (*sessions[i].path) { + MSG("%sTrace output: %s\n", indent4, sessions[i].path); + } memcpy(&listed_session, &sessions[i], sizeof(listed_session)); break; } } else { - MSG(" %d) %s (%s) [%s%s]", i + 1, - sessions[i].name, sessions[i].path, + MSG(" %d) %s [%s%s]", i + 1, + sessions[i].name, active_string(sessions[i].enabled), snapshot_string(sessions[i].snapshot_mode)); - MSG("%sTrace path: %s", indent4, sessions[i].path); + if (*sessions[i].path) { + MSG("%sTrace output: %s", indent4, sessions[i].path); + } if (sessions[i].live_timer_interval != 0) { - MSG("%sLive timer interval: %u µs", indent4, - sessions[i].live_timer_interval); + MSG("%sLive timer interval: %u %s", indent4, + sessions[i].live_timer_interval, + USEC_UNIT); } MSG(""); }