[lttng-dev] Function of lttng create --disable-consumer?

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Wed Feb 20 16:15:06 EST 2013


Back on Wed Oct 3 14:27:07 EDT 2012, David Goulet wrote, in response to Bernd Hufmann:

> >   * I'm not sure what is the purpose of the options --no-consumer or
> >     --disable-consumer. Could you please explain the use cases for using
> >     --no-consumer or --disable-consumer? 
>
> This basically disables the consumer for a tracing session. It's not very
> useful for now but for upcoming snapshots and live tracing, it will make
> way more sense! :).

In the create.c command code, the --disable-consumer option is checked in only one place, and serves to call disable_consumer after the -C/-D option pair has called enable_consumer to commit its configuration.  However, experimentation reveals something odd:

$ sudo -H lttng create sessiona

By itself, this does not launch the consumer daemon (I'm keeping an eye on the System Monitor window's list of processes, where lttng-consumerd normally appears).  Once I later do:

$ sudo -H lttng enable-event sched_switch -k

The consumer launches at that point.  There is no option in enable-event to prevent this.  If I instead do:

$ sudo -H lttng create sessiona --disable-consumer
$ sudo -H lttng enable-event sched_switch -k

Precisely the same thing happens.  Likewise for 'lttng create sessiona -U net://131.131.131.131' with or without the --disable-consumer switch.  But if I instead do:

$ sudo -H lttng create sessiona --disable-consumer -C net://131.131.131.131 -D net://131.131.131.131
$ sudo -H lttng enable-event sched_switch -k

(Where the net: target has lttng-relayd running) The consumer does *not* launch.  Not even after I do:

$ sudo -H lttng enable-consumer

Starting the trace does not launch the consumer either and, not surprisingly, the trace does not get written anywhere.  And all this without any error or warning messages. 'lttng list' looks normal, too.

Is this a bug or am I missing something?

Daniel U. Thibault
R & D pour la défense Canada - Valcartier (RDDC Valcartier) / Defence R&D Canada - Valcartier (DRDC Valcartier)
Cyber sécurité pour les missions essentielles (CME) / Mission Critical Cyber Security (MCCS)
Protection des systèmes et contremesures (PSC) / Systems Protection & Countermeasures (SPC)
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/>



More information about the lttng-dev mailing list