

      __    _____ _____   ____________     _____  __ __    __
     / /|  / _  // ___/| /__  __/ _  /|   / __ /|/ // /|  / /| 
    / / / / // // /L__|/ L_/ /|/ // / /  / /L/_// // / / / / /
   / /_/_/ // // // /|    / / / // / /  / /L/ // // /_/_/ /_/_ 
  /_____/____//____/ /   /_/ /____/ /  /____/|/_//_____/_____/|
  L_____L____|L____|/    L_|/L____|/   L____|/L_|L_____L_____|/

                      1 . 1 0 / b e t a - 5

              ====================================


                    (C) 15-May-1993 BoLuSoft





   What you should have
   ====================
   L2B_110.ZIP
   - L2B.TTP ....... executable file for all Atari TOS machines
   - L2B.TXT ....... this text, manual
   - HISTORY.TXT ... history of changes

    If  something of above files is missing  then  please  obtain 
another  distribution archive or contact me  personally  (address 
below).



   Beta note
   =========
   If you want some special options to be included into  L2B,  it 
is right time now! Any comments are welcome!



   What is LogToBill
   =================
   LogToBill  is utility for making statistics  from  logfile  of 
BinkleyTerm mailer.  It offers rather simple output, but flexible 
means  of  configuring.  It works this way:  it scans  thro'  the 
logfile  remembering  only the lines  with  text:  "Session  with 
<address>,  cost $<cost>...".  Other lines are deleted from  log-
file.  At the end of such way shortened log is added  statistics. 
In  other words,  the logfile is processed is in such  way,  that 
important  information for creating statistics are  never  erased 
from  it.  It is meant to work incrementally:  when your  logfile 
grows too large,  simply call L2B to process it. Then BinkleyTerm 
can  continue to write its entries to log.  When log grows  large 
again, then call L2B and so on.

LogToBill offers you two sorts of statistics:

Normal statistics:  there's only number of total polls and  costs 
and average cost per call.

Extended statistics:  there's list of all polled systems with the 
info about cost and number of polls.  There's also total cost and 
number polls, of course.



   A word about terminology
   ========================
   There are some words used throughout this manual you  may  not 
understand correctly.  So,  please,  read this to avoid misunder-
standings.

   Logfile
   -------
   In general,  logfile is some kind of file,  where some program 
or programs write what they did. This enables a human operator to 
discover  what  was  happening  when he  was  not  present  at  a 
computer (especially,  when program runs automatic, without human 
control).  Here were discussing so called Opus-style  log,  first 
introduced in popular e-mail and BBS package called  Opus.  Opus-
style log is plain ASCII file.  This is very useful,  because you 
need no special utility to read it.  Logfile consists from lines, 
we'll be calling entries.

   Entry
   -----
   Entry  is  a single line of text in a logfile.  It  has  fixed 
format, as you can see from example:

+ 14 May 22:58:22 BINK begin, Bink-ST 3.02 [Apr 19 1992]
^ ^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ ^ ^  ^
|        |         |    |
|        |         |  And this is text for which the whole  entry
|        |         |  was created. It say what program did.  Here
|        |         |  BinkleTerm (mailer) says, that it has  just
|        |         |  begun to work (was executed).
|        |         |
|        |         |_ This is the identification code of program, 
|        |            which  wrote  the  entry.   We'll  call  it 
|        |            identification or id. Here BINK stands  for
|        |            BinkleyTerm, but  there  can  be  CLST  for
|        |            Callista or TBOX for The Box
|        |
|        |___________ This is the date and time of creating given 
|                     entry.
|
|____________________ This character determines how  much  impor-
                      tant   is   given    log-entry.    Possible 
                      characters are !,*,+,:,#,' ' (space).  Most 
                      important is !, which in most cases designs 
                      error  messages  and  reports.   The   less 
                      importat is ' ' (space).



   Configuring
   ===========
   LogToBill offers few ways to telling it what to do.  They have 
different priorities, so read following lines carefully.

   Command-line - switches
   -----------------------
   The general form of command-line syntax is:

   L2B [-switch1] [-switch2<file>] ... [-switchN]

    Whole command-line is case-insensitive (unlike  UNIX's  one). 
Switches  are usually single characters preceded by '-'  or  '/'. 
Some  switches require also to specify filneme:  this is  written 
immediately after the switch,  without any dividing spaces  (this 
is different from UNIX style).

   LogToBill knows following switches

-l<logfile> ... tells L2B what file to process.  You  needn't  to 
                use -L switch,  you can simply type logfile name. 
                This switch is basical for LogToBill - when it is 
                not  specified,  then  all the  command  line  is 
                supposed invalid!  (and  other means  of  getting 
                configuration are examined  subsequently).  As  a 
                filename you can also use name of  special  files 
                mapping I/O devices,  e.g.  writing  -lCON:  will 
                expect input from standard  input  (stdin).  This 
                can  be  used  for   example   for   piping   and 
                redirecting in CLIs.

-e ............ tells L2B to add extended statistics, this switch 
                is  only optional.  When this  is  missing,  only 
                simple  statistics,  like  in  L2B  v.  1.06  and 
                previous.

-b ............ tells  L2B  to  create backup of  logfile  before 
                proceeding to process.

-o<output> .... tells   L2B   to  direct   processed  logfile  to 
                <output>; in such case -b switch is automatically 
                disabled.  Like at -l,  you can use device  names 
                like CON:,  AUX:,  PRN: and so.

-c<cfg> ....... tells L2B to read its  configuration  from  given 
                file.  CFG files are discussed below.  Note, that 
                this   switch  invalidates  w hole   command-line 
                (except itself, of course).

-s[<cfg>] ..... this switch conserves current  command-line  into 
                configurations  file  which can be read  via  -c. 
                When no filename is given,  then L2B.CFG  is  the 
                default.  Note that when you use this switch, the 
                only thing L2B will do on this run is saving CFG! 
                No processing of log will be performed.

-r<nn> ........ this is the first of "reduce" switches. The first 
                thing  it  does  is  that  it  disables  creating 
                statistics  (like other reduce-switches) Then  it 
                makes  L2B  scan  your log  and  throw  away  all 
                entries older then <nn> days.

-ri<idlist> ... this is another "reduce" switches. This makes L2B 
                keep  only  entries  with  program-identification 
                listed in it. See example below.

-re<idlist> ... this  is  similar to -ri,  but it  ERASES  chosen 
                entries.  Entries  with unlisted  identifications 
                are left intact. See example below

-? ............ short help.

   Example of some command-lines:

   1. L2B SYSTEM.LOG
   2. L2B -lSYSTEM.LOG -b
   3. L2B -lSYSTEM.LOG -b -e -oSYSTEM.LST
   4. L2B -sTEST.CFG -lF:\SYSTEM.LOG -b -e
   5. L2B -cTEST.CFG
   6. L2B SYSTEM.LOG -r14
   7. L2B -lSYSTEM.LOG -oTEMP.TXT -riBINK,CLST,L2B
   8. L2B -lSYSTEM.LOG -b -reTIDY,GO,COME

   Have you idea what it does? If no, here's solution:

1. SYSTEM.LOG is processed and simple statistics are added.
2. Like 1. but old logfile is preserved in file SYSTEM.BAK.
3. SYSTEM.LOG is processed and extended statistics are merged  to 
   it. Output will be written to SYSTEM.LST.
4. This  will  do nothing more then saving switches you see  into 
   file TEST.CFG.
5. And  finally  this will force L2B to act like upon  previously 
   created config file.
6. This erases all entries older than two weeks  (=14 days)  from 
   logfile SYSTEM.LOG
7. This copies all entries with identification BINK, CLST and L2B 
   to file TEMP.TXT.
8. This  erases  entries with identifications TIDY,  GO and  COME 
   from logfile SYSTEM.LOG.  Original log is  preserved  in  file 
   SYSTEM.BAK.

   Configuration file
   ------------------
   When L2B see no arguments on command-line,  then it looks  for 
file  L2B.CFG (in current directory).  If it is found,  then  L2B 
tries to read configuration from it. L2B.CFG is plain ASCII file. 
It could be edited with any ASCII editor,  but you won't need it. 
You can create it using -s switch (without typing filename). This 
command will create config accordingly to command-line.  When  is 
then  L2B  launched  without any  arguments,  it  will  act  like 
switches,  these  were on cmd-line with -s,  were used.  In  some 
cases,  it  may  be  useful to have different  config  files  for 
different  occassions.  This can be achieved via specifying  file 
with  -s<file>.  Then you have to use L2B -c<file> to invoke  L2B 
with wanted config file.

   Environment variable L2B
   ------------------------
   But  what  happens,  when no arguments are  available  and  no 
config can be found?  No, no error messages. There's one more way 
to determine configuration:  environment variable L2B. It's value 
is  string with list of switches as if passed  on  commandd-line, 
but without preceding '-' or '/' and delimited with ',' (commas). 
The example is:

   L2B=b,e,oG:\SYSTEM.LST,lF:\FIDO\SYSTEM.LOG

   Which will cause L2B to work like given:

   L2B -b -e -oG:\SYSTEM.LST -lF:\FIDO\SYSTEM.LOG



   Comments
   ========
   The list of polled nodes is sorted in numerical order.

   If there are more then one address for one node (for  example: 
2:423/71  and  2:423/71@fidonet.org or 2:423/71 and  423/71)  L2B 
will suppose each one to be different entry in its list.

   List of polled nodes in extended statistics cannot exceed  100 
entries.  (if  it  minds,  tell me,  I can easily  increase  this 
number).

   L2B creates temporary file. There should be some free space on 
your hard-disc drive.

   I do not recommend to run L2B on diskette.  If you need to use 
it on diskette,  use L2B 1.06 instead. It is much faster ('coz it 
is written in assembler).

   If  you  think L2B is too big (30KB)  I'm  telling  you,  that 
compiled on a PC it takes up 43KB. Otherwise, you can get version 
1.06  of  L2B  it  is only about 2KB  long  (but  doesn't  create 
extended statistics).

   There's  short  delay  after successful  execution  (time  for 
reading  copyright  and  so ;-) If  you  are  unpatient,  then  a 
keypress make L2B exit immediately.  After an error there's  four 
times longer pause (for reading error message), but you can still 
press any key.  After invoked help, there's long delay to read it 
all.  But  remember:  L2B can never hang waiting for a  keypress! 
(unless  you  tell it to wait for it).  So it is safe to  use  it 
automatically.  I'm writing such obvious things because there are 
people who think that is processing log such long time.



   Legal
   =====
   Program is FREEWARE.  It means that you may spread it  as  you 
want but in UNCHANGED form.


   Author's address
   ================
   Borek Lupomesky
   Marvanova 4
   Usti nad Labem, 40012
   Czech Republic
   Europe
   tel/TAD: +42-47-45816
   E-mail: 2:423/71@fidonet.org (preferred)
           xlupomes@dcse.fee.vutbr.cs (not in time of holidays)

   My FidoNet site is accessible from within Internet using  this 
address:

   Borek.Lupomesky@f71.n423.z2.fidonet.org

   It  would  be nice to use FidoNet even it's not as  quick  and 
reliable.

---------------------------- THE END ----------------------------
