DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

module_stat(D4str)


module_stat -- STREAMS driver and module statistics structure

Synopsis

   #include <sys/types.h>
   #include <sys/conf.h>
   #include <sys/stream.h>
   #include <sys/strstat.h>
   #include <sys/ddi.h>

Description

The module_stat structure can be used to store statistics for each entry point call defined in a STREAMS queue's qinit(D4str) structure, as well as any private statistics desired.

Usage

The module_stat structure can be declared on a per-module basis whenever it is necessary to keep statistics.

It is not required to keep statistics for a module or driver. If not, the qinit.qi_mstat member for that module or driver should be set to NULL.

Structure definitions

The module_stat structure contains the following members:
   struct module_stat {
           long ms_pcnt;           /* count of calls to put proc */
           long ms_scnt;           /* count of calls to service proc */
           long ms_ocnt;           /* count of calls to open proc */
           long ms_ccnt;           /* count of calls to close proc */
           long ms_acnt;           /* count of calls to admin proc */
           char *ms_xptr;          /* pointer to private statistics */
           short ms_xsize;         /* length of private statistics buffer */
   };

Structure members


ms_pcnt
records calls to the put(D2str) routine for the queue.

ms_scnt
records calls to the srv(D2str) routine for the queue.

ms_ocnt
records calls to the open(D2) routine for a read-side queue. The corresponding quinit write-side member is set to NULL.

ms_ccnt
records calls to the close(D2str) routine for a read-side queue. The corresponding quinit write-side member is set to NULL.

ms_acnt
intended for future use.

ms_xptr
contains the address of a private statistics buffer.

ms_xsize
sets the length of the private statistics buffer. Set this member to NULL if the driver or module does not keep private statistics.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 8, 8mp
oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp

References

qinit(D4str), queue(D4str)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005