1 ####################################################################
2 # Copyright (c) 2012, 2015 Ericsson
4 # All rights reserved. This program and the accompanying materials are
5 # made available under the terms of the Eclipse Public License v1.0 which
6 # accompanies this distribution, and is available at
7 # http://www.eclipse.org/legal/epl-v10.html
10 # Bernd Hufmann - Initial API and implementation
11 ####################################################################
12 ####################################################################
13 # Scenario: Test lttng not installed
14 ####################################################################
24 <COMMAND_ERROR_OUTPUT>
26 </COMMAND_ERROR_OUTPUT>
30 ####################################################################
31 # Scenario: Test lttng version
32 ####################################################################
42 lttng version 2.1.0 - Basse Messe
43 Web site: http://lttng.org/
45 lttng is free software and under the GPL license and part LGPL
49 ####################################################################
50 # Scenario: Test lttng version
52 ####################################################################
54 LttngVersionWithPrompt
62 Prompt> lttng version 2.0.0 - Annedd'ale
63 Web site: http://lttng.org/
65 lttng is free software and under the GPL license and part LGPL
69 ####################################################################
70 # Scenario: Test lttng version (unsupported version)
71 ####################################################################
73 LttngUnsupportedVersion
81 lttng version 200.0.0 - Annedd'ale
82 Web site: http://lttng.org/
84 lttng is free software and under the GPL license and part LGPL
89 ####################################################################
90 # Scenario: Test lttng version (noversion)
91 ####################################################################
101 Web site: http://lttng.org/
103 lttng is free software and under the GPL license and part LGPL
107 ####################################################################
108 # Scenario: Test lttng version (compiled from source)
109 ####################################################################
119 lttng version heads/stable-2.5-0-g3910e60 - Fumisterie
121 The Fumisterie is a beer whose style is at the confluence of English and German ales. On the palate, it is full-bodied, malty and slightly caramelized. The organic hemp seeds incorporated during the brewing gives it a unique and original taste. The hop flavour comes through delicately in the after taste.
123 Web site: http://lttng.org
125 lttng is free software and under the GPL license and part LGPL
129 ####################################################################
130 # Scenario: Test no sessions available
131 ####################################################################
141 Currently no available tracing session
145 ####################################################################
146 # Scenario: Test get sessions
147 ####################################################################
157 Available tracing sessions:
158 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928) [inactive]
159 2) mysession (/home/user/lttng-traces/mysession-20120123-083318) [inactive]
161 Use lttng list <session_name> for more details
165 ####################################################################
166 # Scenario: Test get sessions with tracing group
167 ####################################################################
169 GetSessionWithTracingGroup
177 Available tracing sessions:
178 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928) [inactive]
179 2) mysession (/home/user/lttng-traces/mysession-20120123-083318) [inactive]
181 Use lttng list <session_name> for more details
185 ####################################################################
186 # Scenario: Test lttng list <name> where session doesn't exist
187 ####################################################################
189 GetSessionNameNotExist
197 Session test not found
198 <COMMAND_ERROR_OUTPUT>
199 Error: Session name not found
200 </COMMAND_ERROR_OUTPUT>
204 ####################################################################
205 # Scenario: Test lttng -vvv list <name> where session doesn't exist
206 ####################################################################
208 GetSessionNameNotExistVerbose
216 DEBUG2: Session name: test [in cmd_list() at commands/list.c:618]
217 DEBUG1: Session count 1 [in list_sessions() at commands/list.c:485]
218 <COMMAND_ERROR_OUTPUT>
219 Error: Session 'test' not found
221 </COMMAND_ERROR_OUTPUT>
222 DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
226 ####################################################################
227 # Scenario: Test lttng list with garbage output
228 ####################################################################
238 asdfaereafsdcv 12333456434&*89**(())(^%$*
239 @#$%^&*()@#$%^&*()0834523094578kj;djkfs
240 a;sdf094v5u dsafj;sd9
244 ####################################################################
245 # Scenario: Test lttng list <name> with sample outputs
246 ####################################################################
256 Tracing session mysession: [active]
257 Trace path: /home/user/lttng-traces/mysession-20120129-084256
259 === Domain: Kernel ===
263 - channel0: [enabled]
267 subbufers size: 262144
268 number of subbufers: 4
269 switch timer interval: 0
270 read timer interval: 200
274 block_rq_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
275 block_bio_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [disabled]
277 - channel1: [disabled]
281 subbufers size: 524288
282 number of subbufers: 4
283 switch timer interval: 100
284 read timer interval: 400
290 === Domain: UST global ===
294 - mychannel1: [disabled]
299 number of subbufers: 8
300 switch timer interval: 200
301 read timer interval: 100
307 - channel0: [enabled]
312 number of subbufers: 4
313 switch timer interval: 0
314 read timer interval: 200
318 ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint) [disabled]
319 * (type: tracepoint) [enabled]
323 lttng list mysession1
329 Tracing session mysession1: [inactive]
330 Trace path: /home/user/lttng-traces/mysession1-20120203-133225
336 ####################################################################
337 # Scenario: Test "lttng list -k" with sample output
338 ####################################################################
350 sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
351 sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
352 sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
357 ####################################################################
358 # Scenario: Test "lttng list -k" with no kernel and no session daemon
359 ####################################################################
369 Spawning session daemon
370 <COMMAND_ERROR_OUTPUT>
371 Error: Unable to list kernel events
372 </COMMAND_ERROR_OUTPUT>
376 ####################################################################
377 # Scenario: Test "lttng list -k" with no kernel and with session daemon
378 ####################################################################
388 <COMMAND_ERROR_OUTPUT>
389 Error: Unable to list kernel events
390 </COMMAND_ERROR_OUTPUT>
394 ####################################################################
395 # Scenario: Test "lttng list -k" with no kernel, with session daemon and verbose
396 ####################################################################
398 ListWithNoKernelVerbose
406 DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618]
407 DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309]
408 <COMMAND_ERROR_OUTPUT>
409 Error: Unable to list kernel events
410 </COMMAND_ERROR_OUTPUT>
411 DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
415 ####################################################################
416 # Scenario: Test "lttng list -u" with sample output
417 ####################################################################
430 PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
431 ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
432 ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
434 PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
435 ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
436 ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
441 ####################################################################
442 # Scenario: Test "lttng list -u" with no UST provider available
443 ####################################################################
460 ####################################################################
461 # Scenario: Test "lttng list -u" with no UST available (LTTng 2.0.x)
462 ####################################################################
479 ####################################################################
480 # Scenario: Test "lttng list -u" with no UST available and no session daemon
481 ####################################################################
491 Spawning a session daemon
492 <COMMAND_ERROR_OUTPUT>
493 Error: Unable to list UST events: Listing UST events failed
495 </COMMAND_ERROR_OUTPUT>
499 ####################################################################
500 # Scenario: Test "lttng list -u" with no ust and with session daemon
501 ####################################################################
511 <COMMAND_ERROR_OUTPUT>
512 Error: Unable to list UST events: Listing UST events failed
514 </COMMAND_ERROR_OUTPUT>
518 ####################################################################
519 # Scenario: Test "lttng list -u" with no kernel, with session daemon and verbose
520 ####################################################################
524 lttng -vvv list -u -f
530 DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618]
531 DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309]
532 Spawning a session daemon
533 <COMMAND_ERROR_OUTPUT>
534 Error: Unable to list UST events: Listing UST events failed
536 </COMMAND_ERROR_OUTPUT>
537 DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
542 ####################################################################
543 # Scenario: Test "lttng list -u -f" with sample output (version 2.1.0)
544 ####################################################################
557 PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
558 ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
559 ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
560 field: doublefield (float)
561 field: floatfield (float)
562 field: stringfield (string)
564 PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
565 ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
566 ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
567 field: doublefield (float)
568 field: floatfield (float)
569 field: stringfield (string)
575 ####################################################################
576 # Scenario: Test "lttng create <session>
577 ####################################################################
581 lttng create mysession2
587 Session mysession2 created.
588 Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
592 ####################################################################
593 # Scenario: Test "lttng create <session>
594 ####################################################################
596 CreateSessionWithPrompt
598 lttng create mysession2
604 Prompt> Session mysession2 created.
605 Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
609 ####################################################################
610 # Scenario: Test "lttng create <session> with different variants
612 ####################################################################
614 CreateSessionVariants
616 lttng create alreadyExist
622 <COMMAND_ERROR_OUTPUT>
623 Error: Session name already exist
624 </COMMAND_ERROR_OUTPUT>
628 lttng create session with spaces
634 Session session with spaces created.
635 Traces will be written in /home/user/lttng-traces/session with spaces-20120209-095418
639 lttng create wrongName
645 Session auto created.
646 Traces will be written in /home/user/lttng-traces/auto-20120209-095418
650 lttng create wrongPath -o /home/user/hallo
656 Session wrongPath created.
657 Traces will be written in /home/user/lttng-traces/wrongPath-20120209-095418
661 lttng create pathWithSpaces -o /home/user/hallo user/here
667 Session pathWithSpaces created.
668 Traces will be written in /home/user/hallo user/here/pathWithSpaces-20120209-095418
672 ####################################################################
673 # Scenario: Test "lttng destroy <session>
674 ####################################################################
679 lttng destroy mysession2
685 Session mysession2 destroyed.
689 ####################################################################
690 # Scenario: Test "lttng -vvv destroy <session>"
691 ####################################################################
694 DestroySessionVerbose
696 lttng -vvv destroy mysession2
702 DEBUG2: Config file path found: /home/eedbhu [in get_session_name() at utils.c:98]
703 DEBUG1: Session name found: mysession2 [in get_session_name() at utils.c:99]
704 Session mysession2 destroyed at /home/eedbhu
709 ####################################################################
710 # Scenario: Test "lttng enable-channel ..." with different inputs
711 ####################################################################
716 lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 -C 0 -W 10
722 Kernel channel mychannel0 enabled for session mysession2
723 Kernel channel mychannel1 enabled for session mysession2
727 lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
733 Kernel channel mychannel0 enabled for session mysession2
734 Kernel channel mychannel1 enabled for session mysession2
738 lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 -C 0 -W 20
744 UST channel channel0 enabled for session mysession2
748 lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
754 UST channel channel0 enabled for session mysession2
758 lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid -C 0 -W 20
764 UST channel channel0 enabled for session mysession2
768 lttng enable-channel ustChannel -u -s mysession2 --overwrite --buffers-pid
774 UST channel ustChannel enabled for session mysession2
778 lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid
784 UST channel channel0 enabled for session mysession2
789 lttng enable-channel mychannel0,mychannel1 -k -s mysession2
795 Kernel channel mychannel0 enabled for session mysession2
796 Kernel channel mychannel1 enabled for session mysession2
800 lttng enable-channel ustChannel -u -s mysession2
806 UST channel mychannel0 enabled for session mysession2
810 lttng disable-channel mychannel0,mychannel1 -k -s mysession2
816 Kernel channel mychannel0 disabled for session mysession2
817 Kernel channel mychannel1 disabled for session mysession2
821 lttng disable-channel ustChannel -u -s mysession2
827 UST channel mychannel0 enabled for session mysession2
832 ####################################################################
833 # Scenario: Test "lttng enable-events ..." with different inputs
834 ####################################################################
838 # Tracepoint test cases
841 lttng enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
847 kernel event block_rq_remap created in channel channel0
848 kernel event block_bio_remap created in channel channel0
849 kernel event softirq_entry created in channel channel0
853 lttng enable-event -a -k -s mysession2 -c mychannel --tracepoint
859 All kernel tracepoints are enabled in channel channel0
863 lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
869 UST event ust_tests_hello:tptest_sighandler created in channel mychannel
873 lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter intfield==10
879 UST event ust_tests_hello:tptest_sighandler created in channel mychannel
883 lttng enable-event -a -u -s mysession2 -c mychannel --tracepoint
889 All UST tracepoints are enabled in channel mychannel
895 lttng enable-event -a -k -s mysession2 --syscall
901 All kernel system calls are enabled in channel channel0
905 lttng enable-event -a -k -s mysession2 -c mychannel --syscall
911 All kernel system calls are enabled in channel mychannel
914 # dynamic probe/function probe test cases
917 lttng enable-event myevent0 -k -s mysession2 --function 0xc0101340
923 kernel event myevent0 created in channel mychannel
927 lttng enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
933 kernel event myevent1 created in channel mychannel
936 # log level test cases
939 lttng enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
945 UST event myevent4 created in channel channel0
949 lttng enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
955 UST event myevent5 created in channel mychannel
960 ####################################################################
961 # Scenario: Test "lttng add-context -h" and lttng add-context ..." with different inputs
962 ####################################################################
974 usage: lttng add-context -t TYPE
976 If no channel and no event is given (-c/-e), the context
977 will be added to all events and all channels.
978 Otherwise the context will be added only to the channel (-c)
979 and/or event (-e) indicated.
980 Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
983 -h, --help Show this help
984 --list-options Simple listing of options
985 -s, --session NAME Apply to session name
986 -c, --channel NAME Apply to channel
987 -e, --event NAME Apply to event
988 -k, --kernel Apply to the kernel tracer
989 -u, --userspace Apply to the user-space tracer
990 -t, --type TYPE Context type. You can repeat that option on
991 the command line to specify multiple contexts at once.
992 (--kernel preempts --userspace)
993 TYPE can be one of the strings below:
994 pid, procname, prio, nice, vpid, tid, pthread_id,
995 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
997 This command will add the context information 'prio' and two perf
998 counters (hardware branch misses and cache misses), to all events
999 in the trace data output:
1000 # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
1005 lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1011 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1012 UST context pid added to event sched_kthread_stop_ret channel mychannel
1017 ContextErrorHandling
1020 lttng add-context -h
1026 usage: lttng add-context -t TYPE
1028 If no channel and no event is given (-c/-e), the context
1029 will be added to all events and all channels.
1030 Otherwise the context will be added only to the channel (-c)
1031 and/or event (-e) indicated.
1032 Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
1035 -h, --help Show this help
1036 --list-options Simple listing of options
1037 -s, --session NAME Apply to session name
1038 -c, --channel NAME Apply to channel
1039 -e, --event NAME Apply to event
1040 -k, --kernel Apply to the kernel tracer
1041 -u, --userspace Apply to the user-space tracer
1042 -t, --type TYPE Context type. You can repeat that option on
1043 the command line to specify multiple contexts at once.
1044 (--kernel preempts --userspace)
1045 TYPE can be one of the strings below:
1046 pid, procname, prio, nice, vpid, tid, pthread_id,
1047 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
1049 This command will add the context information 'prio' and two perf
1050 counters (hardware branch misses and cache misses), to all events
1051 in the trace data output:
1052 # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
1057 lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1063 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1064 UST context pid added to event sched_kthread_stop_ret channel mychannel
1072 lttng calibrate -k --function
1078 Kernel calibration done
1082 lttng calibrate -u --function
1088 Kernel calibration done
1093 ####################################################################
1094 # Scenario: Test "lttng create <session> with LTTng 2.1 options
1095 ####################################################################
1097 CreateSessionLttng2.1
1100 lttng create mysession -U net://172.0.0.1
1106 Session mysession created.
1107 Traces will be written in net://172.0.0.1
1111 lttng create mysession -U file:///tmp
1117 Session mysession created.
1118 Traces will be written in file:///tmp
1122 lttng create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
1128 Session mysession created.
1129 Control URL tcp://172.0.0.1 set for session mysession
1130 Data URL tcp://172.0.0.1:5343 set for session mysession
1134 lttng create mysession -U net://172.0.0.1:1234:2345
1140 Session mysession created.
1141 Traces will be written in net://172.0.0.1:1234:2345
1145 lttng destroy mysession
1151 Session mysession destroyed.
1155 lttng -vvv create mysession -U net://172.0.0.1
1161 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
1162 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
1163 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
1164 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
1165 Session mysession created.
1166 Traces will be written in net://172.0.0.1
1167 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
1172 ####################################################################
1173 # Scenario: Test "lttng -vvv create <session> with LTTng 2.1 options"
1174 ####################################################################
1176 CreateSessionLttngVerbose2.1
1178 lttng -vvv create mysession -U net://172.0.0.1
1184 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
1185 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
1186 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
1187 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
1188 Session mysession created.
1189 Traces will be written in net://172.0.0.1
1190 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
1194 lttng -vvv destroy mysession
1200 Session mysession destroyed.
1204 ####################################################################
1205 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
1206 ####################################################################
1208 CreateSessionSnapshot
1210 lttng create mysession --snapshot
1216 Session mysession created.
1217 Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651
1218 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
1220 #------------------------------------------------------------------------------
1222 lttng snapshot list-output -s mysession
1228 Snapshot output list for session mysession
1229 [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651
1231 #------------------------------------------------------------------------------
1239 1) mysession () [inactive snapshot]
1242 #------------------------------------------------------------------------------
1244 lttng snapshot record -s mysession
1250 Snapshot recorded successfully for session mysession
1252 #------------------------------------------------------------------------------
1254 lttng destroy mysession
1260 Session mysession destroyed.
1264 ####################################################################
1265 # Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
1266 ####################################################################
1268 CreateSessionStreamedSnapshot
1270 lttng create mysession --snapshot -U net://172.0.0.1
1276 Session mysession created.
1277 Default snapshot output set to: net://172.0.0.1
1278 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
1280 #------------------------------------------------------------------------------
1282 lttng snapshot list-output -s mysession
1288 Snapshot output list for session mysession
1289 [2] snapshot-2: net4://172.0.0.1:5342/
1291 #------------------------------------------------------------------------------
1299 1) mysession () [inactive snapshot]
1302 #------------------------------------------------------------------------------
1304 lttng snapshot record -s mysession
1310 Snapshot recorded successfully for session mysession
1312 #------------------------------------------------------------------------------
1314 lttng destroy mysession
1320 Session mysession destroyed.
1324 ####################################################################
1325 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
1326 ####################################################################
1328 CreateSessionSnapshotErrors
1330 lttng snapshot list-output -s blabla
1336 <COMMAND_ERROR_OUTPUT>
1337 Error: Session name not found
1338 </COMMAND_ERROR_OUTPUT>
1340 #------------------------------------------------------------------------------
1341 #next is not an error case but good to be tested
1349 1) mysession () [active snapshot]
1352 #------------------------------------------------------------------------------
1354 lttng snapshot record -s blabla
1360 <COMMAND_ERROR_OUTPUT>
1361 Error: Session name not found
1362 </COMMAND_ERROR_OUTPUT>
1364 #------------------------------------------------------------------------------
1366 lttng snapshot record -s mysession
1372 <COMMAND_ERROR_OUTPUT>
1373 Error: Session needs to be started once
1374 </COMMAND_ERROR_OUTPUT>
1379 ####################################################################
1380 # Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
1381 ####################################################################
1385 lttng create mysession --live -U net://127.0.0.1
1391 Session mysession created.
1392 Traces will be written in net://127.0.0.1
1393 Live timer set to 1000000 usec
1395 #------------------------------------------------------------------------------
1403 Available tracing sessions:
1404 1) mysession (net4://127.0.0.1:5342/ [data: 5343]) [inactive]
1406 Use lttng list <session_name> for more details
1408 #------------------------------------------------------------------------------
1410 lttng destroy mysession
1416 Session mysession destroyed.
1420 ####################################################################
1421 # Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
1422 ####################################################################
1424 CreateSessionLiveErrors
1426 lttng create mysession --live --snapshot
1432 <COMMAND_ERROR_OUTPUT>
1433 Error: Snapshot and live modes are mutually exclusive.
1434 Error: Command error
1435 </COMMAND_ERROR_OUTPUT>
1437 #------------------------------------------------------------------------------
1439 lttng create mysession --live -U blah
1445 <COMMAND_ERROR_OUTPUT>
1446 Error: URI parse unknown protocol blah
1447 Error: Unable to parse the URL blah
1448 Error: Invalid parameter
1449 </COMMAND_ERROR_OUTPUT>
1451 #------------------------------------------------------------------------------
1453 lttng create mysession --live -C net://127.0.0.1
1459 <COMMAND_ERROR_OUTPUT>
1460 Error: You need both control and data URL.
1461 Error: Command error
1462 </COMMAND_ERROR_OUTPUT>
1465 ####################################################################
1466 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.5)
1467 ####################################################################
1469 CreateSessionSnapshot2.5
1471 lttng create mysession --snapshot
1477 Session mysession created.
1478 Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651
1479 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
1481 #------------------------------------------------------------------------------
1483 lttng snapshot list-output -s mysession
1489 Snapshot output list for session mysession
1490 [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651 (max-size: 0)
1492 #------------------------------------------------------------------------------
1500 1) mysession () [inactive snapshot]
1503 #------------------------------------------------------------------------------
1505 lttng snapshot record -s mysession
1511 Snapshot recorded successfully for session mysession
1513 #------------------------------------------------------------------------------
1515 lttng destroy mysession
1521 Session mysession destroyed.