home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / MAINPACK.ZIP / MP.DOC < prev    next >
Text File  |  1995-01-04  |  11KB  |  253 lines

  1.  
  2.       MP.EXE - Copyright (c) 1993, The Main Shop
  3.                'MainPack' uitlity for Gap BBS systems.
  4.  
  5.      Introduction
  6.      ------------
  7.      Do you carry a mail network?  More than one?  Do your GAP message
  8. bases get big?  How often do you pack them?  WEEKLY?  MONTHLY?  I bet
  9. that takes a long time.  With Mainpack, you can pack them daily,
  10. selectively, and quickly.  Mainpack checks the SIZE of the message
  11. base, and only packs that message base if it exceeds a pre-determined
  12. size.
  13.  
  14.      Mainpack itself does NOT actually pack the message base.  It
  15. shells out to GAPPACK to do the dirty work, so you KNOW that it will
  16. be done right.
  17.  
  18.  
  19.      What it does
  20.      ------------
  21.      MainPack simplifies the maintainance of your Gap BBS by automating
  22. the process of packing your message bases via GAPPACK.EXE.  Gappack's 
  23. command line parameters can often be confusing.  Plus, you might already
  24. have an event that simply packs every message base, every night.  If your 
  25. Gap BBS has a large number of message bases (forums), this can be a very 
  26. time consuming process.  Plus, you might not NEED to pack each and every 
  27. forum, each and every night.  Your slower forums can go for days, or weeks 
  28. before gaining any real size, and needing to be packed.
  29.  
  30.  
  31.      How it does it
  32.      --------------
  33.      MainPack opens and reads GAPBBS.CNF, and FORUMS.DAT directly to find 
  34. the path and file name of each forum message file, so all you need to know
  35. to set up MainPack is the forum number, the maximum size you wish that
  36. forum to grow to, and the number of days worth of messages to keep.
  37.  
  38.  
  39.      The concept
  40.      -----------
  41.      When Mainpack encounters a message base that exceeds the maximum
  42. size, it launches GAPPACK, telling it the forum number, and the number
  43. of days to pack down to.  In general, you will want a relatively large
  44. size, and a relatively low number of days to pack down to.  The
  45. reasoning behind this concept is this:  You want Mainpack to pack a
  46. few message bases each day.  Some forums will grow to the maximum size
  47. very quickly, others will take weeks or months to do so.  The slower
  48. forums can go longer, and when packed down, will be packed down to a
  49. very small size.
  50.  
  51.      For example, say that your network has a forum that brings in 1
  52. or 2 messages per day.  This forums should be given a maximum size
  53. relatively large for THAT NUMBER OF MESSAGES.  Say, 300000 bytes.
  54. Then, a number of days which is relatively small for THAT NUMBER OF
  55. MESSAGES.  Say, 10 days.  It may take weeks for that message base to
  56. reach 300000 bytes, and when it does, it will be packed down to a very
  57. small size.
  58.  
  59.       Another example might be a very busy forum, which brings in, say
  60. 150 messages per day.  This forum should be allowed to grow very
  61. large, say 2000000 bytes (2 megs), and packed down to 1 day.
  62.  
  63.       The point being, that you want the maximum size large enough,
  64. and the number of days small enough to cause Mainpack NOT to pack THAT
  65. forum daily.
  66.  
  67.  
  68.      Setting it up
  69.      -------------
  70.      See the paragraph on running MPSETUP.EXE in addition to the
  71. instructions on the config file below.
  72.  
  73.      Mainpack uses a config file called MP.CFG.  This config file
  74. should contain one line for each of your forums.  When you add forums
  75. to your bbs, you simply add a coresponding line to your MP.CFG and
  76. you're done with the configuration.  MP.CFG can be located in the
  77. default directory for the node that will be running MP.EXE, or it can
  78. be located in your GAP MAIN directory (where your USER files are) and
  79. Mainpack will find it there.  This is handy of you are not sure which
  80. node will be running Mainpack, and don't want to have to maintain
  81. multiple MP.CFG files.
  82.  
  83.      To set up MainPack, copy MP.EXE into your path, and create a file
  84. called MP.CFG in your Gap DEFAULT directory, or your MAIn directory.
  85. The format for MP.CFG is simple.  One line for each forum you wish
  86. MP.EXE to check, with the following fields on each line:
  87.  
  88.         <Forum Number> <Max Size> <Days> <Purge> <Delete Back>
  89.  
  90. These fields should be seperated by a space and are detailed as follows:
  91.  
  92.      <Forum Number> - The number of the forum you wish to check/pack.
  93.                       (Use 0 for main board)
  94.          <Max Size> - Size in ___BYTES___.  If the message file
  95.                       becomes larger than this, MP will invoke GAPPACK
  96.                       to pack the forum.
  97.              <Days> - If MP packs this forum, this is the number of
  98.                       days to pack DOWN to.
  99.             <purge> - Y or N to tell GAPPACK whether or not to purge
  100.                       private message that have been read, even if
  101.                       they are newer than <Days>. (not case sensative)
  102.       <Delete Back> - Y or N to tell MP whether or not to delete the
  103.                       .BAK file created by GAPPACK. (not case
  104.                       sensative)
  105.  
  106. A Sample MP.CFG might look like this:
  107.  
  108.      MP.CFG
  109.      ------
  110. 0 100000 30 n y
  111. 1 300000 10 y y
  112. 2 100000 30 y y
  113. 3 1000000 20 y y
  114. 4 250000 2 y y
  115. │   │    │ │ └────Delete .BAK file created by GAPPACK
  116. │   │    │ └──────Purge Private message that have been read
  117. │   │    └────────Purge messages older that this many days
  118. │   └─────────────Pack if message base is larger than this (__BYTES__)
  119. └─────────────────Forum number
  120.  
  121.  
  122. NOTE: The forums DO NOT have to be in any particular order, and there is
  123.       no limit to the size (either high or low) of the parameter.  Also,
  124.       there is no limit to the number of forums.  (Well, yes there is, 
  125.       don't attempt to configure more than 65,535 forums, ok?  <grin>)
  126.  
  127.       In addition, you can place comments in your MP.CFG file.  Simply
  128.       place a semicolon (;) as the _FIRST_ character on the line, and
  129.       the whole line will be ignored.  For example:
  130.  
  131.  
  132.     MP.CFG
  133.     ------
  134. ; Main Board
  135. 0 100000 30 n y
  136. ; Programmers Forum
  137. 1 300000 10 y y
  138. ; Podunk Support Forum
  139. 2 100000 30 y y
  140. ; These comments will be ignored because the
  141. ; first character on the line is a semicolon.
  142. 3 1000000 20 y y
  143. 4 250000 2 y y
  144.  
  145.      In addition, you can put anything you like AFTER the 5th parameter
  146. on each line.  In other words, as long as there are 5 parameters on any
  147. one line, anything following the 5th parameter is ignored.  For example:
  148.  
  149.      MP.CFG
  150.      ------
  151. 0 100000 30 n y    ; Main Board
  152. 1 300000 10 y y    ; Programmers Forum
  153. 2 100000 30 y y    ; Podunk Support Forum
  154. 3 1000000 20 y y   ; These comments will be ignored because anything
  155. 4 250000 2 y y     ; after the fifth parameter is ignored.
  156.                    ; In this case, the semicolon is NOT needed,
  157.                    ; but is included for cosmetic purposes.
  158.  
  159.  
  160.      Using MPSETUP.EXE.  
  161.      ------------------
  162.      MPSETUP creates a starting MP.CFG for you with some default 
  163. values.  Simply run MPSETUP from your Gap default directory, and 
  164. answer the few questions is asks.  You will be asked for a default 
  165. maximum message file size, a default number of days to pack your 
  166. message base down to (if the file size is over the maximum), whether 
  167. or not to purge private mail that has been received, and whether or 
  168. not to delete the .BAK file after GAPPACK.EXE runs.  MPSETUP.EXE 
  169. then reads through GAPBBS.CNF and FORUMS.DAT and writes MP.CFG using 
  170. your default values for each forum it finds in Gap.  You can then 
  171. (if desired) edit MP.CFG and change those forums that need to be 
  172. changed.  MPSETUP.EXE gives you a clean starting point for your MP.CFG 
  173. file, without having to type all of those forum numbers and file sizes 
  174. from scratch.  Very usefull on boards with a lot of forums.
  175.  
  176.  
  177.      Running MP.EXE
  178.      --------------
  179.      To invoke MP, simply take all of your nodes to a DOS prompt, and 
  180. while in your default directory, type 'MP <enter>'.
  181.  
  182. !! DO NOT ATTEMPT TO RUN MP.EXE WHILE NODES ARE ACTIVE!  GAPPACK WILL !!
  183. !!   NOT FUNCTION IF OTHER NODES ARE ACTIVE SO NEITHER WILL MP.EXE.   !!
  184.  
  185.      MP.EXE will not attempt to pack a forum number higher than the number 
  186. of forums configured in Gap.  For example, lets say that you have 30 forums 
  187. configured, and you accidently set up forum 41 in MP.CFG.  MP.EXE will 
  188. simply ignore that line in MP.CFG.  It does so by reading GAPBBS.CNF and 
  189. checking the number of forums before it begins.
  190.  
  191.  
  192.      THE LOG FILE
  193.      ------------
  194.      MP writes a log of it's activities called MP.LOG.  Each time MP
  195. is run, the log is overwritten.  If is YOUR responsibility to copy and
  196. append a history log if you wish to do so.  The decision was made to
  197. overwrite instead of append because a log of this nature can grow very
  198. quickly.  This log is created in the same directory that MP.CFG is
  199. found (either the current default directory, or the GAP MAIN
  200. directory).
  201.  
  202.  
  203. ------------------------------------------------------------------------
  204.  
  205.      MainPack was written using Microsoft C 6.0
  206.  
  207.      MainPack requires 64k of RAM, and retains in memory while
  208. shelling out to GAPPACK.  Since GAPPACK only requires about 128k of
  209. RAM, this program should run within about 200k of memory.  However,
  210. conditions can change when packing large message bases, or if GAP
  211. Development Co changes the requirements of GAPPACK.  A good rule of
  212. thumb is to allow at least 400k at all times.
  213.  
  214.      MainPack is NOT Shareware, and it is NOT public domain.  It is
  215. freeware.  You are free to use and distribute it to anyone you see fit.
  216. The only restriction is that I will retain copyright of the source code.
  217.  
  218.      For more information, or if you just want to be a nice guy and let
  219. me know that you're using this product, call my Gap BBS, The Main Shop 
  220. and leave me a comment on how you like this product.  Any suggestions
  221. will be most welcome.
  222.  
  223.    Written By: Anthony Summy
  224.                PO Box 4284
  225.                Orange, CA 92613
  226.  
  227.                The Main Shop
  228.                (714) 783-6613
  229.                1200-14,400 HST/v.32bis
  230.  
  231.  
  232.      THANK YOU:  Kenny Gardner
  233.                  This guy is the greatest.  
  234.                  Thanks for all of your help, Kenny!
  235.  
  236.                  Mark Turner
  237.                  He got me started with this C stuff.  
  238.                  (I'll never forgive him) <grin>
  239.  
  240.                  Mike & Rob Kruss
  241.                  Your GSMP is a great product, and was the inspiration
  242.                  for this product.  
  243.  
  244.  
  245.      Legal Stuff: (ho-hum)....
  246.  
  247.      Anthony Summy, or The Main Shop shall not be responsible or liable
  248. for any (that's ANY) consequential, special, direct or indirect, or other
  249. similar damage or claims which may arise from the use of this product, 
  250. including, but not limited to loss of profit or any other commercial 
  251. damage, or any other personal damage of any kind PERIOD!  So there!
  252.  
  253.