Project

General

Profile

Actions

Feature #632

open

Several commands could benefit from an "all" option

Added by Daniel U. Thibault about 11 years ago. Updated about 3 years ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Target version:
Start date:
06/19/2014
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)

Description

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).


Subtasks 1 (0 open1 closed)

Feature #808: Add --all to start command.Won't fixJonathan Rajotte Julien06/19/2014

Actions
Actions #1

Updated by David Goulet almost 11 years ago

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

Updated by Jérémie Galarneau about 9 years ago

  • Target version set to Wishlist
Actions

Also available in: Atom PDF