home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / strstat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  1.5 KB  |  51 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8.  
  9. #ident    "@(#)head.sys:strstat.h    1.3"
  10.  
  11. /*
  12.  * Streams Statistics header file.  This file
  13.  * defines the counters which are maintained for statistics gathering
  14.  * under Streams. 
  15.  */
  16.  
  17. typedef struct {
  18.     int use;    /* current item usage count */
  19.     int total;    /* total item usage count */
  20.     int max;    /* maximum item usage count */
  21.     int fail;    /* count of allocation failures */
  22.     } alcdat;
  23.  
  24. struct  strstat {
  25.     alcdat stream;        /* stream allocation data */
  26.     alcdat queue;        /* queue allocation data */
  27.     alcdat mblock;        /* message block allocation data */
  28.     alcdat dblock;        /* aggregate data block allocation data */
  29.     alcdat dblk[NCLASS];    /* data block class allocation data */
  30.     } ;
  31.  
  32.  
  33. /* in the following macro, x is assumed to be of type alcdat */
  34.  
  35. #define BUMPUP(X)    {X.use++;  X.total++;\
  36.              X.max=(X.use>X.max?X.use:X.max); }
  37.  
  38.  
  39. /* per-module statistics structure */
  40.  
  41. struct module_stat {
  42.     long ms_pcnt;        /* count of calls to put proc */
  43.     long ms_scnt;        /* count of calls to service proc */
  44.     long ms_ocnt;        /* count of calls to open proc */
  45.     long ms_ccnt;        /* count of calls to close proc */
  46.     long ms_acnt;        /* count of calls to admin proc */
  47.     char *ms_xptr;        /* pointer to private statistics */
  48.     short ms_xsize;        /* length of private statistics buffer */
  49.     };
  50.  
  51.