home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / SYSACT11.ZIP / SYSACT.DOC next >
Text File  |  1988-03-27  |  4KB  |  118 lines

  1.              System Activity V1.10
  2.             Written by Andy Brunner
  3.                   27-Mar-88
  4.  
  5.  
  6. Description:
  7. ------------
  8.  
  9. This OS/2 protected mode program allows the user to inspect some of the
  10. key system activities. It includes the display of:
  11.  
  12.     -    Total CPU usage (in percent)
  13.     -    Largest free physical memory block (RAM)
  14.         -    Swap file increase (in KB)
  15.     -       Number of spool files
  16.     -    Total size of all spool files (in KB)
  17.  
  18.  
  19. Command Syntax:
  20. ---------------
  21.  
  22. [drive][path]SYSACT swappath|NULL spoolpath|NULL
  23.  
  24. The 'swappath' specifies the directory, where the system swap file
  25. 'SWAPPER.DAT' resides. This must be the same as the CONFIG.SYS
  26. statement 'SWAPPATH='.
  27.  
  28. The 'spoolpath' specifies the directory, where the spool files resides.
  29. If you have set up the CONFIG.SYS 'RUN=' statement as e.g:
  30. RUN=C:\OS2\SPOOL.EXE C:\OS2\SPOOL /D:LPT1 /O:LPT1
  31. to automatically start the system spooler using the C:\OS2\SPOOL directory,
  32. then you will need to use 'C:\OS2\SPOOL' as the directory in the commmand
  33. argument to SYSACT.
  34.  
  35. Both parameters may be suppressed with the keyword 'NULL', in case you
  36. do not have the swap and/or spool active.
  37.  
  38.  
  39. Example:
  40. --------
  41.  
  42. SYSACT C:\OS2\SWAP C:\OS2\SPOOL
  43.  
  44. will start the monitoring of the system with the swap file in the directory
  45. C:\OS2\SWAP and the spool files in C:\OS2\SPOOL.
  46.  
  47.  
  48. Other valid examples:
  49. ---------------------
  50.  
  51. - SYSACT C:\ C:\        Swap and spool in root directory
  52. - SYSACT NULL C:\SPOOL        No swap active and spool in C:\SPOOL
  53. - SYSACT C:\OS2\SWAP NULL    Swap in C:\OS2\SWAP and no spooler active
  54. - SYSACT NULL NULL        No swap and no spooler active
  55.  
  56.  
  57. Some background information:
  58. ----------------------------
  59.  
  60. How do I collect those figures ? Since this was the No.1 question from
  61. the Version 1.00 users, I will try to give you some background information
  62. on this.
  63.  
  64.  
  65. CPU Activity:
  66. -------------
  67.  
  68. Two very small threads are started at the beginning. One is at the highest
  69. possible priority (Critical class +31). The other is at the lowest possible
  70. priority (Idle class -31). This low priority class thread simply clears a
  71. RAM semaphore (owned by the high priority class thread) and waits 32ms. This
  72. loop is executed forever. The high-priority class thread waits for the RAM
  73. semaphore to be cleared or a one-second time-out. Now, the only thing I have
  74. to calculate is the number of RAM semaphore clear's it received during one
  75. second. This results in the CPU activity (in percent). This mechanism works,
  76. because the system dispatches always from top-to-bottom (Critical class,
  77. Normal or regular class, Idle class). If the low priority class thread is
  78. dispatched, then there is no other work to be done (during this times-slice).
  79. The CPU activity is updated on screen every second.
  80.  
  81.  
  82. Free RAM:
  83. ---------
  84.  
  85. This is simply the visual number resulted from the API call DOSMEMAVAIL. This
  86. figure is updated on screen every 250ms.
  87.  
  88.  
  89. Swap and spool file statistics:
  90. -------------------------------
  91.  
  92. These are simply the visual numbers resulted from a directory scan of
  93. the swap file [path]\SWAPPER.DAT and the directory scan of the spool
  94. files [path]\SPL*.SL1. Those figures are updated on screen every 250ms.
  95.  
  96.  
  97. How to stop SYSACT.EXE:
  98. -----------------------
  99.  
  100. Simply press CTRL-BREAK. This will dispatch a signal routine, which does
  101. the neccessary cleanup.
  102.  
  103.  
  104. Futures:
  105. --------
  106.  
  107. I would be very glad to add other useful system information, if possible.
  108. Since I do not yet see any standard way to collect process or thread
  109. related information, I am waiting for hints or tips from you.
  110.  
  111.  
  112. Please let me know if you have any comments, suggestions or enhancements.
  113.  
  114. Hope you enjoy it !
  115.  
  116. Andy Brunner (BIX 'abrunner')
  117. 27-Mar-88
  118.