home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
usagep24.lzh
/
USAGE.DOC
< prev
next >
Wrap
Text File
|
1993-02-04
|
11KB
|
211 lines
USAGE -- Reads one or more Maximus or Binkley logs and generates a usage graph
Version 2.4 (02/04/93)
Written by Bob Quinlan of Austin, Texas, USA
Sysop of Red October at 512-834-2593 (1:382/111)
Special thanks to Steve Antonoff for suggestions and code.
Copyright 1993 by Bob Quinlan
Compatible with Maximus 2.00 and 2.01 and BinkleyTerm 2.55 and 2.56
This program reads one or more Maximus or Binkley type logs and
generates a BBS-format usage graph based on the data. By default it
will read MAX.LOG in the current directory and write USAGE.BBS. The
following switches allow you to configure it for your system and
preferences:
/Cx=y Set color number 'x' to Avatar color 'y'. 'x' values
mean the following:
0 = default color
1 = title
2 = frame
3 = reference text (%)
4 = reference lines (%)
5 = hour text
6 = hour dots (odd hour values)
7 = hour lines
8 = data bars
9 = enter prompt
Avatar color codes are given in two-digit hexadecimal.
The first digit sets the background color (0-7 only) and
the second digit sets the foreground color (0-F). Each
digit corresponds to the following colors:
0 = black
1 = blue
2 = green
3 = cyan
4 = red
5 = magenta
6 = brown
7 = white
8 = grey
9 = bright blue
A = bright green
B = bright cyan
C = bright red
D = bright magenta
E = yellow
F = bright white
Example: To set the data bars to yellow on blue you
would use the switch /C8=1E.
/Ddays Days of history to use. Any log events or history file
entries older than this many days will be ignored.
/Hfile History file to process. This eliminates the need to
rescan old log data. Every time USAGE runs a new record
is added to the history file for future reference.
Records older than the /D parameter specifies will be
removed from the history file automatically.
This information is stored in USAGE.HST by default. You
can specify another name using the /H parameter. Using
/H by itself will prevent history file processing.
/Ifile Incremental file to process. This file keeps track of
where and in what state the previous log ended. If the
file has been restarted since the last run that will be
detected and the location pointer reset to the beginning
of the new file.
Incremental processing means that your maintenance times
will be included in the graph as "in use" periods.
Without this feature they would never register because
the processing would also end with an unresolved active
event.
This information is stored in USAGE.INC by default. You
can specify another name using the /I parameter. Using
/I by itself will prevent incremental file processing.
/Lfile Log file to process. Note that the /L parameter can be
used more than once to specify several logs. This
feature is particularly useful if you have multiple
lines with separate logs.
/M Military time. Display the hours as 0-23.
/Sfile Search file to process. You can override the default
search strings that are used to recognize system
activity in the log by specifying a search file.
A search file is just a text file containing one string
per line. Search strings must begin with the log field
immediately following the date. Add a + as the first
character of each line that indicates an activity is
starting. Add a - as the first character of each line
that indicates an activity is ending.
By default USAGE uses a set of search strings that
should work with both BinkleyTerm and Maximus. BINK.S
and MAX.S are included both as samples to help you
construct your own search files. Other .S files may
also be included.
/Ttitle Title for graph. You may want to supply multiple word
values for title. You can separate the words by spaces
or by underscores (which will be replaced by spaces).
For example, both of these lines would produce the same
results:
usage /lmax.log /tRed October Usage
usage /lmax.log /tRed_October_Usage
/Ufile The file to which the usage graph will be written. The
.BBS extension is not automatically added.
/V Verbose diagnostic mode. Prints out each log entry that
triggers a starting or ending time. Prints the elapsed
time between each start/end pair. Not recommended for
normal use.
/Vcount Volume. If verbose mode is not turned on a dot is
printed every time a new usage entry is found. Setting
'count' to zero turns off the dots. Setting 'count' to
any other number divides down the number of dots by a
factor of 'count'. (For example: /V3 produces one dot
for every three usage entries.)
If you use WFC within Maximus pass USAGE the Maximus log. If you use
Binkley to answer the phone pass it the Binkley log. You can mix log
types if you have lines with different configurations.
As an example, lets say a system has two lines. One runs Binkley and
the runs Maximus with WFC. A new log is started every month. Here is
how to generate an overall usage graph:
usage /lbink01.log /lmax02.log /tOverall Usage
I also want to generate usage graphs for each line separately. I want to
reprocess the same logs for this purpose and I want to keep the history
data separate, so I specify different history and incremental files for
each:
usage /husage01.hst /iusage01.inc /lbink01.log /uusage01.bbs /tLine One
usage /husage02.hst /iusage02.inc /lmax02.log /uusage02.bbs /tLine Two
USAGE returns ERRORLEVEL 0 after a successful run. ERRORLEVEL 1 is
returned to indicate an error.
NOTICE: You may use, copy, and distribute this program freely as long
as you insure that both the executable and the documentation (.DOC)
files are included in the distribution package. The source code does
not need to be included. You may modify this program and document, so
long as reasonable credit is given to the original author if a
substantial portion of the original remains intact. The author is not
responsible for any losses which may occur either directly or indirectly
as a result of using this program.
HISTORY:
Version 2.4 (02/04/93) -- Added three new default Binkley search
strings thanks to Walter Anderson.
Version 2.3 (11/10/92) -- Modified the /I file format (again!) so that
file contents are checked against stored
positions. This eliminates the need to worry
about new files being shorter than old ones.
The default is now /IUSAGE.INC. /I with no
parameter will turn off this feature. /H now
defaults to /HUSAGE.HST. /H with no
parameter will turn history off.
Version 2.2 (11/07/92) -- Modified /I file format so that active usage
can be tracked across log boundaries. This
should keep your maintenance period from
showing up as a blank spot on the graph. A
CVTINC utility is included to convert 2.1
format incremental files to the 2.2 format.
Version 2.1 (11/04/92) -- Added the /I parameter to allow incremental
processing of log files. Added a new /V
switch option (volume) to limit screen
output.
Version 2.0 (11/03/92) -- Added the /H parameter to specify a
self-maintaining history file. Added the /S
parameter to specify a file of user-defined
search strings. Added the /D parameter to
specify how many days to include in the
graph. Improved the speed of elapsed time
calculations. Track event times in seconds
instead of minutes. Track total time by
seconds intsead of days. Cleaned up a lot of
messy code. Many of the improvements were
suggested and originally coded by Steve
Antonoff.
Verison 1.9 (10/28/92) -- Skipped.
Version 1.8 (8/28/92) -- Added the /M switch for military time.
Version 1.7 (8/25/92) -- Added the ability to pass multiple-word
parameters using spaces.
Version 1.6 (6/03/92) -- Adjusted graph to start at midnight.
Version 1.5 (5/29/92) -- Improved Binkley support. Added verbose
diagnostic mode.
Version 1.4 (5/27/92) -- Allow custom color selections.
Version 1.3 (5/26/92) -- Removed event and keyboard switches.
Added support for Binkley logs.
Added log file sharing (again).
Version 1.2 (5/14/92) -- Removed log file sharing due to compiler bug.
Version 1.1 (5/13/92) -- Added log file sharing.
Version 1.0 (4/22/92) -- Original release. Written in Borland C.