home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2870 / vars.c < prev   
Encoding:
C/C++ Source or Header  |  1991-02-28  |  1.8 KB  |  70 lines

  1. /*
  2.  * Copyright 1988, John F. Haugh II
  3.  * All rights reserved.
  4.  *
  5.  * Permission is granted to copy and create derivative works for any
  6.  * non-commercial purpose, provided this copyright notice is preserved
  7.  * in all copies of source code, or included in human readable form
  8.  * and conspicuously displayed on all copies of object code or
  9.  * distribution media.
  10.  */
  11.  
  12. #ifndef    lint
  13. static    char    sccsid[] = "@(#)vars.c    1.2    22:55:43    2/21/91";
  14. #endif
  15.  
  16. #include <sys/param.h>
  17. #include <sys/sysmacros.h>
  18. #include <sys/types.h>
  19. #include <sys/file.h>
  20. #include <sys/inode.h>
  21. #include <sys/page.h>
  22. #include <sys/seg.h>
  23. #include <sys/proc.h>
  24. #include <sys/text.h>
  25. #include <sys/mount.h>
  26. #include <sys/var.h>
  27. #include <a.out.h>
  28. #include "crash.h"
  29.  
  30. prvars ()
  31. {
  32.     printf        ("buffers      %3d\n",
  33.         v.v_buf);
  34.     printf        ("calls      %3d\n",
  35.         v.v_call);
  36.     printf        ("inodes      %3d\n",
  37.         v.v_inode);
  38.     printf        ("e_inodes  %3d\n",
  39.         v.ve_inode - (struct inode *) namelist[NM_INODE].xl_value);
  40.     printf        ("files      %3d\n",
  41.         v.v_file);
  42.     printf        ("e_files      %3d\n",
  43.         v.ve_file - (struct file *) namelist[NM_FILE].xl_value);
  44.     printf        ("mounts      %3d\n",
  45.         v.v_mount);
  46.     printf        ("e_mounts  %3d\n",
  47.         v.ve_mount - (struct mount *) namelist[NM_MOUNT].xl_value);
  48.     printf        ("procs      %3d\n",
  49.         v.v_proc);
  50.     printf        ("e_procs      %3d\n",
  51.         v.ve_proc - (struct proc *) namelist[NM_PROC].xl_value);
  52.     printf        ("texts      %3d\n",
  53.         v.v_text);
  54.     printf        ("e_texts      %3d\n",
  55.         v.ve_text - (struct text *) namelist[NM_TEXT].xl_value);
  56.     printf        ("clists      %3d\n",
  57.         v.v_clist);
  58.     printf        ("sabufs      %3d\n",
  59.         v.v_sabuf);
  60.     printf        ("maxproc      %3d\n",
  61.         v.v_maxup);
  62. /*
  63. swapmap      105
  64. */
  65.     printf        ("hashbuf      %3d\n",
  66.         v.v_hbuf);
  67.     printf        ("hashmask  %3d\n",
  68.         v.v_hmask);
  69. }
  70.