home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / httpa200.zip / readme.200 < prev    next >
Text File  |  1996-05-01  |  20KB  |  504 lines

  1. HTTPAcc Version 2.00 April, 1996
  2.  
  3. AB Software
  4. 3109 Village Rd West
  5. Norwood, MA 02062-2542
  6. USA
  7.  
  8. awysocki@bearsoft.com
  9. Current files can always be found at:
  10.  
  11. http://www.bearsoft.com/abs/httpacc.html
  12. -----------------------------------------------------------------------------
  13. NOTE: This version uses objects from VisPro C development environment.  This
  14. is not a problem.  But I do have to say the following:
  15.  
  16. You can freely distribute any executable created with VisPro/C to anyone
  17. without restrictions or royalties.  You can distribute the ad-on objects DLLs
  18. freely provided you do wo with a license prohibiting the recipient from copying
  19. (except for backup purposes) an/or transferring the dynamic link libraries.
  20.  
  21.  
  22. SO: You can only copy the .DLL files for backup purposes!
  23. -----------------------------------------------------------------------------
  24.  
  25. If you like the program and want to use it day to day you can get a permenant
  26. registeration by sending $20.00 in US Dollars to AB Software at the above address.
  27. If not then you will need to hit my WEB site every month to get a new registration
  28. code.
  29.  
  30.  
  31. =============================================================================
  32. =============================================================================
  33. This is the quick and dirty setup doc for HTTPAcc
  34. =============================================================================
  35. =============================================================================
  36.  
  37. This program will allow you to reset the OS2HTTPD ACCESS.LOG file
  38. each night.  Remember that the LOG will be RESET EACH night.
  39.  
  40. Currently the unique host list is trashed at each reset.  I have no need
  41. to write these hosts out to any file.  If you need this list then you can modify
  42. the REXX commands to save them off at change of day.
  43.  
  44. The first step is the install and setup.
  45.  
  46. ----------------------------------------------------------------------------
  47. INSTALL:
  48.  
  49.   Put the program in the d:\OS2HTTPD\BIN directory, along with the .DLL's.
  50. This should be the standard place to put the file.  But it will work in any
  51. directory.  For testing purposes you may want to put it somewhere else.
  52.  
  53.  
  54. ----------------------------------------------------------------------------
  55. Command Line Parameters
  56.  
  57. -p.....         - Specify the path for the Data & INI files
  58. -b#             - Turn ON or OFF batch mode (# = 0 or 1)
  59. -a#             - Turn ON or OFF AutoScroll mode (#= 0 or 1)
  60. -d---           - Set the mode for Daily Access to be saved (---= YES or NO)
  61. -h####          - Set the number of minutes between running the UPDATE REXX command
  62.                   can be between 0 and 1441 (same as setting HTMLStats)
  63. -u#             - Turn ON or OFF Update mode (#= 0 or 1)
  64. -l#             - Turn ON or OFF List Update mode (#= 0 or 1)
  65. xxxxxxxx        - The name of the ACCESS.LOG file to process
  66. -s#             - Only process for a specific date
  67. -m##            - Day of the MONTH to process for specific date
  68. -w##            - Day of the DAY   to process for specific date
  69. -y##            - Day of the YEAR  to process for specific date
  70.                   (for specific date you only need to specify,
  71.                    the info you want to match.  So you can use
  72.                    -w10 to process any records on the 10 of the
  73.                    month.  All Months, and Years)
  74.  
  75. Here is an example .CMD file to process old .ACC files.  This example went and processed
  76. my old .ACC files to give me monthly stats.
  77. --------------------------------------
  78.  
  79. FOR %%f in (*.acc) do httpacc %%f -b -a0 -d0 -h1441 -l0 -u0
  80.  
  81.  
  82.  
  83. ----------------------------------------------------------------------------
  84. HTTPACC.INI values
  85. You will then need to edit and customize the HTTPACC.INI file (Windows ASCII file)
  86. The keywords you can specify are:
  87.  
  88. [HTTPAccess]
  89.    Debug=
  90.    StartUpTime=
  91.    WaitTime=
  92.    PauseTime=
  93.  
  94.    HTMLStats=
  95.    HTMLUpdateCMD=
  96.    HTMLFinalCMD=
  97.    haTitle=
  98.    haUpdateGIF=
  99.    haFinalGIF=
  100.    haWeeklyGIF=
  101.    haURLUpdateGIF=
  102.    haURLFinalGIF=
  103.    haURLWeeklyGIF=
  104.    haUpdateHTML=
  105.    haFinalHTML=
  106.    haWeeklyHTML=
  107.  
  108.    AutoScroll=
  109.    MaxLines=
  110.    BatchMode=
  111.    DisplayUpdate=
  112.    ExitAtDayChange=
  113.    ProcessSpecific=
  114.    ProcMonth=
  115.    ProcDay=
  116.    ProcYear=
  117.    UpdateList=
  118.    DefaultHost=
  119.    PoolSize=
  120.  
  121. [HTTPAccessREXX]
  122.    MaxPages=
  123.    MaxHosts=
  124.    PastDays=
  125.    HTMLFileExt=
  126.    GRAPHICFileExt=
  127.    JAVAFileExt=
  128.    ZIPFileExt=
  129.    SOUNDFileExt=
  130.    CGIFileExt=
  131.    CGIDirectory=
  132.    IncludeTypes=
  133.  
  134. [VirtualHost-##]           NOTE:## = 1 to 25
  135.    Name=
  136.    AccessLog=
  137.    DailyACC=
  138.    DailyACCID=
  139.    AutoReset=
  140.    YearlyStats=
  141.    HTMLStats=
  142.    HTMLUpdateCMD=
  143.    HTMLFinalCMD=
  144.    haTitle=
  145.    haUpdateGIF=
  146.    haFinalGIF=
  147.    haWeeklyGIF=
  148.    haURLUpdateGIF=
  149.    haURLFinalGIF=
  150.    haURLWeeklyGIF=
  151.    haUpdateHTML=
  152.    haFinalHTML=
  153.    haWeeklyHTML=
  154.  
  155. -----------------------------------------------------------------------------
  156. The following INI entries fall UNDER the heading of [HTTPAccess]
  157.  
  158. Debug= Set to ON or OFF to log additional information to the HTTPACC.DBG
  159. file. The default is OFF
  160.  
  161. StartUpTime= The number of miliseconds to wait before the program starts
  162. processing the ACCESS.LOG file.  This is useful incase the server crashes,
  163. you may want to let other processes start before his process starts.
  164. The default is set to 60000 (1 Minute)
  165.  
  166. WaitTime= The number of miliseconds to wait before checking the log again.
  167. This timeout will be used when there are no new lines in the ACCESS.LOG.
  168. You want to try to get this number big.  If its too small then the process
  169. will eat up lots of the CPU cycles.  The default if not specified is 5000
  170. (5 seconds)
  171.  
  172. PauseTime= The number of miliseconds to wait between read with data.
  173. If the process finds a new line in the log it will process the line, it will
  174. then wait this PauseTime between reading the next line.  The default, if not
  175. specified is 100 (.1 second)
  176.  
  177. HTMLStats= The number of MINUTES between running the REXX chart.cmd program
  178. For an active server increase this!  If set in the [HTTPAccess] section then
  179. its the default for all sites, the individule VirtualHost can override this.
  180. The default is set to 0 OFF
  181.  
  182. HTMLUpdateCMD= The name of the REXX command to call when the HTMLStats
  183. timer pops.  This will be called everytime the stats timer expires
  184. There is no default.  If left blank then no update rexx program will be called.
  185.  
  186. HTMLFinalCMD= The name of the REXX command to call then the END-OF-DAY
  187. expires (flips).  This can be the same or different from the UPDATE Rexx
  188. program.  There is no default.
  189.  
  190. AutoScroll= This will allow defaults of the AutoScroll Check box.  If you
  191. want scrolling on then set this to On/Yes.  The default is On
  192.  
  193. MaxLines= This is the number of ACCESS.LOG lines to keep on the screen in the
  194. scroll box.  The default is 200.  I have mine set at 5000.
  195.  
  196. BatchMode= Set to ON or OFF to allow the program to run the final REXX command
  197. and terminate without operator intervention.  Use this to process old or previous
  198. days ACCESS.LOG files.  There is also a command line parameter to override this option.
  199. The default is OFF
  200.  
  201. DisplayUpdate= Set to ON or OFF.  This will allow the program to run a little quicker if
  202. you don't need to see updates every log entry.  This should only be set to OFF when running
  203. in Batch mode.  The default is ON
  204.  
  205. UpdateList= Set to ON or OFF.  This will allow the program to shut off entries into the
  206. scroll list on the screen.  If you are running with limited memory, this can save the
  207. machine from keeping a copy of the last 'MaxLines' from the ACCESS.LOG file in memory.
  208. The default is ON.
  209.  
  210. ExitAtDayChange= Set to Yes or NO.  This will cause the program to EXIT at day change, when
  211. it sees a record in the access.log file that is on a new day.  This is mainly used in
  212. batch processing where you only want to process one day at a time.
  213.  
  214. ProcessSpecific= Set to ON or OFF.  This tell HTTPAcc to only process records that match
  215. the ProcMonth, ProcDay and ProcYear fields.  If the field is not entered all records will
  216. match.  So to only process records for the 10 of any month and any year, just set ProcDay=10
  217.  
  218. ProcMonth=
  219. ProcDay=
  220. ProcYear=  Set to the Month, Day and or Year you want to process records for.  This will
  221. speed up processing a LARGE ACCESS.LOG file for only 1 day!
  222.  
  223. PoolSize= The number of 4K blocks of memory to use for the Unique array.
  224. Normally this should not be changed.  The default is 100
  225.  
  226. ----------------
  227. [HTTPAccessREXX]
  228. The following INI entries fall UNDER the heading of [HTTPAccessREXX]
  229.  
  230. MaxPages= The maximum number of pages to export to the REXX program
  231. The default is 25
  232.  
  233. MaxHosts= The maximum number of top hosts to export to the REXX program
  234. The default is 25
  235.  
  236. PastDays= The number of past days to show when creating the GIF file for stats. This
  237. information is passed to the REXX FINAL program to process.
  238. The default is 24
  239.  
  240. ==================================
  241. This next few variables define the file types by extension of the file
  242. The list can contain up to 256 characters all seperated by ',' WITHOUT
  243. any blank characters between the commas and file ext type.  Unless of course
  244. there should be!
  245. ==================================
  246. HTMLFileExt= These extension types are considered HTML files.  Seperate the
  247. types by commas ','  Default=.html,.htm,.shtml,.sht
  248.  
  249. GRAPHICFileExt= Default .gif,.jpg,.jpeg
  250. JAVAFileExt= Default .class,.java,.font
  251. ZIPFileExt= Default .zip,.Z
  252. SOUNDFileExt= Default .wav,.au
  253. CGIFileExt= Default .exe,.cmd
  254. CGIDirectory= Default /cgi-bin/
  255.  
  256. IncludeTypes= The type of files to include in the TOP ## list when exporting to
  257. the rexx program  Currently the following types are valid
  258.   DIRECTORY,HTML,GRAPHICS,CGI,JAVA,ZIP,OTHER
  259.  
  260. OTHER is the default if the file doesn't match any of the other file types.
  261.  
  262.  
  263. ----------------
  264. [VirtualHost-##]
  265. ## = The number of the virtual host,  It must start with 1 and go upto and
  266. including 25.
  267.  
  268. Name= The name of this virtual host.  This name is used in the pull down box on
  269. the main screen.  There is NO default
  270.  
  271. AccessLog= This is the full path and file name of the access log.  There
  272. is NO DEFAULT so this *MUST* be specified.  You should use something like,
  273. d:\os2httpd\logs\access.log
  274.  
  275. DailyACC= You can shut off the copy of the ACCESS.LOG file to .ACC file
  276. The default is YES
  277.  
  278. DailyACCID= The ID of this Virtual Host. This can be anthing from 1 character to
  279. n characters.  It is used as an EXTENSION to the files it creates for the
  280. Virtual HOST so for FAT systems you can only use from 1 to 3 characters.
  281. There is NO default.
  282.  
  283. AutoReset= Set to Yes or No.  If set to YES then at the change of the day
  284. the ACCESS.LOG file will be reset.  The default is Yes.
  285.  
  286. YearlyStats= Set to YES or NO.  To save daily stats in the HA####.DailyACCID
  287. file.  The default is
  288.  
  289. HTMLStats= The number of MINUTES between running the REXX chart.cmd program
  290. For an active server increase this!  If set in the [HTTPAccess] section then
  291. its the default for all sites, the individule VirtualHost can override this.
  292. The default is set to 0 OFF
  293.  
  294. HTMLUpdateCMD= The name of the REXX command to call when the HTMLStats
  295. timer pops.  This will be called everytime the stats timer expires
  296. There is no default.  If left blank then no update rexx program will be called.
  297.  
  298. HTMLFinalCMD= The name of the REXX command to call then the END-OF-DAY
  299. expires (flips).  This can be the same or different from the UPDATE Rexx
  300. program.  There is no default.
  301.  
  302. haTitle= Title for the HTML Page
  303.  
  304. haUpdateGIF= The name of the Update GIF file
  305. haFinalGIF= The name of the FINAL stats for the day GIF file
  306. haWeeklyGIF= The name of the last # of days GIF file
  307. haURLUpdateGIF= The name of the Update GIF file for the HTML
  308. haURLFinalGIF= The name of the FINAL stats for the day GIF file for the HTML
  309. haURLWeeklyGIF= The name of the last # of days stats for the GIF file for the HTML
  310.  
  311. haUpdateHTML= The name of the HTML file for updates
  312. haFinalHTML= The name of the HTML file for the final stats
  313. haWeeklyHTML= The name of the HTML file for the weekly stats (currently not used)
  314.  
  315.  
  316.  
  317. ----------------------------------------------------------------------------
  318. Daily file
  319.   This is a copy of the ACCESS.LOG file, any records that are processed
  320. are put in this file.  Its a Daily copy of the ACCESS.LOG file, only records
  321. for that day are placed in this file.  This can be turned off if you don't
  322. want to keep the daily log files, you would do this by setting DailyACC=OFF
  323. in the .INI file
  324.  
  325.  
  326. yymmmdd.xxx
  327. yy  = Two digit year
  328. mmm = Alpha month (Jan, Feb, Mar, Apr...)
  329. dd  = Two digit month
  330. xxx = DailyACCID The value put in the DailyACCID INI variable
  331.  
  332.  
  333. ---------------------------------------------------------------------------
  334. REXX Variables
  335.  
  336. When the REXX program that is called to process the stats the following
  337. variables are available to be used.  Note the REXX programs are called
  338. by HTTPAcc depending on the time specified by HTMLStat= variable in the
  339. .INI file.  You do not need to call the rexx program, httpacc will.  And
  340. when the programs are called the following variables will be set in the
  341. REXX variable pool.  So you can just reference them from your rexx
  342. program.
  343.  
  344.   haRequests.           - STEM variable of hourly requests 1-24
  345.   haMaxRequests         - Highest request number per hour
  346.   haMaxRequestsIndex    - Which hour had the highest requests
  347.   haUnique.             - STEM variable of hourly unique hosts 1-24
  348.   haMaxUnique           - Hightest unique host count per hour
  349.   haMaxUniqueIndex      - Which hour had the hightest count of unique hosts
  350.  
  351.   haTotalMinutes        - Total minutes running
  352.   haHour                - Total Hours Running in hh:mm format
  353.   haMinute              - Total minutes running in hh:mm format
  354.   haStartHour           - Start hour
  355.   haStartMin            - Start minute
  356.   haMon                 - Month (Jan, Feb...)
  357.   haDay                 - Day 1, 2, 3, ...
  358.   haYear                - Year 1995, ...
  359.   haDOW                 - Day of the Week
  360.   haJulian              - Julian Date
  361.   haJulianYear          - Julian Date for the year 1-366
  362.  
  363.   haTopHostsCnt         - The number of hosts in the list  This will never
  364.                            be greater than MaxPages as set in the .INI file
  365.   haTopHosts.Str.       - STEM variable with list of top hosts
  366.   haTopHosts.Cnt.       - STEM variable with list of top hosts - counts
  367.  
  368.   haTopPagesCnt         - The number of pages in the list
  369.   haTopPages.Str.       - STEM variable of top page hits
  370.   haTopPages.Cnt.       - STEM variable of top page hits - counts
  371.  
  372.   haHTMLReq             - Total number of HTML request
  373.   haNonHTMLReq          - Total number of NON HTML requests
  374.   haScriptReq           - Total number of CGI/Script requests
  375.   haMalformedReq        - Total number of malformed requests
  376.   haTotalBytes          - Total number of bytes sent
  377.  
  378.   haYearStats.0         - the same as PastDays in the .INI file
  379.   haYearStats.TotalHosts. - Total number of unique hosts for that day
  380.   haYearStats.TotalDocs.  - Total number of unique documents for that day
  381.   haYearStats.TotalReqs.  - Total number of requests for that day
  382.   haYearStats.TotalMinutes.  - Total number of minutes of process time for that day
  383.   haYearStats.TotalBytes. - Total number of bytes sent for that day
  384.   haYearStats.Mon.        - Month for that date
  385.   haYearStats.Day.        - Days for the date
  386.   haYearStats.Year.       - Year for the Date
  387.  
  388.                 These variables are defined from the .INI file
  389.   haTitle               - Title
  390.   haFinalGIF            - FinalGIF
  391.   haUpdateGIF           - UpdateGIF
  392.   haURLFinalGIF         - FinalGIF
  393.   haURLUpdateGIF        - UpdateGIF
  394.   haFinalHTML           - FinalHTML
  395.   haUpdateHTML          - UpdateHTML
  396.  
  397.  
  398. ---------------------------------------------------------------------------
  399. REXX functions
  400. HTTPAccLoadINI -
  401.   Read in an INI file and set the same REXX variable
  402. There are three ways to call the function, with 1 to 3 parameters.
  403.  
  404.  rc = HTTPAccLoadIni('ANDY')
  405.         - Will load Variable ANDY from under [HTTPAccessREXX] Section
  406.           in the HTTPAcc.INI file.  The REXX variable will be called ANDY
  407.  
  408.  
  409.  rc = HTTPAccLoadIni('ANDY', '[TEST]')
  410.         - Will load Variable ANDY from under [TEST] Section
  411.           in the HTTPAcc.INI file
  412.  
  413.  
  414.  rc = HTTPAccLoadIni('ANDY', '[TEST]', 'C:\OS2HTTPD\BIN\ANDY.INI')
  415.         - Will load Variable ANDY from under [TEST] Section
  416.           in the ANDY.INI file
  417.  
  418.  
  419. ---------------------------------------------------------------------------
  420. TRUNK.EXE -
  421.   This program will allow you to reset the .LOG files that are opened
  422. by OS2HTTPD or AB Software's HTTPd.EXE.  You can use this in a CMD or REXX
  423. program to automatically reset the logs Nightly or weekly.
  424.  
  425. To use the program
  426.  
  427.   TRUNK ACCESS.LOG
  428.  
  429. For program help type
  430.  
  431.   TRUNK ?
  432.  
  433.  
  434. ---------------------------------------------------------------------------
  435. Version 2.00 - New Features (April 1996)
  436.    - Added support for Virtual Hosts Up to 25 different LOG files can
  437.      be processed at the same time.
  438.    - Totals as to the Number of File Requests, CGI scripts.
  439.      and 300,400, and 500 errors.  300's are just info requests where
  440.      the browser requests the file date, time and size from the server
  441.      if the browser has a copy then no file is transferred and the current
  442.      file in the browser cache is used.
  443.    - Cleaned up the Rexx processing,  Only process REXX at the end of
  444.      processing all old records from the LOG file.  This saves time
  445.      and processing speed.
  446.    - Seperated the Display of data from the Process Thread.  No more CLOCK.
  447.    - Reformatted display screen.
  448.    - You must get a registered KEY or a monthly key to use the product.
  449.  
  450. Version 1.33 - Fixes & Features (March 1996)
  451.   - Added support to exclude files from the TOP ## list
  452.   - Fixed a bug where the machine would lock up if in
  453.     BATCH Mode, and there was no data in the ACCESS.LOG file
  454.  
  455. Version 1.32 - Fixes & Features (Feb 1996)
  456.   - added Command line parms for Exit after date change.
  457.   - added command line parms & INI variables to specify
  458.     a specific date to process out of the ACCESS.LOG file.
  459.   - added more support for BATCH Processing
  460.   - You can now specify where the DATA and .INI files will stay
  461.   - Specify the yearly data file name
  462.   - Added TRUNK.EXE to Truncate any of the files (ACCESS.LOG, ERROR.LOG...)
  463.  
  464. Version 1.31 - (Internal release for AB Software)
  465.  
  466.  
  467. Version 1.30 - Fixes (Nov 1995)
  468.   - Added in Day of the Week code 'haDOW'
  469.   - added support for BATCH Processing
  470.   - added support for command line parms to override .INI file
  471.   - Store yearly stats by hour/day/year in 'HA19xx.STA' file
  472.   - Allow for Read of INI from from REXX
  473.   - New last 24 day stats
  474.   - Updated Chart to include Unique documents/hour
  475.   - Updated Charts to include last 24 days of of processing
  476.  
  477.  
  478. Version 1.21 - Fixes (Nov 1995)
  479.   - Added in the code to support DailyACC .INI variable
  480.   - Added Time stamp for Status Line
  481.  
  482. Version 1.20 - Changes (Oct 1995)
  483.   - Added in HTML graphs (.GIF)
  484.   - New output options for Weekly & Monthly stats
  485.   - Added top ### list of documents and hosts
  486.   - Removed auto HTML report of stats,  moved to a REXX function.
  487.     so you can customize the output to what you want!!
  488.  
  489. Version 1.11 - Changes
  490.   - Fixed bug in calculations of Hourly and Minute requests on the STATS.HTML
  491.     page
  492.  
  493. Version 1.10 - Changes
  494.   - Removed KeepLogs= variable from INI file, now all output logs will be
  495.     created using yymmmdd.ACC where yy=year, mmm=Jan, Feb..., and dd=Day 01..
  496.   - Added in Charting of accesses per hour
  497.   - Added in support for HTML stats output
  498.   - Added in support for unique hosts counts
  499.   - reformatted screen
  500.  
  501. -------------------
  502. --- end of file ---
  503. -------------------
  504.