home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
httpa200.zip
/
readme.200
< prev
next >
Wrap
Text File
|
1996-05-01
|
20KB
|
504 lines
HTTPAcc Version 2.00 April, 1996
AB Software
3109 Village Rd West
Norwood, MA 02062-2542
USA
awysocki@bearsoft.com
Current files can always be found at:
http://www.bearsoft.com/abs/httpacc.html
-----------------------------------------------------------------------------
NOTE: This version uses objects from VisPro C development environment. This
is not a problem. But I do have to say the following:
You can freely distribute any executable created with VisPro/C to anyone
without restrictions or royalties. You can distribute the ad-on objects DLLs
freely provided you do wo with a license prohibiting the recipient from copying
(except for backup purposes) an/or transferring the dynamic link libraries.
SO: You can only copy the .DLL files for backup purposes!
-----------------------------------------------------------------------------
If you like the program and want to use it day to day you can get a permenant
registeration by sending $20.00 in US Dollars to AB Software at the above address.
If not then you will need to hit my WEB site every month to get a new registration
code.
=============================================================================
=============================================================================
This is the quick and dirty setup doc for HTTPAcc
=============================================================================
=============================================================================
This program will allow you to reset the OS2HTTPD ACCESS.LOG file
each night. Remember that the LOG will be RESET EACH night.
Currently the unique host list is trashed at each reset. I have no need
to write these hosts out to any file. If you need this list then you can modify
the REXX commands to save them off at change of day.
The first step is the install and setup.
----------------------------------------------------------------------------
INSTALL:
Put the program in the d:\OS2HTTPD\BIN directory, along with the .DLL's.
This should be the standard place to put the file. But it will work in any
directory. For testing purposes you may want to put it somewhere else.
----------------------------------------------------------------------------
Command Line Parameters
-p..... - Specify the path for the Data & INI files
-b# - Turn ON or OFF batch mode (# = 0 or 1)
-a# - Turn ON or OFF AutoScroll mode (#= 0 or 1)
-d--- - Set the mode for Daily Access to be saved (---= YES or NO)
-h#### - Set the number of minutes between running the UPDATE REXX command
can be between 0 and 1441 (same as setting HTMLStats)
-u# - Turn ON or OFF Update mode (#= 0 or 1)
-l# - Turn ON or OFF List Update mode (#= 0 or 1)
xxxxxxxx - The name of the ACCESS.LOG file to process
-s# - Only process for a specific date
-m## - Day of the MONTH to process for specific date
-w## - Day of the DAY to process for specific date
-y## - Day of the YEAR to process for specific date
(for specific date you only need to specify,
the info you want to match. So you can use
-w10 to process any records on the 10 of the
month. All Months, and Years)
Here is an example .CMD file to process old .ACC files. This example went and processed
my old .ACC files to give me monthly stats.
--------------------------------------
FOR %%f in (*.acc) do httpacc %%f -b -a0 -d0 -h1441 -l0 -u0
----------------------------------------------------------------------------
HTTPACC.INI values
You will then need to edit and customize the HTTPACC.INI file (Windows ASCII file)
The keywords you can specify are:
[HTTPAccess]
Debug=
StartUpTime=
WaitTime=
PauseTime=
HTMLStats=
HTMLUpdateCMD=
HTMLFinalCMD=
haTitle=
haUpdateGIF=
haFinalGIF=
haWeeklyGIF=
haURLUpdateGIF=
haURLFinalGIF=
haURLWeeklyGIF=
haUpdateHTML=
haFinalHTML=
haWeeklyHTML=
AutoScroll=
MaxLines=
BatchMode=
DisplayUpdate=
ExitAtDayChange=
ProcessSpecific=
ProcMonth=
ProcDay=
ProcYear=
UpdateList=
DefaultHost=
PoolSize=
[HTTPAccessREXX]
MaxPages=
MaxHosts=
PastDays=
HTMLFileExt=
GRAPHICFileExt=
JAVAFileExt=
ZIPFileExt=
SOUNDFileExt=
CGIFileExt=
CGIDirectory=
IncludeTypes=
[VirtualHost-##] NOTE:## = 1 to 25
Name=
AccessLog=
DailyACC=
DailyACCID=
AutoReset=
YearlyStats=
HTMLStats=
HTMLUpdateCMD=
HTMLFinalCMD=
haTitle=
haUpdateGIF=
haFinalGIF=
haWeeklyGIF=
haURLUpdateGIF=
haURLFinalGIF=
haURLWeeklyGIF=
haUpdateHTML=
haFinalHTML=
haWeeklyHTML=
-----------------------------------------------------------------------------
The following INI entries fall UNDER the heading of [HTTPAccess]
Debug= Set to ON or OFF to log additional information to the HTTPACC.DBG
file. The default is OFF
StartUpTime= The number of miliseconds to wait before the program starts
processing the ACCESS.LOG file. This is useful incase the server crashes,
you may want to let other processes start before his process starts.
The default is set to 60000 (1 Minute)
WaitTime= The number of miliseconds to wait before checking the log again.
This timeout will be used when there are no new lines in the ACCESS.LOG.
You want to try to get this number big. If its too small then the process
will eat up lots of the CPU cycles. The default if not specified is 5000
(5 seconds)
PauseTime= The number of miliseconds to wait between read with data.
If the process finds a new line in the log it will process the line, it will
then wait this PauseTime between reading the next line. The default, if not
specified is 100 (.1 second)
HTMLStats= The number of MINUTES between running the REXX chart.cmd program
For an active server increase this! If set in the [HTTPAccess] section then
its the default for all sites, the individule VirtualHost can override this.
The default is set to 0 OFF
HTMLUpdateCMD= The name of the REXX command to call when the HTMLStats
timer pops. This will be called everytime the stats timer expires
There is no default. If left blank then no update rexx program will be called.
HTMLFinalCMD= The name of the REXX command to call then the END-OF-DAY
expires (flips). This can be the same or different from the UPDATE Rexx
program. There is no default.
AutoScroll= This will allow defaults of the AutoScroll Check box. If you
want scrolling on then set this to On/Yes. The default is On
MaxLines= This is the number of ACCESS.LOG lines to keep on the screen in the
scroll box. The default is 200. I have mine set at 5000.
BatchMode= Set to ON or OFF to allow the program to run the final REXX command
and terminate without operator intervention. Use this to process old or previous
days ACCESS.LOG files. There is also a command line parameter to override this option.
The default is OFF
DisplayUpdate= Set to ON or OFF. This will allow the program to run a little quicker if
you don't need to see updates every log entry. This should only be set to OFF when running
in Batch mode. The default is ON
UpdateList= Set to ON or OFF. This will allow the program to shut off entries into the
scroll list on the screen. If you are running with limited memory, this can save the
machine from keeping a copy of the last 'MaxLines' from the ACCESS.LOG file in memory.
The default is ON.
ExitAtDayChange= Set to Yes or NO. This will cause the program to EXIT at day change, when
it sees a record in the access.log file that is on a new day. This is mainly used in
batch processing where you only want to process one day at a time.
ProcessSpecific= Set to ON or OFF. This tell HTTPAcc to only process records that match
the ProcMonth, ProcDay and ProcYear fields. If the field is not entered all records will
match. So to only process records for the 10 of any month and any year, just set ProcDay=10
ProcMonth=
ProcDay=
ProcYear= Set to the Month, Day and or Year you want to process records for. This will
speed up processing a LARGE ACCESS.LOG file for only 1 day!
PoolSize= The number of 4K blocks of memory to use for the Unique array.
Normally this should not be changed. The default is 100
----------------
[HTTPAccessREXX]
The following INI entries fall UNDER the heading of [HTTPAccessREXX]
MaxPages= The maximum number of pages to export to the REXX program
The default is 25
MaxHosts= The maximum number of top hosts to export to the REXX program
The default is 25
PastDays= The number of past days to show when creating the GIF file for stats. This
information is passed to the REXX FINAL program to process.
The default is 24
==================================
This next few variables define the file types by extension of the file
The list can contain up to 256 characters all seperated by ',' WITHOUT
any blank characters between the commas and file ext type. Unless of course
there should be!
==================================
HTMLFileExt= These extension types are considered HTML files. Seperate the
types by commas ',' Default=.html,.htm,.shtml,.sht
GRAPHICFileExt= Default .gif,.jpg,.jpeg
JAVAFileExt= Default .class,.java,.font
ZIPFileExt= Default .zip,.Z
SOUNDFileExt= Default .wav,.au
CGIFileExt= Default .exe,.cmd
CGIDirectory= Default /cgi-bin/
IncludeTypes= The type of files to include in the TOP ## list when exporting to
the rexx program Currently the following types are valid
DIRECTORY,HTML,GRAPHICS,CGI,JAVA,ZIP,OTHER
OTHER is the default if the file doesn't match any of the other file types.
----------------
[VirtualHost-##]
## = The number of the virtual host, It must start with 1 and go upto and
including 25.
Name= The name of this virtual host. This name is used in the pull down box on
the main screen. There is NO default
AccessLog= This is the full path and file name of the access log. There
is NO DEFAULT so this *MUST* be specified. You should use something like,
d:\os2httpd\logs\access.log
DailyACC= You can shut off the copy of the ACCESS.LOG file to .ACC file
The default is YES
DailyACCID= The ID of this Virtual Host. This can be anthing from 1 character to
n characters. It is used as an EXTENSION to the files it creates for the
Virtual HOST so for FAT systems you can only use from 1 to 3 characters.
There is NO default.
AutoReset= Set to Yes or No. If set to YES then at the change of the day
the ACCESS.LOG file will be reset. The default is Yes.
YearlyStats= Set to YES or NO. To save daily stats in the HA####.DailyACCID
file. The default is
HTMLStats= The number of MINUTES between running the REXX chart.cmd program
For an active server increase this! If set in the [HTTPAccess] section then
its the default for all sites, the individule VirtualHost can override this.
The default is set to 0 OFF
HTMLUpdateCMD= The name of the REXX command to call when the HTMLStats
timer pops. This will be called everytime the stats timer expires
There is no default. If left blank then no update rexx program will be called.
HTMLFinalCMD= The name of the REXX command to call then the END-OF-DAY
expires (flips). This can be the same or different from the UPDATE Rexx
program. There is no default.
haTitle= Title for the HTML Page
haUpdateGIF= The name of the Update GIF file
haFinalGIF= The name of the FINAL stats for the day GIF file
haWeeklyGIF= The name of the last # of days GIF file
haURLUpdateGIF= The name of the Update GIF file for the HTML
haURLFinalGIF= The name of the FINAL stats for the day GIF file for the HTML
haURLWeeklyGIF= The name of the last # of days stats for the GIF file for the HTML
haUpdateHTML= The name of the HTML file for updates
haFinalHTML= The name of the HTML file for the final stats
haWeeklyHTML= The name of the HTML file for the weekly stats (currently not used)
----------------------------------------------------------------------------
Daily file
This is a copy of the ACCESS.LOG file, any records that are processed
are put in this file. Its a Daily copy of the ACCESS.LOG file, only records
for that day are placed in this file. This can be turned off if you don't
want to keep the daily log files, you would do this by setting DailyACC=OFF
in the .INI file
yymmmdd.xxx
yy = Two digit year
mmm = Alpha month (Jan, Feb, Mar, Apr...)
dd = Two digit month
xxx = DailyACCID The value put in the DailyACCID INI variable
---------------------------------------------------------------------------
REXX Variables
When the REXX program that is called to process the stats the following
variables are available to be used. Note the REXX programs are called
by HTTPAcc depending on the time specified by HTMLStat= variable in the
.INI file. You do not need to call the rexx program, httpacc will. And
when the programs are called the following variables will be set in the
REXX variable pool. So you can just reference them from your rexx
program.
haRequests. - STEM variable of hourly requests 1-24
haMaxRequests - Highest request number per hour
haMaxRequestsIndex - Which hour had the highest requests
haUnique. - STEM variable of hourly unique hosts 1-24
haMaxUnique - Hightest unique host count per hour
haMaxUniqueIndex - Which hour had the hightest count of unique hosts
haTotalMinutes - Total minutes running
haHour - Total Hours Running in hh:mm format
haMinute - Total minutes running in hh:mm format
haStartHour - Start hour
haStartMin - Start minute
haMon - Month (Jan, Feb...)
haDay - Day 1, 2, 3, ...
haYear - Year 1995, ...
haDOW - Day of the Week
haJulian - Julian Date
haJulianYear - Julian Date for the year 1-366
haTopHostsCnt - The number of hosts in the list This will never
be greater than MaxPages as set in the .INI file
haTopHosts.Str. - STEM variable with list of top hosts
haTopHosts.Cnt. - STEM variable with list of top hosts - counts
haTopPagesCnt - The number of pages in the list
haTopPages.Str. - STEM variable of top page hits
haTopPages.Cnt. - STEM variable of top page hits - counts
haHTMLReq - Total number of HTML request
haNonHTMLReq - Total number of NON HTML requests
haScriptReq - Total number of CGI/Script requests
haMalformedReq - Total number of malformed requests
haTotalBytes - Total number of bytes sent
haYearStats.0 - the same as PastDays in the .INI file
haYearStats.TotalHosts. - Total number of unique hosts for that day
haYearStats.TotalDocs. - Total number of unique documents for that day
haYearStats.TotalReqs. - Total number of requests for that day
haYearStats.TotalMinutes. - Total number of minutes of process time for that day
haYearStats.TotalBytes. - Total number of bytes sent for that day
haYearStats.Mon. - Month for that date
haYearStats.Day. - Days for the date
haYearStats.Year. - Year for the Date
These variables are defined from the .INI file
haTitle - Title
haFinalGIF - FinalGIF
haUpdateGIF - UpdateGIF
haURLFinalGIF - FinalGIF
haURLUpdateGIF - UpdateGIF
haFinalHTML - FinalHTML
haUpdateHTML - UpdateHTML
---------------------------------------------------------------------------
REXX functions
HTTPAccLoadINI -
Read in an INI file and set the same REXX variable
There are three ways to call the function, with 1 to 3 parameters.
rc = HTTPAccLoadIni('ANDY')
- Will load Variable ANDY from under [HTTPAccessREXX] Section
in the HTTPAcc.INI file. The REXX variable will be called ANDY
rc = HTTPAccLoadIni('ANDY', '[TEST]')
- Will load Variable ANDY from under [TEST] Section
in the HTTPAcc.INI file
rc = HTTPAccLoadIni('ANDY', '[TEST]', 'C:\OS2HTTPD\BIN\ANDY.INI')
- Will load Variable ANDY from under [TEST] Section
in the ANDY.INI file
---------------------------------------------------------------------------
TRUNK.EXE -
This program will allow you to reset the .LOG files that are opened
by OS2HTTPD or AB Software's HTTPd.EXE. You can use this in a CMD or REXX
program to automatically reset the logs Nightly or weekly.
To use the program
TRUNK ACCESS.LOG
For program help type
TRUNK ?
---------------------------------------------------------------------------
Version 2.00 - New Features (April 1996)
- Added support for Virtual Hosts Up to 25 different LOG files can
be processed at the same time.
- Totals as to the Number of File Requests, CGI scripts.
and 300,400, and 500 errors. 300's are just info requests where
the browser requests the file date, time and size from the server
if the browser has a copy then no file is transferred and the current
file in the browser cache is used.
- Cleaned up the Rexx processing, Only process REXX at the end of
processing all old records from the LOG file. This saves time
and processing speed.
- Seperated the Display of data from the Process Thread. No more CLOCK.
- Reformatted display screen.
- You must get a registered KEY or a monthly key to use the product.
Version 1.33 - Fixes & Features (March 1996)
- Added support to exclude files from the TOP ## list
- Fixed a bug where the machine would lock up if in
BATCH Mode, and there was no data in the ACCESS.LOG file
Version 1.32 - Fixes & Features (Feb 1996)
- added Command line parms for Exit after date change.
- added command line parms & INI variables to specify
a specific date to process out of the ACCESS.LOG file.
- added more support for BATCH Processing
- You can now specify where the DATA and .INI files will stay
- Specify the yearly data file name
- Added TRUNK.EXE to Truncate any of the files (ACCESS.LOG, ERROR.LOG...)
Version 1.31 - (Internal release for AB Software)
Version 1.30 - Fixes (Nov 1995)
- Added in Day of the Week code 'haDOW'
- added support for BATCH Processing
- added support for command line parms to override .INI file
- Store yearly stats by hour/day/year in 'HA19xx.STA' file
- Allow for Read of INI from from REXX
- New last 24 day stats
- Updated Chart to include Unique documents/hour
- Updated Charts to include last 24 days of of processing
Version 1.21 - Fixes (Nov 1995)
- Added in the code to support DailyACC .INI variable
- Added Time stamp for Status Line
Version 1.20 - Changes (Oct 1995)
- Added in HTML graphs (.GIF)
- New output options for Weekly & Monthly stats
- Added top ### list of documents and hosts
- Removed auto HTML report of stats, moved to a REXX function.
so you can customize the output to what you want!!
Version 1.11 - Changes
- Fixed bug in calculations of Hourly and Minute requests on the STATS.HTML
page
Version 1.10 - Changes
- Removed KeepLogs= variable from INI file, now all output logs will be
created using yymmmdd.ACC where yy=year, mmm=Jan, Feb..., and dd=Day 01..
- Added in Charting of accesses per hour
- Added in support for HTML stats output
- Added in support for unique hosts counts
- reformatted screen
-------------------
--- end of file ---
-------------------