Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   babeltrace2-run    ( 1 )

создайте график обработки трассировки Babeltrace 2 и запустите его (Create a Babeltrace 2 trace processing graph and run it)

Имя (Name)

babeltrace2-run - Create a Babeltrace 2 trace processing graph and run it


Синопсис (Synopsis)

babeltrace2 [GENERAL OPTIONS] run [--retry-duration=TIME-US] --connect=CONN-RULE... COMPONENTS


Описание (Description)

The run command creates a Babeltrace 2 trace processing graph and runs it.

See babeltrace2-intro(7) to learn more about the Babeltrace 2 project and its core concepts.

The run command dynamically loads Babeltrace 2 plugins which supply component classes. With the run command, you specify which component classes to instantiate as components and how to connect them.

The steps to write a babeltrace2 run command line are:

1. Specify which component classes to instantiate as components with many --component options and how to configure them.

This is the COMPONENTS part of the synopsis. See 'Create components' to learn more.

2. Specify how to connect components together with one or more --connect options.

See 'Connect components' to learn more.

Note The babeltrace2-convert(1) command is a specialization of the run command for the very common case of converting one or more traces: it generates a run command line and executes it. You can use its --run-args or --run-args-0 option to make it print the equivalent run command line instead.

Create components To create a component, use the --component option. This option specifies:

• The name of the component, unique amongst all the component names of the trace processing graph.

• The type of the component class to instantiate: source, filter, or sink.

• The name of the plugin in which to find the component class to instantiate.

• The name of the component class to instantiate.

Use the --component option multiple times to create multiple components. You can instantiate the same component class multiple times as different components.

At any point in the command line, the --base-params sets the current base initialization parameters and the --reset-base- params resets them. When you specify a --component option, its initial initialization parameters are a copy of the current base initialization parameters.

Immediately following a --component option on the command line, the created component is known as the current component (until the next --component option).

The --params=PARAMS option adds parameters to the current component's initialization parameters. If PARAMS contains a key which exists in the current component's initialization parameters, this parameter is replaced.

Connect components The components which you create from component classes with the --component option (see 'Create components') add input and output ports depending on their type. An output port is from where messages, like trace events, are sent. An input port is where messages are received. For a given component, each port has a unique name.

The purpose of the run command is to create a trace processing graph, that is, to know which component ports to connect together. The command achieves this with the help of the connection rules that you provide with one or more --connect=CONN-RULE options.

The format of CONN-RULE is:

UP-COMP-PAT[.UP-PORT-PAT]:DOWN-COMP-PAT[.DOWN-PORT-PAT]

UP-COMP-PAT Upstream component name pattern.

UP-PORT-PAT Upstream (output) port name pattern.

DOWN-COMP-PAT Downstream component name pattern.

DOWN-PORT-PAT Downstream (input) port name pattern.

When a source or filter component adds a new output port within the processing graph, the run command does the following to find an input port to connect it to:

For each connection rule (--connect options, in order): If the output port's component's name matches UP-COMP-PAT and the output port's name matches UP-PORT-PAT: For each component COMP in the trace processing graph: If the name of COMP matches DOWN-COMP-PAT: Select the first input port of COMP of which the name matches DOWN-PORT-PAT, or fail with no match.

No possible connection: fail with no match.

UP-COMP-PAT, UP-PORT-PAT, DOWN-COMP-PAT, and DOWN-PORT-PAT are globbing patterns where only the wildcard character, *, is special: it matches zero or more characters. You must escape the *, ?, [, ., :, and \ characters with \.

When you do not specify UP-PORT-PAT or DOWN-PORT-PAT, they are equivalent to *.

You can leverage this connection mechanism to specify fallbacks with a careful use of wildcards, as the order of the --connect options on the command line is significant. For example:

--connect='A.out*:B.in*' --connect=A:B --connect='*:C'

With those connection rules, the run command connects:

• Any output port of which the name starts with out of component A to the first input port of which the name starts with in of component B.

• Any other output port of component A to the first available input port of component B.

• Any other output port (of any component except A) to the first available input port of component C.

The run command fails when it cannot find an input port to which to connect a given output port using the provided connection rules.

See 'EXAMPLES' for more examples.