STREAMS Programming Guide

Administration Tool Description

STREAMS error and trace loggers are provided for debugging and for administering STREAMS modules and drivers. This facility consists of log(7D), strace(1M), strclean(1M), strerr(1M), and the strlog(9F) function.

strace Command

strace(1M) is a utility that displays the messages in a specified STREAMS log. The log to display is identified by STREAMS module ID number, a sub-ID number, and the priority level.

strlog Command

strlog(9F) sends formatted text to log(7D) driver. Required definitions are contained in <sys/strlog.h> and <sys/log.h>. The call specifies the STREAMS module ID number, a sub-ID number, and the priority level. A flag parameter can specify any combination of:

SL_ERROR

The message is for the error logger

SL_TRACE

The message is for the tracer

SL_FATAL

Advisory notification of a fatal error

SL_NOTIFY

Modifies the SL_ERROR flag to request that a copy of the message be mailed to the system administrator

SL_CONSOLE

Log the message to the console

SL_WARN

Warning message

SL_NOTE

Notice the message

The flags are followed by a printf(3C)-style format string, but %s, %e, %E, %g, and %G conversion specifications are not recognized. Up to NLOGARGS of numeric or character arguments can be specified.

strqget Command

strqget(9F) gets information about a queue or band of a queue. The information is returned in a long. The stream must be frozen by the caller when calling strqget.

strqset Command

strqset(9F) changes information about a queue or band of the queue. The updated information is provided in an int. If the field is read-only, EPERM is returned and the field is left unchanged. See <sys/stream.h> for valid values. The stream must be frozen by the caller when calling strqset(9F).

strerr Daemon

strerr(1M) is the STREAMS error logger daemon.