STREAMS-UX Programmer's Guide (February 2007)

STREAMS Commands
strace and strerr
Appendix G
291
strace runs until it is terminated by the user.
Example
The following examples displays all trace messages from the driver or module identified by mod 28:
strace 28 all all
Example
The following example displays trace messages of any tracing priority level from the driver or module
identified by mod 28, and its minor devices identified by the sub 2, 3, or 4:
strace 28 2 all 28 3 all 28 4 all
Example
The following example displays the trace messages from the same driver or module and subs. This example
limits the priority levels as follows:to 0 for subs 2 and 3; 1 for sub 4, driver or module 28:
0 for subs 2 and 3
1 for subs 4, driver, or mod 28
strace 28 2 0 28 3 0 28 4 1
NOTE Running strace with several sets of arguments can impair STREAMS performance,
particularly for those modules and drivers that are sending the messages. strace may not be
able to handle a large number of messages. Some of the messages may be lost if drivers and
modules return messages to strace too quickly.
strerr
strerr receives error messages from the STREAMS log driver (strlog(7)). These error messages are added
to the STREAMS error log files (error.mm-dd) in the STREAMS error logger directory (/var/adm/streams
by default). On the first call to strerr, it creates the log file error.mm-dd. This is a daily log file, where mm
indicates the month and dd indicates the day of the logged messages. strerr then appends the error
messages to the log file as they are received from the STREAMS log driver.
The syntax for the strerr command is as follows:
strerr [-a sys_admin_mail_name] [-d logdir]
-a sys_admin_mail_name Specifies tthe user's mail name for sending mail messages. Mail is sent to the
system administrator by default.
-d logdir Specify the directory to contain the error log file. The default directory is
/var/adm/streams.
STREAMS error log messages have the following syntax:
seq time tick pri ind mod sub text
The components are interpreted as follows:
seq trace event sequence number.
time Time in hh:mm:ss when the message was sent
tick Time when the message was sent, expressed in terms of machine ticks since the last boot.