home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / vmsnet / internal / 1120 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  2.8 KB

  1. Path: sparky!uunet!wupost!zaphod.mps.ohio-state.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!nigel.msen.com!emory!sol.ctr.columbia.edu!hamblin.math.byu.edu!arizona.edu!mvb.saic.com!macro32
  2. From: DWING@UH01.Colorado.EDU (Dan Wing)
  3. Newsgroups: vmsnet.internals
  4. Subject: Re: monitor locations.
  5. Message-ID: <01GMVCF62DXE00005A@VAXF.COLORADO.EDU>
  6. Date: 27 Jul 92 16:48:58 GMT
  7. Organization: Macro32<==>Vmsnet.Internals Gateway
  8. Lines: 65
  9. X-Gateway-Source-Info: Mailing List
  10.  
  11. Bob George, BOB@AENEAS.IMS.DISA.MIL, writes:
  12.  
  13. >   I've been looking through the manuals, but haven't seen it yet.  Does
  14. >anyone know the symbolic system locations that monitor uses to determine
  15. >the time spent in each of the processor modes?   Thanks,
  16.  
  17. I've attached a portion of Nick de Smith's MONMODE.COM program, which
  18. generates output similar to MONITOR MODES, except it breaks down the output
  19. on a per-CPU basis (for SMP machines).  If anyone wants a copy, let me know.
  20.  
  21. -Dan Wing, DWING@UH01.Colorado.EDU or WING_D@UCOLMCC.BITNET (DGW11)
  22.  Systems Programmer, University Hospital, Denver
  23.  
  24. -----
  25.  
  26. $!
  27. $! From SYS$SYSTEM:SYS.MAP. As these are in the base image for VMS, they should
  28.    be the same for all VMS V5.x systems.
  29. $!
  30. $       EXE$GL_ABSTIM_TICS      = %x800046F8
  31.    ! Number of TICs since system boot
  32. $       EXE$GQ_SYSTIME          = %x80004450
  33.    ! System time
  34. $       SMP$GL_FLAGS            = %x800045CC
  35.    ! SMP flag word
  36. $               SMP$M_ENABLED           = %x00000001
  37.    ! SMP processing is enabled
  38. $       SMP$GL_ACTIVE_CPUS      = %x800045A8
  39.    ! Mask of CPUs being used by SMP
  40. $       SMP$GL_CPU_DATA         = %x800045DC
  41.    ! Table of pointers to per-CPU databases
  42. $!
  43. $! From $CPUDEF. We assume that CPU$L_NULLCPU = CPU$L_KERNEL + CPU_L_IDLE = CPU$
  44.    L_KERNEL + CPU$S_KERNEL + 4
  45. $!
  46. $       CPU$B_STATE             = %xd
  47.    ! State of this processor
  48. $       CPU$S_KERNEL            = %x1c
  49.    ! Size of time in modes structure
  50. $       CPU$L_KERNEL            = %x278
  51.    ! Time in    KERNEL mode
  52. $               CPU_L_KERNEL    = %x00
  53.    ! Offset to   ''    ''
  54. $               CPU_L_EXEC      = %x04
  55.    !   ''   ''  EXEC    ''
  56. $               CPU_L_SUPER     = %x08
  57.    !   ''   ''  SUPERVISOR ''
  58. $               CPU_L_USER      = %x0c
  59.    !   ''   ''  USER    ''
  60. $               CPU_L_INTERRUPT = %x10
  61.    !   ''   ''  INTERRUPT ''
  62. $               CPU_L_COMPAT    = %x14
  63.    !   ''   ''  Compatability ''
  64. $               CPU_L_MPSYNCH   = %x18
  65.    !   ''   ''  MPSYNCH ''
  66. $               CPU_L_IDLE      = %x1c
  67.    !   ''   ''  EXEC    ''
  68.  
  69. And a comment:
  70.  
  71. $! Read the executive per-CPU database for each active CPU.
  72. $! Determine the state of the processor, and collect all the counters.
  73. $! Note we have to subtract the idle ticks from the interrupt ticks, as under V5
  74.     idle time is
  75. $! spent on the interrupt stack. If we don't do this, idle time appears twice.
  76.