[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 5

strace Command

Purpose

Prints STREAMS trace messages.

Syntax

strace [ mid sid level ] ... 

Description

The strace command without parameters writes all STREAMS event trace messages from all drivers and modules to its standard output. These messages are obtained from the STREAMS log driver. If parameters are provided, they must be in triplets. Each triplet indicates that tracing messages are to be received from the given module or driver, subID (usually indicating minor device), and priority level equal to or less than the given level. The all token may be used for any member to indicate no restriction for that attribute.

Parameters

mid Specifies a STREAMS module ID number.
sid Specifies a subID number.
level Specifies a tracing priority level.

Output Format

The format of each trace message output is:

<seq> <time> <ticks> <level> <flags> <mid> <sid> <text>
<seq > Trace sequence number
<time > Time of message in hh:mm:ss
<ticks > Time of message, in machine ticks, since system was started
<level > Tracing priority level
<flags > Has one of the following values:
E Message is also in the error log
F Indicates a fatal error
N Mail was sent to the system administrator
<mid > Module ID number of source
<sid > SubID number of source
<text > Formatted text of the trace message

On multiprocessor systems, <text > is composed of two parts:

  • the number of the processor where the owner of the message has sent it,
  • the formatted text itself.

Once initiated, the strace command continues to execute until terminated by the user.

Note: Due to performance considerations, only one strace command is permitted to open the STREAMS log driver at a time. The log driver has a list of the triplets specified in the command invocation, and compares each potential trace message against this list to decide if it should be formatted and sent up to the strace process. Hence, long lists of triplets have a greater impact on overall STREAMS performance. Running the strace command has the most impact on the timing of the modules and drivers generating the trace messages that are sent to the strace process. If trace messages are generated faster than the strace process can handle them, some of the messages will be lost. This last case can be determined by examining the sequence numbers on the trace messages output.

Examples

  1. To output all trace messages from the module or driver whose module ID is 41 , enter:
    strace 41 all all
  2. To output those trace messages from driver or module ID 41 with sub-IDs 0 , 1 , or 2 :
    strace 41 0 1 41 1 1 41 2 0
    Messages from sub-IDs 0 and 1 must have a tracing level less than or equal to 1. Those from sub-ID 2 must have a tracing level of 0.

Related Information

List of Streams Commands, STREAMS Overview, Understanding the log Device Driver in AIX Version 4.3 Communications Programming Concepts.


[ Previous | Next | Contents | Glossary | Home | Search ]