Feature #632

Several commands could benefit from an "all" option

Added by Daniel U. Thibault over 7 years ago. Updated over 5 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
(Total: 0.00 h)


Several commands (destroy, list, snapshot, start, stop, view) could use an -A, --all-sessions option. The option would obviate the need for a session_name argument or -s, --session option (and ignore the default supplied by .lttngrc) and apply to all sessions known by the session daemon.

This could be used, for example, when several sessions are created and configured, and the user wishes to start/stop them all at once.

The name -A, --all-sessions preserves the possibility of extending the option to commands that already have an -a, --all or -a, --all-events option, such as enable-event and disable-event. This would be useful if an event has been defined in several sessions which are already being started/stopped as a group using -A, --all-sessions.

The -A, --all-sessions option could even be eventually extended to add-context, enable-channel, and disable-channel.

To give an advanced example, enable-event -A would enable the event(s) in all sessions where it exists (if started) or can be created (if not started yet); each session where the command causes an error would have the error reported but processing would continue to the next session. The output would be something like:

$ lttng start -A
Session sessionnameone:
Tracing started for session sessionnameone
Session sessionnametwo:
Warning: Tracing already started for session sessionnametwo
Session sessionnamethree:
Tracing started for session sessionnamethree

Besides the usual "unrecognized command or option" errors, return codes would need to be created for the overall outcomes: all session commands succeeded (CMD_SUCCESS), some or all session commands resulted in a warning (CMD_WARNING), etc. This would reflect an ordering of the CMD_* constants in command.h (maybe CMD_SUCCESS < CMD_UNDEFINED < CMD_UNSUPPORTED < CMD_WARNING < CMD_ERROR < CMD_FATAL).


Feature #808: Add --all to start command.NewJonathan Rajotte Julien06/19/2014


Updated by David Goulet about 7 years ago

  • Status changed from New to Confirmed
  • Target version deleted (2.4)

Updated by Jérémie Galarneau over 5 years ago

  • Target version set to Wishlist

Also available in: Atom PDF