2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License, version 2 only,
6 * as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <lttng/constant.h>
27 #include "../command.h"
29 static int opt_userspace
;
30 static int opt_kernel
;
32 static char *opt_channel
;
33 static int opt_domain
;
34 static int opt_fields
;
36 /* Not implemented yet */
37 static char *opt_cmd_name
;
41 const char *indent4
= " ";
42 const char *indent6
= " ";
43 const char *indent8
= " ";
51 static struct lttng_handle
*handle
;
53 static struct poptOption long_options
[] = {
54 /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
55 {"help", 'h', POPT_ARG_NONE
, 0, OPT_HELP
, 0, 0},
56 {"kernel", 'k', POPT_ARG_VAL
, &opt_kernel
, 1, 0, 0},
57 {"jul", 'j', POPT_ARG_VAL
, &opt_jul
, 1, 0, 0},
59 /* Not implemented yet */
60 {"userspace", 'u', POPT_ARG_STRING
| POPT_ARGFLAG_OPTIONAL
, &opt_cmd_name
, OPT_USERSPACE
, 0, 0},
61 {"pid", 'p', POPT_ARG_INT
, &opt_pid
, 0, 0, 0},
63 {"userspace", 'u', POPT_ARG_NONE
, 0, OPT_USERSPACE
, 0, 0},
65 {"channel", 'c', POPT_ARG_STRING
, &opt_channel
, 0, 0, 0},
66 {"domain", 'd', POPT_ARG_VAL
, &opt_domain
, 1, 0, 0},
67 {"fields", 'f', POPT_ARG_VAL
, &opt_fields
, 1, 0, 0},
68 {"list-options", 0, POPT_ARG_NONE
, NULL
, OPT_LIST_OPTIONS
, NULL
, NULL
},
75 static void usage(FILE *ofp
)
77 fprintf(ofp
, "usage: lttng list [OPTIONS] [SESSION [SESSION OPTIONS]]\n");
79 fprintf(ofp
, "With no arguments, list available tracing session(s)\n");
81 fprintf(ofp
, "Without a session, -k lists available kernel events\n");
82 fprintf(ofp
, "Without a session, -u lists available userspace events\n");
84 fprintf(ofp
, " -h, --help Show this help\n");
85 fprintf(ofp
, " --list-options Simple listing of options\n");
86 fprintf(ofp
, " -k, --kernel Select kernel domain\n");
87 fprintf(ofp
, " -u, --userspace Select user-space domain.\n");
88 fprintf(ofp
, " -j, --jul Apply for Java application using JUL\n");
89 fprintf(ofp
, " -f, --fields List event fields.\n");
91 fprintf(ofp
, " -p, --pid PID List user-space events by PID\n");
94 fprintf(ofp
, "Session Options:\n");
95 fprintf(ofp
, " -c, --channel NAME List details of a channel\n");
96 fprintf(ofp
, " -d, --domain List available domain(s)\n");
101 * Get command line from /proc for a specific pid.
103 * On success, return an allocated string pointer to the proc cmdline.
104 * On error, return NULL.
106 static char *get_cmdline_by_pid(pid_t pid
)
110 char *cmdline
= NULL
;
111 /* Can't go bigger than /proc/LTTNG_MAX_PID/cmdline */
112 char path
[sizeof("/proc//cmdline") + sizeof(LTTNG_MAX_PID_STR
) - 1];
114 snprintf(path
, sizeof(path
), "/proc/%d/cmdline", pid
);
115 fp
= fopen(path
, "r");
120 /* Caller must free() *cmdline */
121 cmdline
= zmalloc(PATH_MAX
);
123 perror("malloc cmdline");
126 ret
= fread(cmdline
, 1, PATH_MAX
, fp
);
128 perror("fread proc list");
137 const char *active_string(int value
)
140 case 0: return "inactive";
141 case 1: return "active";
143 default: return NULL
;
147 static const char *snapshot_string(int value
)
158 const char *enabled_string(int value
)
161 case 0: return " [disabled]";
162 case 1: return " [enabled]";
164 default: return NULL
;
169 const char *filter_string(int value
)
172 case 1: return " [with filter]";
178 const char *exclusion_string(int value
)
181 case 1: return " [has exclusions]";
186 static const char *loglevel_jul_string(int value
)
191 case LTTNG_LOGLEVEL_JUL_OFF
:
193 case LTTNG_LOGLEVEL_JUL_SEVERE
:
195 case LTTNG_LOGLEVEL_JUL_WARNING
:
196 return "JUL_WARNING";
197 case LTTNG_LOGLEVEL_JUL_INFO
:
199 case LTTNG_LOGLEVEL_JUL_CONFIG
:
201 case LTTNG_LOGLEVEL_JUL_FINE
:
203 case LTTNG_LOGLEVEL_JUL_FINER
:
205 case LTTNG_LOGLEVEL_JUL_FINEST
:
207 case LTTNG_LOGLEVEL_JUL_ALL
:
210 return "<<UNKNOWN>>";
214 static const char *loglevel_string(int value
)
219 case LTTNG_LOGLEVEL_EMERG
:
220 return "TRACE_EMERG";
221 case LTTNG_LOGLEVEL_ALERT
:
222 return "TRACE_ALERT";
223 case LTTNG_LOGLEVEL_CRIT
:
225 case LTTNG_LOGLEVEL_ERR
:
227 case LTTNG_LOGLEVEL_WARNING
:
228 return "TRACE_WARNING";
229 case LTTNG_LOGLEVEL_NOTICE
:
230 return "TRACE_NOTICE";
231 case LTTNG_LOGLEVEL_INFO
:
233 case LTTNG_LOGLEVEL_DEBUG_SYSTEM
:
234 return "TRACE_DEBUG_SYSTEM";
235 case LTTNG_LOGLEVEL_DEBUG_PROGRAM
:
236 return "TRACE_DEBUG_PROGRAM";
237 case LTTNG_LOGLEVEL_DEBUG_PROCESS
:
238 return "TRACE_DEBUG_PROCESS";
239 case LTTNG_LOGLEVEL_DEBUG_MODULE
:
240 return "TRACE_DEBUG_MODULE";
241 case LTTNG_LOGLEVEL_DEBUG_UNIT
:
242 return "TRACE_DEBUG_UNIT";
243 case LTTNG_LOGLEVEL_DEBUG_FUNCTION
:
244 return "TRACE_DEBUG_FUNCTION";
245 case LTTNG_LOGLEVEL_DEBUG_LINE
:
246 return "TRACE_DEBUG_LINE";
247 case LTTNG_LOGLEVEL_DEBUG
:
248 return "TRACE_DEBUG";
250 return "<<UNKNOWN>>";
254 static const char *logleveltype_string(enum lttng_loglevel_type value
)
257 case LTTNG_EVENT_LOGLEVEL_ALL
:
259 case LTTNG_EVENT_LOGLEVEL_RANGE
:
261 case LTTNG_EVENT_LOGLEVEL_SINGLE
:
264 return " <<TYPE UNKN>>";
269 * Pretty print single event.
271 static void print_events(struct lttng_event
*event
)
273 switch (event
->type
) {
274 case LTTNG_EVENT_TRACEPOINT
:
276 if (event
->loglevel
!= -1) {
277 MSG("%s%s (loglevel%s %s (%d)) (type: tracepoint)%s%s%s",
280 logleveltype_string(event
->loglevel_type
),
281 loglevel_string(event
->loglevel
),
283 enabled_string(event
->enabled
),
284 exclusion_string(event
->exclusion
),
285 filter_string(event
->filter
));
287 MSG("%s%s (type: tracepoint)%s%s%s",
290 enabled_string(event
->enabled
),
291 exclusion_string(event
->exclusion
),
292 filter_string(event
->filter
));
296 case LTTNG_EVENT_FUNCTION
:
297 MSG("%s%s (type: function)%s%s", indent6
,
298 event
->name
, enabled_string(event
->enabled
),
299 filter_string(event
->filter
));
300 if (event
->attr
.probe
.addr
!= 0) {
301 MSG("%saddr: 0x%" PRIx64
, indent8
, event
->attr
.probe
.addr
);
303 MSG("%soffset: 0x%" PRIx64
, indent8
, event
->attr
.probe
.offset
);
304 MSG("%ssymbol: %s", indent8
, event
->attr
.probe
.symbol_name
);
307 case LTTNG_EVENT_PROBE
:
308 MSG("%s%s (type: probe)%s%s", indent6
,
309 event
->name
, enabled_string(event
->enabled
),
310 filter_string(event
->filter
));
311 if (event
->attr
.probe
.addr
!= 0) {
312 MSG("%saddr: 0x%" PRIx64
, indent8
, event
->attr
.probe
.addr
);
314 MSG("%soffset: 0x%" PRIx64
, indent8
, event
->attr
.probe
.offset
);
315 MSG("%ssymbol: %s", indent8
, event
->attr
.probe
.symbol_name
);
318 case LTTNG_EVENT_FUNCTION_ENTRY
:
319 MSG("%s%s (type: function)%s%s", indent6
,
320 event
->name
, enabled_string(event
->enabled
),
321 filter_string(event
->filter
));
322 MSG("%ssymbol: \"%s\"", indent8
, event
->attr
.ftrace
.symbol_name
);
324 case LTTNG_EVENT_SYSCALL
:
325 MSG("%ssyscalls (type: syscall)%s%s", indent6
,
326 enabled_string(event
->enabled
),
327 filter_string(event
->filter
));
329 case LTTNG_EVENT_NOOP
:
330 MSG("%s (type: noop)%s%s", indent6
,
331 enabled_string(event
->enabled
),
332 filter_string(event
->filter
));
334 case LTTNG_EVENT_ALL
:
335 /* We should never have "all" events in list. */
341 static const char *field_type(struct lttng_event_field
*field
)
343 switch(field
->type
) {
344 case LTTNG_EVENT_FIELD_INTEGER
:
346 case LTTNG_EVENT_FIELD_ENUM
:
348 case LTTNG_EVENT_FIELD_FLOAT
:
350 case LTTNG_EVENT_FIELD_STRING
:
352 case LTTNG_EVENT_FIELD_OTHER
:
353 default: /* fall-through */
359 * Pretty print single event fields.
361 static void print_event_field(struct lttng_event_field
*field
)
363 if (!field
->field_name
[0]) {
366 MSG("%sfield: %s (%s)%s", indent8
, field
->field_name
,
367 field_type(field
), field
->nowrite
? " [no write]" : "");
370 static int list_jul_events(void)
373 struct lttng_domain domain
;
374 struct lttng_handle
*handle
;
375 struct lttng_event
*event_list
;
377 char *cmdline
= NULL
;
379 DBG("Getting JUL tracing events");
381 memset(&domain
, 0, sizeof(domain
));
382 domain
.type
= LTTNG_DOMAIN_JUL
;
384 handle
= lttng_create_handle(NULL
, &domain
);
385 if (handle
== NULL
) {
389 size
= lttng_list_tracepoints(handle
, &event_list
);
391 ERR("Unable to list JUL events: %s", lttng_strerror(size
));
392 lttng_destroy_handle(handle
);
396 MSG("JUL events (Logger name):\n-------------------------");
402 for (i
= 0; i
< size
; i
++) {
403 if (cur_pid
!= event_list
[i
].pid
) {
404 cur_pid
= event_list
[i
].pid
;
405 cmdline
= get_cmdline_by_pid(cur_pid
);
406 MSG("\nPID: %d - Name: %s", cur_pid
, cmdline
);
409 MSG("%s- %s", indent6
, event_list
[i
].name
);
415 lttng_destroy_handle(handle
);
420 lttng_destroy_handle(handle
);
425 * Ask session daemon for all user space tracepoints available.
427 static int list_ust_events(void)
430 struct lttng_domain domain
;
431 struct lttng_handle
*handle
;
432 struct lttng_event
*event_list
;
434 char *cmdline
= NULL
;
436 memset(&domain
, 0, sizeof(domain
));
438 DBG("Getting UST tracing events");
440 domain
.type
= LTTNG_DOMAIN_UST
;
442 handle
= lttng_create_handle(NULL
, &domain
);
443 if (handle
== NULL
) {
447 size
= lttng_list_tracepoints(handle
, &event_list
);
449 ERR("Unable to list UST events: %s", lttng_strerror(size
));
450 lttng_destroy_handle(handle
);
454 MSG("UST events:\n-------------");
460 for (i
= 0; i
< size
; i
++) {
461 if (cur_pid
!= event_list
[i
].pid
) {
462 cur_pid
= event_list
[i
].pid
;
463 cmdline
= get_cmdline_by_pid(cur_pid
);
464 MSG("\nPID: %d - Name: %s", cur_pid
, cmdline
);
467 print_events(&event_list
[i
]);
473 lttng_destroy_handle(handle
);
478 lttng_destroy_handle(handle
);
483 * Ask session daemon for all user space tracepoint fields available.
485 static int list_ust_event_fields(void)
488 struct lttng_domain domain
;
489 struct lttng_handle
*handle
;
490 struct lttng_event_field
*event_field_list
;
492 char *cmdline
= NULL
;
494 struct lttng_event cur_event
;
496 memset(&domain
, 0, sizeof(domain
));
497 memset(&cur_event
, 0, sizeof(cur_event
));
499 DBG("Getting UST tracing event fields");
501 domain
.type
= LTTNG_DOMAIN_UST
;
503 handle
= lttng_create_handle(NULL
, &domain
);
504 if (handle
== NULL
) {
508 size
= lttng_list_tracepoint_fields(handle
, &event_field_list
);
510 ERR("Unable to list UST event fields: %s", lttng_strerror(size
));
511 lttng_destroy_handle(handle
);
515 MSG("UST events:\n-------------");
521 for (i
= 0; i
< size
; i
++) {
522 if (cur_pid
!= event_field_list
[i
].event
.pid
) {
523 cur_pid
= event_field_list
[i
].event
.pid
;
524 cmdline
= get_cmdline_by_pid(cur_pid
);
525 MSG("\nPID: %d - Name: %s", cur_pid
, cmdline
);
527 /* Wipe current event since we are about to print a new PID. */
528 memset(&cur_event
, 0, sizeof(cur_event
));
530 if (strcmp(cur_event
.name
, event_field_list
[i
].event
.name
) != 0) {
531 print_events(&event_field_list
[i
].event
);
532 memcpy(&cur_event
, &event_field_list
[i
].event
,
535 print_event_field(&event_field_list
[i
]);
540 free(event_field_list
);
541 lttng_destroy_handle(handle
);
546 lttng_destroy_handle(handle
);
551 * Ask for all trace events in the kernel and pretty print them.
553 static int list_kernel_events(void)
556 struct lttng_domain domain
;
557 struct lttng_handle
*handle
;
558 struct lttng_event
*event_list
;
560 memset(&domain
, 0, sizeof(domain
));
562 DBG("Getting kernel tracing events");
564 domain
.type
= LTTNG_DOMAIN_KERNEL
;
566 handle
= lttng_create_handle(NULL
, &domain
);
567 if (handle
== NULL
) {
571 size
= lttng_list_tracepoints(handle
, &event_list
);
573 ERR("Unable to list kernel events: %s", lttng_strerror(size
));
574 lttng_destroy_handle(handle
);
578 MSG("Kernel events:\n-------------");
580 for (i
= 0; i
< size
; i
++) {
581 print_events(&event_list
[i
]);
588 lttng_destroy_handle(handle
);
592 lttng_destroy_handle(handle
);
597 * List JUL events for a specific session using the handle.
599 * Return CMD_SUCCESS on success else a negative value.
601 static int list_session_jul_events(void)
604 struct lttng_event
*events
= NULL
;
606 count
= lttng_list_events(handle
, "", &events
);
609 ERR("%s", lttng_strerror(ret
));
613 MSG("Events (Logger name):\n---------------------");
615 MSG("%sNone\n", indent6
);
619 for (i
= 0; i
< count
; i
++) {
620 MSG("%s- %s%s (loglevel%s %s)", indent4
, events
[i
].name
,
621 enabled_string(events
[i
].enabled
),
622 logleveltype_string(events
[i
].loglevel_type
),
623 loglevel_jul_string(events
[i
].loglevel
));
637 * List events of channel of session and domain.
639 static int list_events(const char *channel_name
)
642 struct lttng_event
*events
= NULL
;
644 count
= lttng_list_events(handle
, channel_name
, &events
);
647 ERR("%s", lttng_strerror(ret
));
651 MSG("\n%sEvents:", indent4
);
653 MSG("%sNone\n", indent6
);
657 for (i
= 0; i
< count
; i
++) {
658 print_events(&events
[i
]);
672 * Pretty print channel
674 static void print_channel(struct lttng_channel
*channel
)
676 MSG("- %s:%s\n", channel
->name
, enabled_string(channel
->enabled
));
678 MSG("%sAttributes:", indent4
);
679 MSG("%soverwrite mode: %d", indent6
, channel
->attr
.overwrite
);
680 MSG("%ssubbufers size: %" PRIu64
, indent6
, channel
->attr
.subbuf_size
);
681 MSG("%snumber of subbufers: %" PRIu64
, indent6
, channel
->attr
.num_subbuf
);
682 MSG("%sswitch timer interval: %u", indent6
, channel
->attr
.switch_timer_interval
);
683 MSG("%sread timer interval: %u", indent6
, channel
->attr
.read_timer_interval
);
684 MSG("%strace file count: %" PRIu64
, indent6
, channel
->attr
.tracefile_count
);
685 MSG("%strace file size (bytes): %" PRIu64
, indent6
, channel
->attr
.tracefile_size
);
686 switch (channel
->attr
.output
) {
687 case LTTNG_EVENT_SPLICE
:
688 MSG("%soutput: splice()", indent6
);
690 case LTTNG_EVENT_MMAP
:
691 MSG("%soutput: mmap()", indent6
);
697 * List channel(s) of session and domain.
699 * If channel_name is NULL, all channels are listed.
701 static int list_channels(const char *channel_name
)
703 int count
, i
, ret
= CMD_SUCCESS
;
704 unsigned int chan_found
= 0;
705 struct lttng_channel
*channels
= NULL
;
707 DBG("Listing channel(s) (%s)", channel_name
? : "<all>");
709 count
= lttng_list_channels(handle
, &channels
);
712 case LTTNG_ERR_KERN_CHAN_NOT_FOUND
:
714 WARN("No kernel channel");
717 /* We had a real error */
719 ERR("%s", lttng_strerror(ret
));
726 MSG("Channels:\n-------------");
729 for (i
= 0; i
< count
; i
++) {
730 if (channel_name
!= NULL
) {
731 if (strncmp(channels
[i
].name
, channel_name
, NAME_MAX
) == 0) {
737 print_channel(&channels
[i
]);
739 /* Listing events per channel */
740 ret
= list_events(channels
[i
].name
);
742 ERR("%s", lttng_strerror(ret
));
750 if (!chan_found
&& channel_name
!= NULL
) {
751 ERR("Channel %s not found", channel_name
);
765 * List available tracing session. List only basic information.
767 * If session_name is NULL, all sessions are listed.
769 static int list_sessions(const char *session_name
)
772 unsigned int session_found
= 0;
773 struct lttng_session
*sessions
;
775 count
= lttng_list_sessions(&sessions
);
776 DBG("Session count %d", count
);
779 ERR("%s", lttng_strerror(ret
));
781 } else if (count
== 0) {
782 MSG("Currently no available tracing session");
786 if (session_name
== NULL
) {
787 MSG("Available tracing sessions:");
790 for (i
= 0; i
< count
; i
++) {
791 if (session_name
!= NULL
) {
792 if (strncmp(sessions
[i
].name
, session_name
, NAME_MAX
) == 0) {
794 MSG("Tracing session %s: [%s%s]", session_name
,
795 active_string(sessions
[i
].enabled
),
796 snapshot_string(sessions
[i
].snapshot_mode
));
797 MSG("%sTrace path: %s", indent4
, sessions
[i
].path
);
798 MSG("%sLive timer interval (usec): %u\n", indent4
,
799 sessions
[i
].live_timer_interval
);
803 MSG(" %d) %s (%s) [%s%s]", i
+ 1, sessions
[i
].name
, sessions
[i
].path
,
804 active_string(sessions
[i
].enabled
),
805 snapshot_string(sessions
[i
].snapshot_mode
));
811 if (!session_found
&& session_name
!= NULL
) {
812 ERR("Session '%s' not found", session_name
);
817 if (session_name
== NULL
) {
818 MSG("\nUse lttng list <session_name> for more details");
829 * List available domain(s) for a session.
831 static int list_domains(const char *session_name
)
833 int i
, count
, ret
= CMD_SUCCESS
;
834 struct lttng_domain
*domains
= NULL
;
836 MSG("Domains:\n-------------");
838 count
= lttng_list_domains(session_name
, &domains
);
841 ERR("%s", lttng_strerror(ret
));
843 } else if (count
== 0) {
848 for (i
= 0; i
< count
; i
++) {
849 switch (domains
[i
].type
) {
850 case LTTNG_DOMAIN_KERNEL
:
853 case LTTNG_DOMAIN_UST
:
854 MSG(" - UST global");
856 case LTTNG_DOMAIN_JUL
:
857 MSG(" - JUL (Java Util Logging)");
872 * The 'list <options>' first level command
874 int cmd_list(int argc
, const char **argv
)
876 int opt
, ret
= CMD_SUCCESS
;
877 const char *session_name
;
878 static poptContext pc
;
879 struct lttng_domain domain
;
880 struct lttng_domain
*domains
= NULL
;
882 memset(&domain
, 0, sizeof(domain
));
890 pc
= poptGetContext(NULL
, argc
, argv
, long_options
, 0);
891 poptReadDefaultConfig(pc
, 0);
893 while ((opt
= poptGetNextOpt(pc
)) != -1) {
901 case OPT_LIST_OPTIONS
:
902 list_cmd_options(stdout
, long_options
);
911 /* Get session name (trailing argument) */
912 session_name
= poptGetArg(pc
);
913 DBG2("Session name: %s", session_name
);
916 domain
.type
= LTTNG_DOMAIN_KERNEL
;
917 } else if (opt_userspace
) {
918 DBG2("Listing userspace global domain");
919 domain
.type
= LTTNG_DOMAIN_UST
;
920 } else if (opt_jul
) {
921 DBG2("Listing JUL domain");
922 domain
.type
= LTTNG_DOMAIN_JUL
;
925 if (opt_kernel
|| opt_userspace
|| opt_jul
) {
926 handle
= lttng_create_handle(session_name
, &domain
);
927 if (handle
== NULL
) {
933 if (session_name
== NULL
) {
934 if (!opt_kernel
&& !opt_userspace
&& !opt_jul
) {
935 ret
= list_sessions(NULL
);
941 ret
= list_kernel_events();
949 ret
= list_ust_event_fields();
951 ret
= list_ust_events();
959 ret
= list_jul_events();
966 /* List session attributes */
967 ret
= list_sessions(session_name
);
974 ret
= list_domains(session_name
);
978 if (opt_kernel
|| opt_userspace
) {
979 /* Channel listing */
980 ret
= list_channels(opt_channel
);
987 /* We want all domain(s) */
988 nb_domain
= lttng_list_domains(session_name
, &domains
);
991 ERR("%s", lttng_strerror(ret
));
995 for (i
= 0; i
< nb_domain
; i
++) {
996 switch (domains
[i
].type
) {
997 case LTTNG_DOMAIN_KERNEL
:
998 MSG("=== Domain: Kernel ===\n");
1000 case LTTNG_DOMAIN_UST
:
1001 MSG("=== Domain: UST global ===\n");
1002 MSG("Buffer type: %s\n",
1003 domains
[i
].buf_type
==
1004 LTTNG_BUFFER_PER_PID
? "per PID" : "per UID");
1006 case LTTNG_DOMAIN_JUL
:
1007 MSG("=== Domain: JUL (Java Util Logging) ===\n");
1010 MSG("=== Domain: Unimplemented ===\n");
1014 /* Clean handle before creating a new one */
1016 lttng_destroy_handle(handle
);
1019 handle
= lttng_create_handle(session_name
, &domains
[i
]);
1020 if (handle
== NULL
) {
1025 if (domains
[i
].type
== LTTNG_DOMAIN_JUL
) {
1026 ret
= list_session_jul_events();
1033 ret
= list_channels(opt_channel
);
1044 lttng_destroy_handle(handle
);
1047 poptFreeContext(pc
);