[lttng-dev] lttng command line user-friendliness

Woegerer, Paul Paul_Woegerer at mentor.com
Tue Sep 11 03:22:04 EDT 2012

On 09/10/2012 05:39 PM, Woegerer, Paul wrote:
> On 09/10/2012 05:00 PM, David Goulet wrote:
>> With more options here to set either a custom destination or live
>> trace. What's the default? (no opts given). I would personally go for
>> a default one being to record in the session default trace files and
>> add a "-l" for the live.
>>     -o, --output=DST
>>     -l, --live
>> Add a domain option where nothing enables kernel AND ust or else the
>> command can take either -u or -k.
>> Please, contribute to this, no bad ideas, only bad answers! :)

While sleeping over it two more things came to my mind:

*) The exit status of the <command> that gets trace-executed with "lttng 
trace <command> [<options>]" would need to be forwarded to the exit 
status of the wrapping lttng. This would allow users to use "lttng 
trace" as a drop-in replacement in contexts where the return value of 
the invoked <command> cannot be ignored.

*) There should be something like "-q [<logfile>], --quiet [<logfile>]" 
where the output of the traced <command> does not get mixed with lttng 
info/debug/error output. If the optional <logfile> is given all lttng 
relevant communication should go into the <logfile>.

Example without --quiet:

   Session met-2012-09-11_09-08-30 created.
   Traces will be written in 
   UST channel met_tools enabled for session met-2012-09-11_09-08-30
   UST event met_func:* created in channel met_tools
   UST event met_call:* created in channel met_tools
   Error: Events: Tracing the kernel requires a root lttng-sessiond 
daemon and "tracing" group user membership (channel channel0, session 
   Tracing started for session met-2012-09-11_09-08-30
   MultiThread done...
   delta 131673329
   Tracing stopped for session met-2012-09-11_09-08-30
   Session met-2012-09-11_09-08-30 destroyed

Example with --quiet

   MultiThread done...
   delta 131673329


Paul Woegerer | SW Development Engineer

Mentor Embedded(tm) | Prinz Eugen Straße 72/2/4, Vienna, 1040 Austria
Nucleus® | Linux® | Android(tm) | Services | UI | Multi-OS

Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.

More information about the lttng-dev mailing list