home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / sys / vmmeter.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  4.5 KB  |  130 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. /*
  11.  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  12.  *         PROPRIETARY NOTICE (Combined)
  13.  * 
  14.  * This source code is unpublished proprietary information
  15.  * constituting, or derived under license from AT&T's UNIX(r) System V.
  16.  * In addition, portions of such source code were derived from Berkeley
  17.  * 4.3 BSD under license from the Regents of the University of
  18.  * California.
  19.  * 
  20.  * 
  21.  * 
  22.  *         Copyright Notice 
  23.  * 
  24.  * Notice of copyright on this source code product does not indicate 
  25.  * publication.
  26.  * 
  27.  *     (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  28.  *     (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  29.  *               All rights reserved.
  30.  *  
  31.  */
  32.  
  33. #ifndef _SYS_VMMETER_H
  34. #define _SYS_VMMETER_H
  35.  
  36. #ident    "@(#)/usr/include/sys/vmmeter.h.sl 1.1 4.0 12/08/90 9467 AT&T-USL"
  37.  
  38. /*
  39.  * Virtual memory related instrumentation
  40.  */
  41.  
  42. /*
  43.  * Note that all the vmmeter entries between v_first and v_last
  44.  *  must be unsigned [int], as they are used as such in vmmeter().
  45.  */
  46. struct vmmeter {
  47. #define    v_first    v_swtch
  48.     unsigned v_swtch;    /* context switches */
  49.     unsigned v_trap;    /* calls to trap */
  50.     unsigned v_syscall;    /* calls to syscall() */
  51.     unsigned v_intr;    /* device interrupts */
  52.     unsigned v_pdma;    /* pseudo-dma interrupts XXX: VAX only */
  53.     unsigned v_pswpin;    /* pages swapped in */
  54.     unsigned v_pswpout;    /* pages swapped out */
  55.     unsigned v_pgin;    /* pageins */
  56.     unsigned v_pgout;    /* pageouts */
  57.     unsigned v_pgpgin;    /* pages paged in */
  58.     unsigned v_pgpgout;    /* pages paged out */
  59.     unsigned v_intrans;    /* intransit blocking page faults */
  60.     unsigned v_pgrec;    /* total page reclaims (includes pageout) */
  61.     unsigned v_xsfrec;    /* found in free list rather than on swapdev */
  62.     unsigned v_xifrec;    /* found in free list rather than in filsys */
  63.     unsigned v_exfod;    /* pages filled on demand from executables */
  64.             /* XXX: above entry currently unused */
  65.     unsigned v_zfod;    /* pages zero filled on demand */
  66.     unsigned v_vrfod;    /* fills of pages mapped by vread() */
  67.             /* XXX: above entry currently unused */
  68.     unsigned v_nexfod;    /* number of exfod's created */
  69.             /* XXX: above entry currently unused */
  70.     unsigned v_nzfod;    /* number of zfod's created */
  71.             /* XXX: above entry currently unused */
  72.     unsigned v_nvrfod;    /* number of vrfod's created */
  73.             /* XXX: above entry currently unused */
  74.     unsigned v_pgfrec;    /* page reclaims from free list */
  75.     unsigned v_faults;    /* total page faults taken */
  76.     unsigned v_scan;    /* page examinations in page out daemon */
  77.     unsigned v_rev;        /* revolutions of the paging daemon hand */
  78.     unsigned v_seqfree;    /* pages taken from sequential programs */
  79.             /* XXX: above entry currently unused */
  80.     unsigned v_dfree;    /* pages freed by daemon */
  81.     unsigned v_fastpgrec;    /* fast reclaims in locore XXX: VAX only */
  82. #define    v_last v_fastpgrec
  83.     unsigned v_swpin;    /* swapins */
  84.     unsigned v_swpout;    /* swapouts */
  85. };
  86.  
  87. #ifdef _KERNEL
  88. /*
  89.  *    struct    v_first to v_last        v_swp*
  90.  *    ------    -----------------        ------
  91.  *    cnt    1 second interval accum        5 second interval accum
  92.  *    rate    5 second average        previous interval
  93.  *    sum            free running counter
  94.  */
  95. struct    vmmeter cnt, rate, sum;
  96. #endif
  97.  
  98. /*
  99.  * Systemwide totals computed every five seconds.
  100.  * All these are snapshots, except for t_free.
  101.  */
  102. struct vmtotal {
  103.     short    t_rq;        /* length of the run queue */
  104.     short    t_dw;        /* jobs in ``disk wait'' (neg priority) */
  105.     short    t_pw;        /* jobs in page wait */
  106.     short    t_sl;        /* ``active'' jobs sleeping in core */
  107.     short    t_sw;        /* swapped out ``active'' jobs */
  108.     int    t_vm;        /* total virtual memory */
  109.             /* XXX: above entry currently unused */
  110.     int    t_avm;        /* active virtual memory */
  111.             /* XXX: above entry currently unused */
  112.     short    t_rm;        /* total real memory in use */
  113.     short    t_arm;        /* active real memory */
  114.     int    t_vmtxt;    /* virtual memory used by text */
  115.             /* XXX: above entry currently unused */
  116.     int    t_avmtxt;    /* active virtual memory used by text */
  117.             /* XXX: above entry currently unused */
  118.     short    t_rmtxt;    /* real memory used by text */
  119.             /* XXX: above entry currently unused */
  120.     short    t_armtxt;    /* active real memory used by text */
  121.             /* XXX: above entry currently unused */
  122.     short    t_free;        /* free memory pages (60 second average) */
  123. };
  124.  
  125. #ifdef _KERNEL
  126. struct    vmtotal total;
  127. #endif
  128.  
  129. #endif    /* _SYS_VMMETER_H */
  130.