[lttng-dev] No trace files are generated for UST

Manikandan Govindaswamy magov at vestas.com
Mon Dec 9 01:02:50 EST 2013


Hi !,

Thanks for your mail.

I'm also able to run the easy-ust and generate the traces successfully if I create and run from an user not as root user.

But  the kernel traces are generated fine for even root user but for ust it runs fine only with non-root user in my case.

And the behavior is vice versa if I try the kernel tracer from user

# lttng list -k
Error: Unable to list kernel events: Tracing the kernel requires a root lttng-sessiond daemon, as well as "tracing" group membership or root user ID for the lttng client.
Error: Command error

Will it be possible to run both kernel and ust to run and create the traces from root user itself? And if you could explain why ust expects the user?

Regards,
GMK

-----Original Message-----
From: jeremie.galarneau at gmail.com [mailto:jeremie.galarneau at gmail.com] On Behalf Of Jérémie Galarneau
Sent: Friday, December 06, 2013 11:23 PM
To: Manikandan Govindaswamy
Cc: Thibault, Daniel; lttng-dev at lists.lttng.org
Subject: Re: [lttng-dev] No trace files are generated for UST

Could you launch the session daemon in verbose mode and post the logs?

lttng-sessiond -vvv --verbose-consumer

On Fri, Dec 6, 2013 at 10:51 AM, Manikandan Govindaswamy
<magov at vestas.com> wrote:
> Yes, with that LD_PRELOAD sample able to run.
>
> root@/tmp/lttng-build-root/bin # ./lttng create app
> Session app created.
> Traces will be written in /root/lttng-traces/app-20131206-174935
> root@/tmp/lttng-build-root/bin # dmesg
> root@/tmp/lttng-build-root/bin # ./lttng enable-event -u -a
> All UST events are enabled in channel channel0
> root@/tmp/lttng-build-root/bin # ./lttng start
> Tracing started for session app
> root@/tmp/lttng-build-root/bin # cd ..
> root@/tmp/lttng-build-root # cd ..
> root@/tmp # LD_PRELOAD=/tmp/lttng-build-root/lib/liblttng-ust.so.0 ./sample
> root@/tmp #
> root@/tmp #
> root@/tmp # cd lttng-build-root/
> root@/tmp/lttng-build-root # cd bin/
> root@/tmp/lttng-build-root/bin # ./lttng stop
> Waiting for data availability
> Tracing stopped for session app
> root@/tmp/lttng-build-root/bin # dmesg
> root@/tmp/lttng-build-root/bin # ./lttng destroy
> Session app destroyed
> root@/tmp/lttng-build-root/bin # cd /
> root@/ # cd root/
> root@~ # ls
> lttng-traces
> root@~ # cd lttng-traces/
> root@~/lttng-traces # ls
> root@~/lttng-traces #< no traces are generated>
>
> in ps -ef
>
> 28664 root       0:00 ./lttng-sessiond -vvv --consumerd64-path=/tmp/lttng-build-root/lib/lttng/libexec/lttng-consumerd
> 29027 root       0:00 lttng-consumerd --quiet -u --consumerd-cmd-sock /var/run/lttng/ustconsumerd64/command --consumerd-err-sock /var/run/lttng/ustconsumerd64/error
>
> Regards,
> GMK.
>
>
>
> -----Original Message-----
> From: Thibault, Daniel [mailto:Daniel.Thibault at drdc-rddc.gc.ca]
> Sent: Friday, December 06, 2013 9:14 PM
> To: Manikandan Govindaswamy; Jérémie Galarneau
> Cc: lttng-dev at lists.lttng.org
> Subject: RE: [lttng-dev] No trace files are generated for UST
>
>> As I'm using the custom image on x86 machine, i've kept the lib in /tmp/lttng-build-root/lib folder and this sample able to see the library as well.
>>
>> And the same way I able to create the trace files for kernel but not for ust. There were no dmesg as well.
>>
>> [...]
>> root@/tmp # ldd sample
>>         linux-vdso.so.1 (0x00007fff2a135000)
>>         libdl.so.2 => /lib64/libdl.so.2 (0x00007fe2cccb5000)
>>         liblttng-ust.so.0 => /tmp/lttng-build-root/lib/liblttng-ust.so.0 (0x00007fe2cca51000)
>>         [...]
>
>    Try running sample using:
>
> LD_PRELOAD=/tmp/lttng-build-root/lib/liblttng-ust.so.0 ./sample
>
>    If the LD_PRELOAD succeeds, we will know at least that liblttng-ust is reachable by sample.
>
>    The modules have nothing to do with UST: kernel and user-space tracing are essentially independent features.
>
> Daniel U. Thibault
> Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
> Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
> R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
> 2459 route de la Bravoure
> Québec QC  G3J 1X5
> CANADA
> Vox : (418) 844-4000 x4245
> Fax : (418) 844-4538
> NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
> Gouvernement du Canada | Government of Canada <http://www.valcartier.drdc-rddc.gc.ca/>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list