'\" te .\" Copyright 1989 AT&T Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH STRACE 8 "Oct 4, 1994" .SH NAME strace \- print STREAMS trace messages .SH SYNOPSIS .LP .nf \fBstrace\fR [\fImid\fR \fIsid\fR \fIlevel\fR]... .fi .SH DESCRIPTION .sp .LP \fBstrace\fR without arguments writes all STREAMS event trace messages from all drivers and modules to its standard output. These messages are obtained from the STREAMS log driver (see \fBlog\fR(4D)). If arguments are provided, they must be in triplets of the form \fImid, sid, level\fR, where \fImid\fR is a STREAMS module \fBID\fR number, \fIsid\fR is a sub-ID number, and \fIlevel\fR is a tracing priority level. Each triplet indicates that tracing messages are to be received from the given module/driver, sub-ID (usually indicating minor device), and priority level equal to, or less than the given level. The token \fBall\fR may be used for any member to indicate no restriction for that attribute. .sp .LP The format of each trace message output is: .sp .LP <\fIseq\fR> <\fBtime\fR> <\fIticks\fR> <\fIlevel\fR> <\fIflags\fR> <\fImid\fR> <\fIsid\fR> <\fItext\fR> .sp .ne 2 .na \fB<\fIseq\fR>\fR .ad .RS 11n trace sequence number .RE .sp .ne 2 .na \fB<\fBtime\fR>\fR .ad .RS 11n time of message in \fIhh:mm:ss\fR .RE .sp .ne 2 .na \fB<\fIticks\fR>\fR .ad .RS 11n time of message in machine ticks since boot .RE .sp .ne 2 .na \fB<\fIlevel\fR>\fR .ad .RS 11n tracing priority level .RE .sp .ne 2 .na \fB<\fIflags\fR>\fR .ad .RS 11n E : message is also in the error log F : indicates a fatal error N : mail was sent to the system administrator (hardcoded as root) .RE .sp .ne 2 .na \fB<\fImid\fR>\fR .ad .RS 11n module \fBID\fR number of source .RE .sp .ne 2 .na \fB<\fIsid\fR>\fR .ad .RS 11n sub-ID number of source .RE .sp .ne 2 .na \fB<\fItext\fR>\fR .ad .RS 11n formatted text of the trace message .RE .sp .LP Once initiated, \fBstrace\fR will continue to execute until terminated by the user. .SH EXAMPLES .LP \fBExample 1 \fRA sample output of the \fBstrace\fR command: .sp .LP The following example outputs all trace messages from the module or driver whose module \fBID\fR is \fB41\fR: .sp .in +2 .nf \fBstrace 41 all all\fR .fi .in -2 .sp .sp .LP The following example outputs those trace messages from driver or module \fBID\fR \fB41\fR with sub-IDs \fB0\fR, \fB1\fR, or \fB2\fR: .sp .in +2 .nf \fBstrace 41 0 1 41 1 1 41 2 0\fR .fi .in -2 .sp .sp .LP Messages from sub-IDs \fB0\fR and \fB1\fR must have a tracing level less than or equal to \fB1\fR. Those from sub-ID \fB2\fR must have a tracing level of \fB0\fR. .SH SEE ALSO .sp .LP .BR log (4D), .BR attributes (7) .sp .LP \fI\fR .SH NOTES .RS +4 .TP .ie t \(bu .el o There is no restriction to the number of \fBstrace\fR processes opening the \fBSTREAMS\fR log driver at a time. .RE .RS +4 .TP .ie t \(bu .el o The log-driver records the 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 \fBstrace\fR process. Hence, long lists of triplets will have a greater impact on overall STREAMS performance. Running \fBstrace\fR will have the most impact on the timing of the modules and drivers generating the trace messages that are sent to the \fBstrace\fR process. If trace messages are generated faster than the \fBstrace\fR 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. .RE