[lttng-dev] Working with lttng enable-channel
David Goulet
dgoulet at efficios.com
Tue Jun 25 10:07:25 EDT 2013
There is indeed something wrong.
Avi Goren:
> Hi,
> I'm using lttng-ust and in the process of the attempt to gain some flush
> frequency control I encountered a problem.
> I'm having difficulties with the use of enable-channel.
> it doesn't seem to apply property changes. here's an example:
> -------------------------------------------------------------------------
> root at ubuntu:~# lttng list
> Currently no available tracing session
> root at ubuntu:~# lttng create ses
> Session ses created.
> Traces will be written in /home/avig/lttng-traces/ses-20130624-163340
> root at ubuntu:~# lttng enable-event -a -u -s ses -c ch
> All UST events are enabled in channel ch
This command creates and enables all event in the channel "ch" with the default
settings for the channel.
> root at ubuntu:~# lttng disable-channel ch -u -s ses
> UST channel ch disabled for session ses
> root at ubuntu:~# lttng enable-channel ch -u --subbuf-size 1024 --num-subbuf 1
> UST channel ch enabled for session ses
This command actually only enable the *already* existing channel. Once a channel
is created, you can't change the attributes, it's immutable.
> root at ubuntu:~# lttng list ses -c ch
> Tracing session ses: [inactive]
> Trace path: /home/avig/lttng-traces/ses-20130624-163340
>
> === Domain: UST global ===
>
> Buffer type: per PID
>
> - ch: [enabled]
>
> Attributes:
> write mode: discard
> subbufers size: 4096 bytes
> number of subbufers: 4
> switch timer interval: 0 usec
> read timer interval: 0 usec
> output: mmap()
>
> Events:
> * (type: tracepoint) [enabled]
>
> root at ubuntu:~# lttng version
> lttng version 2.2.0-rc2 - Cuda
> ...
> -------------------------------------------------------------------------
>
> Am I doing something wrong?
> Is there a way to control flushing policy besides the use of enable-channel?
If you want to control the flushing timing of a channel, use "--switch-timer".
For instance, for a flush buffer at each 200ms:
$ lttng enable-channel ch -u --switch timer 200000
Hope this can help!
David
> Thanks,
> Avi
>
>
> This body part will be downloaded on demand.
More information about the lttng-dev
mailing list