home *** CD-ROM | disk | FTP | other *** search
/ Shareware Supreme Volume 6 #1 / swsii.zip / swsii / 165 / DSTATS3.ZIP / DSTATS.DOC < prev   
Text File  |  1988-12-21  |  9KB  |  170 lines

  1.  
  2.  
  3.  
  4.  
  5.              DSTATS version III, Copyright 1988 by Charles Lazo III
  6.              ------------------------------------------------------
  7.  
  8. DSTATS = Drive STATisticS is a small utility written in assembly language that
  9. reports on the information returned by the GET FREE DISK SPACE function of DOS
  10. for user selected (logical) disk drives.  Essentially, DSTATS issues the same
  11. information as the DOS CHKDSK.COM program; however, more (or less) information
  12. can be provided for the selected drives and the program runs faster because
  13. DSTATS does not check out the disk(s) File Allocation Table(s) as does CHKDSK.
  14.  
  15. The provisions of the copyright of DSTATS are that it may be freely copied and
  16. distributed and it may even be sold separately or in a collection with other
  17. programs.  The only restriction is that this documentation must accompany any
  18. such distribution of the program and neither the documentation nor the program
  19. may be altered in any way.  An exemption on program alteration is provided to
  20. individuals who purchase the source code; however, even they may not distribute
  21. alterations of the program.  (Source may be purchased for $10.00, see the last
  22. section of this documentation for details.)
  23.  
  24. The operation of DSTATS is controlled by an environment variable with the same
  25. name.  The user sets this environment variable either at the DOS command line
  26. or via a batch file.  Command line parameters, if entered, shall override the
  27. environment variable.  If the first character on the command line is a question
  28. mark preceded only by either spaces or tabs or if there is no command line
  29. entry and the DSTATS environment variable has not been set when the program is
  30. run, then after the display of the copyright message the following information
  31. is given:
  32.  
  33. -------------------------------------------------------------------------------
  34. Setup for DSTATS requires "SET DSTATS=<drive letters>[;<field numbers>]" to be
  35. entered at the DOS prompt or in a batch file before running the DSTATS program.
  36. See the file DSTATS.DOC for more information and examples.  Note:  A command
  37. line entry using the same syntax as the environment variable overrides any
  38. environment setting for DSTATS and a command line entry with a question mark as
  39. the first non space/tab character also causes this message to be displayed.
  40.  
  41.  
  42. field #   DSTATS report heading        Meaning
  43.  
  44.    1      Total space                  Total bytes that can be stored on drive
  45.    2      Bytes used                   Total bytes currently stored on drive
  46.    3      Bytes free                   Total bytes available for use
  47.    4      Sec/cls                      Sectors per cluster
  48.    5      Free cls                     Total clusters currently free
  49.    6      Byte/sec                     Bytes per sector
  50.    7      Total cls                    Total clusters on disk
  51. -------------------------------------------------------------------------------
  52.  
  53. The information is meant to be a memory aid and not a substitute for this
  54. extended documentation.  Thus setting the DSTATS environment variable with the
  55. command
  56.  
  57.      set dstats=<drive letter(s)>[;<field numbers>]
  58.  
  59. is the first step required to prepare DSTATS for proper operation.  Note that
  60. capitalization is not significant; any mixture of small- and uppercase can be
  61. used to enter the SET command.  "<drive letter(s)>" and ";<field numbers>" are
  62. formal indicators of proper syntax for the SET command.  Henceforth, the two
  63. parts of the variable shall be given the names "drives entry" and "fields
  64. entry" respectively.  They may be best illustrated by examples.  (The brackets
  65. surrounding the fields entry means it is optional.)
  66.  
  67. Entering this command, set dstats=ab;123, at the DOS prompt or in a batch file
  68. and then running the DSTATS program results in, for example, the output:
  69.  
  70.   Total space  Bytes used  Bytes free  
  71. A      362496      311296       51200  
  72. B      362496      352256       10240  
  73.  
  74. Just doing set dstats=ab, would give the same result, since the value ";123" is
  75. the default setting for the fields entry value.
  76.  
  77. As many drive letters as desired may be placed in the drive entry and repeated
  78. drive letters are allowed.  Repeated numbers are not allowed in the fields
  79. entry.  Blank lines may be inserted in the report output by placing either of
  80. the two characters "@", the at sign, or "`", the grave accent, in the drives
  81. entry.  These two characters are the only nonalphabetic characters allowed in
  82. the drives entry.  (Actually, this is not strictly true.  See the "Technical
  83. Notes" section for details).  Only the digits 1-7 are allowed in the fields
  84. entry (aside from the ";" character).
  85.  
  86. Setting the dstats variable to @a@cd;3645 and running dstats on my system gives
  87. this output
  88.  
  89.   Bytes free  Byte/sec  Sec/cls  Free cls  
  90.  
  91. A      51200       512        2        50  
  92.  
  93. C    1126400       512        8       275  
  94. D    1056768       512        2      1032  
  95.  
  96. Where drive A contains the same diskette as it did for the earlier report, C
  97. drive is a hard disk partition, and D drive is an EMS ram disk.  Multiplying
  98. the numbers in columns 2, 3, and 4 gives the numbers in column 1.  Note the
  99. "@" characters in the environment variable produce the blank lines after the
  100. heading and the A drive report.
  101.  
  102. There are a variety of error messages.  All of them explicitly refer to the
  103. environment variable DSTATS; however, if a command line entry is made to over-
  104. ride an environment variable, then the messages are really referring to the
  105. command line entry.
  106.  
  107.  
  108.                                    Disclaimer
  109.                                    ----------
  110.  
  111. Due to the difficulty of software development and testing it is next to
  112. impossible to determine with certainly that programs will never cause problems
  113. in all of the environments to which they are exposed.  Therefore, I as the
  114. holder of the copyright of this program assume no responsibility whatsoever for
  115. any damages which may be caused either directly or indirectly by the program.
  116. By using the DSTATS program you agree to this provision.
  117.  
  118.  
  119.                                 Technical Notes
  120.                                 ---------------
  121.  
  122. Dos function 36h, Get Free Disk Space, is used to obtain the data provided in
  123. the report.  Although the numbers for bytes per sector and sectors per cluster
  124. are reported by this function in word sizes, it is assumed in this program that
  125. the product of these numbers is also of word size.  Consequently, DSTATS will
  126. only be able to issue a valid report for disks with total storage capacity that
  127. is less than 4 gigabytes.  Considering the size of up and coming CD drives this
  128. may be a major limitation.  Persons wishing to have the program work on larger
  129. drives may either purchase the source code and make the needed alterations
  130. themselves, or contract me or another to make the changes.
  131.  
  132. Earlier it was mentioned that only alphabetic characters are allowed in the
  133. drives entry of the dstats environment variable.  In fact, any characters with
  134. ASCII value greater than or equal to that of the at sign character, "@", are
  135. allowed.  Of course, the at sign and grave accent characters have special
  136. meanings for the report and cannot be symbols for drives.  Whether DOS will
  137. allow the use of any of these characters to designate logical drives I do not
  138. know, but they are supported nevertheless.
  139.  
  140. As previously mentioned the default entry for the fields entry is ";123".  If
  141. desired the location in the DSTATS.COM file that contains this value can be
  142. altered with a byte editor.  The offset in the file of this value is hex 6DE or
  143. from within DEBUG with its 100h offset:  7DE.  The field is seven bytes wide
  144. and the semicolon is not included.  Any permutation of the seven digits 1 to 7
  145. may be placed there.  These numbers are not checked for validity, so make sure
  146. that there are only up to seven entered, that they are in the range 1 - 7 and
  147. that there are no repetitions.  Finally, adjust the byte at DEBUG offset 7DD,
  148. the byte just prior to the default entry field, to the number of field entry
  149. values that DSTATS shall use.  This value is initially set to 03 and can be
  150. made as high as 07 or as low as 01.  Changing it to a value outside this range
  151. is asking for trouble.  The changed values will then be the default.
  152.  
  153.  
  154.                             Source Code Availability
  155.                             ------------------------
  156.  
  157. The source code for DSTATS is available to persons on an individual basis.
  158. Companies interested in a source code site license should contact the author at
  159. the address given below.  Cost is $10.00 for the latest version and delivery is
  160. either by mail via 5 1/4 inch floppy disk or via CompuServe's Easyplex binary
  161. mail.  Money orders and checks are acceptable as payment.  If the binary Email
  162. option is selected the code will be sent upon receipt of payment.  Be sure
  163. to either send me your CompuServe user ID with your payment or a message via
  164. Easyplex.  The program is supported for all users (source code purchasers or
  165. not) via Easyplex or US mail.
  166.  
  167.                  Charles Lazo III          CIS user ID 72210,17
  168.                  P.O. Box 452
  169.                  Hohenwald, TN 38462
  170.