[lttng-dev] [LTTNG] Empty traces output file

Shieryn Tjandra shieryntjandra at gmail.com
Fri Feb 9 23:07:47 EST 2018


Good Evening,

Hi There,

I have inquiries regarding LTTNG, I followed the tutorial in this link :

http://lttng.org/docs/v2.10/#doc-tracing-your-own-user-application

However, after executing the c application, when I checked whether the
process was in the userspace event (UST), the process was not there. Next,
I tried to record the  traces, as I thought, my traces output file does not
contain any traces. I also have make sure that liblttng-ust has been
installed. I really appreciate if you can help me to overcome this problem,
if you need additional file, let me know.

I am using centos 7 by the way.

Here is my command line
[root at localhost tracepractice]# gcc -c -I. app_tp.c
[root at localhost tracepractice]# gcc -c app.c -lpthread
[root at localhost tracepractice]# gcc -o try app.o app_tp.o -lpthread
-llttng-ust -ldl
[root at localhost tracepractice]# ./try and beyond
Main thread:     : pid = 17231 lwp = 17231 priority = 0
Thread 4:     : pid = 17231 lwp = 17234 priority = 0
Thread 2:     : pid = 17231 lwp = 17236 priority = 8
Thread 1:     : pid = 17231 lwp = 17237 priority = 12
Thread 1: Hello! I am thread 4 and I more important than 1, 2 and 3.     My
count is now 0
Thread 3:     : pid = 17231 lwp = 17235 priority = 4
Thread 4: Hello! I am thread 1 and I not very important.         My count
is now 1
Thread 2: Hello! I am thread 3 and I more important than 1 and 2.     My
count is now 0
Thread 3: Hello! I am thread 2 and I more important than 1.         My
count is now 1
Thread 2: Hello! I am thread 3 and I more important than 1 and 2.     My
count is now 262144
Thread 3: Hello! I am thread 2 and I more important than 1.         My
count is now 262145
sig_ala [cound down=1]
sig_ala [cound down=0]
[root at localhost tracepractice]# lttng-sessiond --daemonize
[root at localhost tracepractice]# lttng list --userspace
UST events:
-------------
None

[root at localhost tracepractice]# lttng create mytrace
Session mytrace created.
Traces will be written in /root/lttng-traces/mytrace-20180209-013417
[root at localhost tracepractice]# lttng enable-event --userspace
app_tp:first_tracepoint
UST event app_tp:first_tracepoint created in channel channel0
[root at localhost tracepractice]# lttng start
Tracing started for session mytrace
[root at localhost tracepractice]# ./try
Main thread:     : pid = 17301 lwp = 17301 priority = 0
Thread 4:     : pid = 17301 lwp = 17304 priority = 0
Thread 2:     : pid = 17301 lwp = 17306 priority = 8
Thread 1:     : pid = 17301 lwp = 17307 priority = 12
Thread 1: Hello! I am thread 4 and I more important than 1, 2 and 3.     My
count is now 0
Thread 4: Hello! I am thread 1 and I not very important.         My count
is now 1
Thread 3:     : pid = 17301 lwp = 17305 priority = 4
Thread 2: Hello! I am thread 3 and I more important than 1 and 2.     My
count is now 0
Thread 3: Hello! I am thread 2 and I more important than 1.         My
count is now 1
Thread 2: Hello! I am thread 3 and I more important than 1 and 2.     My
count is now 262144
Thread 3: Hello! I am thread 2 and I more important than 1.         My
count is now 262145
sig_ala [cound down=1]
Thread 2: Hello! I am thread 3 and I more important than 1 and 2.     My
count is now 524288
Thread 3: Hello! I am thread 2 and I more important than 1.         My
count is now 524289
sig_ala [cound down=0]
[root at localhost tracepractice]# lttng stop
Waiting for data availability
Tracing stopped for session mytrace
[root at localhost tracepractice]# babeltrace ~/lttng-traces/mytrace*
[root at localhost tracepractice]# ls ~/lttng-traces/mytrace* -l
total 0
drwxrwx---. 3 root root 17 Feb  9 01:35 ust


Thank you.


-- 


Best Regards,

*Shieryn Tjandra*











-- 


Best Regards,

*Shieryn Tjandra*
*+1 613 501 0606*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20180209/682c2067/attachment.html>


More information about the lttng-dev mailing list