home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / httpa133.zip / readme.133 < prev    next >
Text File  |  1996-03-12  |  19KB  |  475 lines

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