CONNGEN - Connection Table Test Data Generator
~~~~~~~

The purpose of CONNGEN it to generate random connection table data
for testing the TSE's connection table processing code.

CAUTION!  CAUTION!  CAUTION!  CAUTION!  CAUTION!  CAUTION!  CAUTION!  

     Data files generated with CONNGEN should never be loaded
     onto production systems.  This will result in unpredictable
     results as the random address data may contain addresses
     which coincide with real addresses generated by production
     address masks.

CAUTION!  CAUTION!  CAUTION!  CAUTION!  CAUTION!  CAUTION!  CAUTION!  

CONNGEN Command Line Options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CONNGEN [-COUNT=n] [-FILE=filename]

The optional -COUNT=n parameter indicates how many rows should be
generated.  The default is 5 rows.

The optional -FILE=filename parameter indicates the destination
file, which is appended to.  If a file is not specified, stdout
is used.  It is NOT recommended that the output be redirected
to a file using > or >> as this is painfully slow for whatever
reason.   Use the -FILE option whenever a output file is
desired.

Using The Test Files
~~~~~~~~~~~~~~~~~~~~

As indicated above, never use these files on production systems!

Once generated, the   SHAPER LOAD CONN filename   command is used
to load the connection tables.  The connection tables can be edited
to modify flags and other options.

A random mixture of both address masks ( varying both source and
destination mask ), the Key Group ID, and certain field contents
is present in the file.  However this does not guarantee that each key
is unique.   Expect a small portion of entries from any large file
to be duplicates and merely trigger an update of the existing
connection entry.  When the import is complete, the number of newly
added entries and the number updated is displayed.

Test Procedures 
~~~~~~~~~~~~~~~

Use CONNGEN to create several files, uniform in number of entries.
For example, create several files with 100,000 entries each.

LOAD SHAPER with the -NODES=n option to allocate additional memory
for large connection tables.  Each entry will require 2 nodes, and
the TSE will unload when less than 10% or 20,000 nodes ( whichever
is smaller ) is free.   Ensure you have enough for your test.

Load as many of the CONNGEN files as you want, recording the number
of valid, ignored, modified, and added entries.  Verify this
makes sense.   For example, if you create a 20,000 entry file,
there should be 20000 valid entries.

Watch for otherwise proper operation of the TSE during these
loads, the server will be busy, however the import and export
operations run at the lowest possible priority.  Expect near
100% CPU utilization.  These processes will yield the CPU
to any other task, so other than cache turnover, the effect
should be minimal.

After several files have been loaded, be sure to export the
connection table to a new file.   This file will contain all
the connections loaded ( or should ) and these will be unique
entries.   You should be able to import this file and re-export
and produce an identical output file ( when the TSE is in
BYPASS mode ).   The TSE must be in BYPASS for such a check to
work as the connection table entries might have been touched
between import and export resulting in differences in the
data portion of the entries ( the addresses should be the
same )

Testing Low Memory Conditions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Trying to load a huge connection table into the TSE is a great
way to simulate a low memory condition.   Each entry takes 2
nodes and the tables ar loaded very rapidly resulting in a very
sever and abrupt low memory state within the TSE.  Under such
conditions, the TSE should properly detect the low memory state
and attempt a graceful shutdown.   This includes terminating
the import process itself.
