Adaptec AHA-1520A Manual de Serviço Página 199

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 434
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 198
SunOS 5.5 Devices log(7D)
NAME log interface to STREAMS error logging and event tracing
SYNOPSIS #include <sys/strlog.h>
#include <sys/log.h>
DESCRIPTION log is a STREAMS software device driver that provides an interface for console logging
and for the STREAMS error logging and event tracing processes (see strerr(1M), and
strace(1M)). log presents two separate interfaces: a function call interface in the kernel
through whichSTREAMS drivers and modules submit log messages; and a set of ioctl(2)
requests and STREAMS messages for interaction with a user level console logger, an error
logger, a trace logger, or processes that need to submit their own log messages.
Kernel Interface log messages are generated within the kernel by calls to the function strlog():
strlog(short mid, short sid, char level, ushort flags, char fmt, unsigned arg1 ...);
Required definitions are contained in <sys/strlog.h>, <sys/log.h>, and <sys/syslog.h>.
mid is theSTREAMS module id number for the module or driver submitting the log mes-
sage. sid is an internal sub-id number usuallyused to identify a particular minor device
of a driver. level is a tracing level that allows for selective screening out of low priority
messages from the tracer. flags are any combination of SL_ERROR (the message is for the
error logger), SL_TRACE (the message is for the tracer), SL_CONSOLE (the message is for
the console logger),SL_FATAL (advisory notification of a fatal error), and SL_NOTIFY
(request that a copy of the message be mailed to the system administrator). fmt is a
printf(3S) style format string, except that %s, %e, %E, %g, and %G conversion
specifications are not handled. Up to NLOGARGS (in this release, three) numeric or char-
acter arguments can be provided.
User Interface log is opened through the /dev/log instance of the clone driver. Each open of /dev/log
obtains a separate stream to log. In order to receive log messages, a process must first
notify log whether it is an error logger, trace logger, or console logger using aSTREAMS
I_STR
ioctl call (see below). For the console logger, theI_STR ioctl has an ic_cmd field of
I_CONSLOG, with no accompanying data. For the error logger, the I_STR ioctl has an
ic_cmd field of I_ERRLOG, with no accompanying data. For the trace logger, the ioctl has
an ic_cmd field of I_TRCLOG, and must be accompanied by a data buffer containing an
array of one or more struct trace_ids elements.
struct trace_ids {
short ti_mid;
short ti_sid;
char ti_level;
};
modified 23 Feb 1994 7D-195
Vista de página 198
1 2 ... 194 195 196 197 198 199 200 201 202 203 204 ... 433 434

Comentários a estes Manuais

Sem comentários