Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

strace(8)  —  Maintenance

OSF

NAME

strace − Displays STREAMS event trace messages

SYNOPSIS

strace [mod_ID sub_ID priority_level]

DESCRIPTION

Without arguments, the strace command gets STREAMS event trace messages from all drivers and modules via the STREAMS log driver (log).  It then writes these messages to standard output. 

You can limit the messages strace receives by specifying arguments to the command. 

The strace command runs until terminated by the user. 

Arguments

The following three arguments must be specified together:

mod_IDSpecifies the STREAMS module identification number. 

sub_IDSpecifies a sub-identification number (often corresponding to a minor device). 

priority_levelSpecifies a tracing priority level.  The strace command gets messages of a level equal to or less than priority_level.  (The value of priority_level must be a nonnegative integer.) 

This set of three arguments specifies that strace receive trace messages from the specified module/driver and sub-ID (minor device), having a tracing priority level less than or equal to priority_level. 

You can specify all as the value for any of these arguments.  The value all indicates that there are no restrictions for that argument. 

Note also that you can specify multiple sets of these three arguments on the same command line.  However, specifying several sets of arguments may slow STREAMS performance.  (See the section "Communicating with the STREAMS Log Driver".) 

Trace Message Format

Each STREAMS event trace message is of the following format:


sequence_num  std_time  ticks_time  priority_level  notify_code  mod_ID  sub_ID  mesg_text

where:

sequence_num
Event trace sequence number.

std_timeThe time the message was sent, in the format hh:mm:ss. 

ticks_timeThe time the message was sent, measured in machine ticks since the last boot. 

priority_levelTracing priority level. 

notify_codeCan be any of the following indicators:

EIndicates that the message has also been saved in the error log. 

FIndicates that the message signaled a fatal error. 

mod_IDModule identification number of the trace message source. 

sub_IDSub-identification number of the trace message source. 

mesg_textTrace message text. 

Communicating with the STREAMS Log Driver

Only one strace process can access the STREAMS log driver at a time.  This restriction is intended to maximize performance.  When you issue the strace command, the log driver compares the sets of arguments from the command line with actual trace messages, returning the messages that satisfy the criteria to strace. 

Running strace with several sets of arguments can negatively affect STREAMS performance, particularly for those modules/drivers sending the messages returned to the strace command. 

Also be aware that the strace command may not be able to handle a large number of messages.  If the STREAMS log driver returns messages to strace too quickly, some of the messages may be lost. 

EXAMPLES

     1.To display all trace messages received from the driver/module identified by mod_ID 28, enter:

strace 28 all all

     2.To display those trace messages from the driver/module identified by mod_ID 28 and the minor devices identified by the sub_IDs 2, 3, and 4, enter:

strace  28 2 all  28 3 all  28 4 all

Notice that the messages displayed can be of any tracing priority level (indicated by the all value of the priority_level argument). 

     3.To display those trace messages from the same driver/module and sub-ID, but limited to certain priority levels, you could enter:

strace  28 2 0  28 3 0  28 4 1

This command specifies that messages from driver/module 28 and sub-IDs 2 and 3 must have a tracing priority of 0 and those from sub-ID 4 must have a tracing priority equal to or less than 1. 

FILES

/usr/sbin/strace
Specifies the command path.

RELATED INFORMATION

The log STREAMS driver. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026