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 >
Wrap
Text File
|
1995-01-04
|
11KB
|
253 lines
MP.EXE - Copyright (c) 1993, The Main Shop
'MainPack' uitlity for Gap BBS systems.
Introduction
------------
Do you carry a mail network? More than one? Do your GAP message
bases get big? How often do you pack them? WEEKLY? MONTHLY? I bet
that takes a long time. With Mainpack, you can pack them daily,
selectively, and quickly. Mainpack checks the SIZE of the message
base, and only packs that message base if it exceeds a pre-determined
size.
Mainpack itself does NOT actually pack the message base. It
shells out to GAPPACK to do the dirty work, so you KNOW that it will
be done right.
What it does
------------
MainPack simplifies the maintainance of your Gap BBS by automating
the process of packing your message bases via GAPPACK.EXE. Gappack's
command line parameters can often be confusing. Plus, you might already
have an event that simply packs every message base, every night. If your
Gap BBS has a large number of message bases (forums), this can be a very
time consuming process. Plus, you might not NEED to pack each and every
forum, each and every night. Your slower forums can go for days, or weeks
before gaining any real size, and needing to be packed.
How it does it
--------------
MainPack opens and reads GAPBBS.CNF, and FORUMS.DAT directly to find
the path and file name of each forum message file, so all you need to know
to set up MainPack is the forum number, the maximum size you wish that
forum to grow to, and the number of days worth of messages to keep.
The concept
-----------
When Mainpack encounters a message base that exceeds the maximum
size, it launches GAPPACK, telling it the forum number, and the number
of days to pack down to. In general, you will want a relatively large
size, and a relatively low number of days to pack down to. The
reasoning behind this concept is this: You want Mainpack to pack a
few message bases each day. Some forums will grow to the maximum size
very quickly, others will take weeks or months to do so. The slower
forums can go longer, and when packed down, will be packed down to a
very small size.
For example, say that your network has a forum that brings in 1
or 2 messages per day. This forums should be given a maximum size
relatively large for THAT NUMBER OF MESSAGES. Say, 300000 bytes.
Then, a number of days which is relatively small for THAT NUMBER OF
MESSAGES. Say, 10 days. It may take weeks for that message base to
reach 300000 bytes, and when it does, it will be packed down to a very
small size.
Another example might be a very busy forum, which brings in, say
150 messages per day. This forum should be allowed to grow very
large, say 2000000 bytes (2 megs), and packed down to 1 day.
The point being, that you want the maximum size large enough,
and the number of days small enough to cause Mainpack NOT to pack THAT
forum daily.
Setting it up
-------------
See the paragraph on running MPSETUP.EXE in addition to the
instructions on the config file below.
Mainpack uses a config file called MP.CFG. This config file
should contain one line for each of your forums. When you add forums
to your bbs, you simply add a coresponding line to your MP.CFG and
you're done with the configuration. MP.CFG can be located in the
default directory for the node that will be running MP.EXE, or it can
be located in your GAP MAIN directory (where your USER files are) and
Mainpack will find it there. This is handy of you are not sure which
node will be running Mainpack, and don't want to have to maintain
multiple MP.CFG files.
To set up MainPack, copy MP.EXE into your path, and create a file
called MP.CFG in your Gap DEFAULT directory, or your MAIn directory.
The format for MP.CFG is simple. One line for each forum you wish
MP.EXE to check, with the following fields on each line:
<Forum Number> <Max Size> <Days> <Purge> <Delete Back>
These fields should be seperated by a space and are detailed as follows:
<Forum Number> - The number of the forum you wish to check/pack.
(Use 0 for main board)
<Max Size> - Size in ___BYTES___. If the message file
becomes larger than this, MP will invoke GAPPACK
to pack the forum.
<Days> - If MP packs this forum, this is the number of
days to pack DOWN to.
<purge> - Y or N to tell GAPPACK whether or not to purge
private message that have been read, even if
they are newer than <Days>. (not case sensative)
<Delete Back> - Y or N to tell MP whether or not to delete the
.BAK file created by GAPPACK. (not case
sensative)
A Sample MP.CFG might look like this:
MP.CFG
------
0 100000 30 n y
1 300000 10 y y
2 100000 30 y y
3 1000000 20 y y
4 250000 2 y y
│ │ │ │ └────Delete .BAK file created by GAPPACK
│ │ │ └──────Purge Private message that have been read
│ │ └────────Purge messages older that this many days
│ └─────────────Pack if message base is larger than this (__BYTES__)
└─────────────────Forum number
NOTE: The forums DO NOT have to be in any particular order, and there is
no limit to the size (either high or low) of the parameter. Also,
there is no limit to the number of forums. (Well, yes there is,
don't attempt to configure more than 65,535 forums, ok? <grin>)
In addition, you can place comments in your MP.CFG file. Simply
place a semicolon (;) as the _FIRST_ character on the line, and
the whole line will be ignored. For example:
MP.CFG
------
; Main Board
0 100000 30 n y
; Programmers Forum
1 300000 10 y y
; Podunk Support Forum
2 100000 30 y y
; These comments will be ignored because the
; first character on the line is a semicolon.
3 1000000 20 y y
4 250000 2 y y
In addition, you can put anything you like AFTER the 5th parameter
on each line. In other words, as long as there are 5 parameters on any
one line, anything following the 5th parameter is ignored. For example:
MP.CFG
------
0 100000 30 n y ; Main Board
1 300000 10 y y ; Programmers Forum
2 100000 30 y y ; Podunk Support Forum
3 1000000 20 y y ; These comments will be ignored because anything
4 250000 2 y y ; after the fifth parameter is ignored.
; In this case, the semicolon is NOT needed,
; but is included for cosmetic purposes.
Using MPSETUP.EXE.
------------------
MPSETUP creates a starting MP.CFG for you with some default
values. Simply run MPSETUP from your Gap default directory, and
answer the few questions is asks. You will be asked for a default
maximum message file size, a default number of days to pack your
message base down to (if the file size is over the maximum), whether
or not to purge private mail that has been received, and whether or
not to delete the .BAK file after GAPPACK.EXE runs. MPSETUP.EXE
then reads through GAPBBS.CNF and FORUMS.DAT and writes MP.CFG using
your default values for each forum it finds in Gap. You can then
(if desired) edit MP.CFG and change those forums that need to be
changed. MPSETUP.EXE gives you a clean starting point for your MP.CFG
file, without having to type all of those forum numbers and file sizes
from scratch. Very usefull on boards with a lot of forums.
Running MP.EXE
--------------
To invoke MP, simply take all of your nodes to a DOS prompt, and
while in your default directory, type 'MP <enter>'.
!! DO NOT ATTEMPT TO RUN MP.EXE WHILE NODES ARE ACTIVE! GAPPACK WILL !!
!! NOT FUNCTION IF OTHER NODES ARE ACTIVE SO NEITHER WILL MP.EXE. !!
MP.EXE will not attempt to pack a forum number higher than the number
of forums configured in Gap. For example, lets say that you have 30 forums
configured, and you accidently set up forum 41 in MP.CFG. MP.EXE will
simply ignore that line in MP.CFG. It does so by reading GAPBBS.CNF and
checking the number of forums before it begins.
THE LOG FILE
------------
MP writes a log of it's activities called MP.LOG. Each time MP
is run, the log is overwritten. If is YOUR responsibility to copy and
append a history log if you wish to do so. The decision was made to
overwrite instead of append because a log of this nature can grow very
quickly. This log is created in the same directory that MP.CFG is
found (either the current default directory, or the GAP MAIN
directory).
------------------------------------------------------------------------
MainPack was written using Microsoft C 6.0
MainPack requires 64k of RAM, and retains in memory while
shelling out to GAPPACK. Since GAPPACK only requires about 128k of
RAM, this program should run within about 200k of memory. However,
conditions can change when packing large message bases, or if GAP
Development Co changes the requirements of GAPPACK. A good rule of
thumb is to allow at least 400k at all times.
MainPack is NOT Shareware, and it is NOT public domain. It is
freeware. You are free to use and distribute it to anyone you see fit.
The only restriction is that I will retain copyright of the source code.
For more information, or if you just want to be a nice guy and let
me know that you're using this product, call my Gap BBS, The Main Shop
and leave me a comment on how you like this product. Any suggestions
will be most welcome.
Written By: Anthony Summy
PO Box 4284
Orange, CA 92613
The Main Shop
(714) 783-6613
1200-14,400 HST/v.32bis
THANK YOU: Kenny Gardner
This guy is the greatest.
Thanks for all of your help, Kenny!
Mark Turner
He got me started with this C stuff.
(I'll never forgive him) <grin>
Mike & Rob Kruss
Your GSMP is a great product, and was the inspiration
for this product.
Legal Stuff: (ho-hum)....
Anthony Summy, or The Main Shop shall not be responsible or liable
for any (that's ANY) consequential, special, direct or indirect, or other
similar damage or claims which may arise from the use of this product,
including, but not limited to loss of profit or any other commercial
damage, or any other personal damage of any kind PERIOD! So there!