TraceSwiftlet

 
 

Online Documentation    Property Configuration    TraceSwiftlet

 
 

[Swiftlet Name]     [Trace Concept]     [Space Names]     [Enabling/Disabling Traceing]     [Predicate Names]     [Value]     [Filename]    
[Document Index]

 
     
 
  Swiftlet Name

The Swiftlet name of the TraceSwiftlet is sys$trace.

Trace Concept

A powerful trace facility is needed to develop a complex system like SwiftMQ. It is not very helpful to have a simple debug property that one can switch on and then receive a megabyte debug output where the entries need to be looked for. For this reason, the trace facility design has been one of the first things we did in the development history of SwiftMQ.

The concept is that every SwiftMQ component gets a space for tracing from the TraceSwiftlet, namely a trace space. This space can be enabled or disabled. Enabled, the component traces his information to the space, including who is tracing, i.e. the Swiftlet name. Within the TraceSwiftlet's configuration the distribution of the trace streams takes place. Here, it is possible to specify which streams go to which files or to the console. So, one is able to filter out these things very easily.

There are the following predefined trace spaces:

SpaceDescription
kernelThe space where all kernel Swiftlets put there trace output.
queueThe space where all queues put there trace output.
protocolThe space where all protocol handlers put there trace output. At the moment this is only the handler for SMQP. Further releases might be able to handle FTP, SMTP etc.
swiftletThe space where all custom Swiftlets should put there trace output.
Every space can be configured with SQL-Like predicates to filter parts of the streams and put them to specific locations, namely a tracefile or the console. With this concept it is easy to check the activity of a specific queue by defining a SQL-Like predicate for the queue name and a tracefile for this queue at the queue space, or to check how many threads are running in which pools by defining a predicate which filters the Swiftlet name sys$threadpool on space kernel.

Space Names

Optional property that specifies a list of space names. For every defined space name, sub-properties can be defined as described in the following sections.

The list should contain one or all of the predefined spaces kernel, queue, protocol, and swiftlet, because no other spaces are used by any component.

Predefined spaces that are not listed are automatically disabled.

Property definition:


 swiftlet.sys$trace.spaces.names=<name 1>,<name 2>,..,<name n>

Example:


 swiftlet.sys$trace.spaces.names=kernel,queue,protocol,swiftlet

Enabling/Disabling Traceing

Optional property that specifies if the space is enabled or disabled. If enabled, the components using this space will trace, otherwise they won’t. Enabling tracing will slow down the performance.

The default value for this property is false.

Property definition:


 swiftlet.sys$trace.spaces.<name>.enabled=<boolean>

Example:


 swiftlet.sys$trace.spaces.kernel.enabled=true

Predicate Names

Specifies a list of predicates per space that are checked against the trace stream, namely the trace source value, in the order as they are specified.

Property definition:


 swiftlet.sys$trace.spaces.<name>.predicates.names=<name 1>,<name 2>,..,<name n>

Example:


 swiftlet.sys$trace.spaces.kernel.predicates.names=1,2,3,4,5,6,7,8

Value

Specifies the SQL-Like predicate value that is checked against the trace source of the trace stream.

The content of the trace source is different. In space kernel this starts with the Swiftlet name, so the predicate should contain the Swiftlet name followed by an % like sys$topic%, for the queue space this is the queue name, the protocol space contains the protocol name, and the swiftlet space should contain the Swiftlet name.

To collect all the traces of the whole space, only one predicate should be defined with a value of %.

Property definition:


 swiftlet.sys$trace.spaces.<name>.predicates.<predicate name>.value=<predicate>

Example:


 swiftlet.sys$trace.spaces.kernel.predicates.1.value=sys$threadpool%

Filename

Specifies the name of the tracefile concerning traces that match this predicate. To trace to System.out, the keyword "console" could be used instead of a filename.

Property definition:


 swiftlet.sys$trace.spaces.<name>.predicates.<predicate name>.filename=<filename>

Example:


 swiftlet.sys$trace.spaces.kernel.predicates.1.filename=../trace/threadpool.trace

 
 
     
 

[Swiftlet Name]     [Trace Concept]     [Space Names]     [Enabling/Disabling Traceing]     [Predicate Names]     [Value]     [Filename]    
[Document Index]

 
 

Online Documentation    Property Configuration    TraceSwiftlet

 
 

 Copyright © 2000, IIT GmbH, Bremen/Germany. All rights reserved.
SwiftMQ and Swiftlet are registered trademarks of IIT GmbH.
All other product names mentioned herein are trademarks of their respective owners.