Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

strlog(9f) [sunos man page]

strlog(9F)						   Kernel Functions for Drivers 						strlog(9F)

NAME
strlog - submit messages to the log driver SYNOPSIS
#include <sys/stream.h> #include <sys/strlog.h> #include <sys/log.h> int strlog(short mid, short sid, char level, unsigned short flags, char *fmt, ...);); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
mid Identification number of the module or driver submitting the message (in the case of a module, its mi_idnum value from mod- ule_info(9S)). sid Identification number for a particular minor device. level Tracing level for selective screening of low priority messages. Larger values imply less important information. flags Valid flag values are: SL_ERROR Message is for error logger. SL_TRACE Message is for trace. SL_NOTIFY Mail copy of message to system administrator. SL_CONSOLE Log message to console. SL_FATAL Error is fatal. SL_WARN Error is a warning. SL_NOTE Error is a notice. fmt printf(3C) style format string. %e, %g, and %G formats are not allowed but %s is supported. DESCRIPTION
strlog() expands the printf(3C) style format string passed to it, that is, the conversion specifiers are replaced by the actual argument values in the format string. The 32-bit representations of the arguments (up to NLORGARGS) follow the string starting at the next 32-bit boundary following the string. Note that the 64-bit argument will be truncated to 32-bits here but will be fully represented in the string. The messages can be retrieved with the getmsg(2) system call. The flags argument specifies the type of the message and where it is to be sent. strace(1M) receives messages from the log driver and sends them to the standard output. strerr(1M) receives error messages from the log driver and appends them to a file called /var/adm/streams/error.mm-dd, where mm-dd identifies the date of the error message. RETURN VALUES
strlog() returns 0 if it fails to submit the message to the log(7D) driver and 1 otherwise. CONTEXT
strlog() can be called from user or interrupt context. FILES
/var/adm/streams/error.mm-dd Error messages dated mm-dd appended by strerr(1M) from the log driver SEE ALSO
strace(1M), strerr(1M), getmsg(2), log(7D), module_info(9S) Writing Device Drivers STREAMS Programming Guide SunOS 5.10 11 Apr 1991 strlog(9F)

Check Out this Related Man Page

strerr(1M)																strerr(1M)

NAME
strerr - receive error messages from the STREAMS log driver SYNOPSIS
sys_admin_mail_name] logdir] DESCRIPTION
receives error messages from the STREAMS log driver (strlog(7)) for addition to the STREAMS error log files mm-dd) in the STREAMS error logger directory by default). When first called, creates the log file This is a daily log file, where mm indicates the month and dd indi- cates the day of the logged messages. then appends error messages to the log file as they are received from the STREAMS log driver. STREAMS error log messages have the following format: seq time tick pri ind mod sub text Components are interpreted as follows: seq Error event sequence number. time Time the message was sent expressed in hh:mm:ss. tick Time the message was sent expressed in machine ticks since the last boot. pri Error priority level as defined by the STREAMS driver or module that originates the messages. ind Can be any combination of the following three message indicators: The message has also been saved in the trace log. The message signaled a fatal error. The message has also been mailed to the system administrator. mod Module identification number of the error message source. sub Subidentification number of the error message source. text Error message text. runs continuously until terminated by the user. Options recognizes the following options and command-line arguments: Specify the user's mail name for sending mail messages. Mail is sent to the system administrator by default. Specify the directory to contain the error log file. Default is WARNINGS
Only one process can open the STREAMS log driver at a time. This restriction is intended to maximize performance. The STREAMS error logging mechanism works best when it is not overused. can degrade STREAMS performance by affecting the response, throughput, and other behaviors of the drivers and modules that invoke it. also fails to capture messages if drivers and modules generate messages at a higher rate than its optimum read rate. If there are missing sequence numbers among the messages in a log file, messages have been lost. FILES
NLS catalog for error log file or files on which operates SEE ALSO
strace(1M), strlog(7). strerr(1M)
Man Page