[Info-vax] Apache Logfiles Analyzer in DCL requested

DTL didier.morandi at gmail.com
Fri May 4 02:23:16 EDT 2012


Le mercredi 2 mai 2012 21:34:24 UTC+2, Martin Vorlaender a écrit :
> DTL wrote:

> > These Guys are not former DECcies... Maybe former M$ ? :-)
> 
> Nope. This guy (with a little help from my friends) did it all himself.
I dream...
Martin, I am very sorry, I id not know that *you* were the porting Guy. Please accept my "honestest" apologies.

FYI, the error message of the IVP was:

%HTDIG_IVP-E-UNEXPECTED, unexpected data
-HTDIG_IVP-I, expected /htmerge: 300:amount              /
-HTDIG_IVP-I, got      /htmerge: 300:amongst              /

Anyway, I had a deep look at the tool, and this is not what I was looking for, so I wrote my own tool, in DCL. Version 2 has been released internally :-)
Name is APLOANA, runs under VMS for the moment, will be converted to php
Here is description:

<pre>
$!+
$! APLOANA.COM
$! Yet another Apache Log Analyzer.
$! This procedure performs an Apache logfile analysis, then generates a written report sorted on
$! status codes and timestamp, both descending. A version 2 will display statistics.
$! If a given status is supplied as an input parameter, the listing shows on the screen.
$! If all status are to be processed, there is no output but a report.
$!
$! Typical log entry looks like this (best viewed with 132 col. width display):
$!
$! 93.88.241.183 - - [29/Apr/2012:00:03:57 +0200] "GET /piscine/1002.html HTTP/1.0" 200 2954
$! "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
$!
$! token labelled below:
$! host / identd / user / tStamp / request (double quotes enclosed) / status / size / referrer / agent
$!
$! Inputs
$! ======
$! P1 : raw web log file / required
$! P2 : status code to be analyzed / optional. Default = all but 200
$! P3 : B = Brief / V = Verbose mode report / optional (default B)
$! P4 : S = enable Statistics report / optional (added in v2)
$! P5 : D = debug mode / optional
$!
$! Outputs
$! =======
$! All files below in SYS$LOGIN directory
$! 1° Text file HTTP_STATUS_CODES.DAT if missing (RFC 2616 & WebDAV)
$! 2° Text file APLOANA_REPORT.TEMP (deleted at end of processing)
$! 3° Text file APLOANA_REPORT.TXT (analysis result)
$! 4° Text file APLOANA_STATISTICS.TEMP (deleted at end of processing)
$! 5° Text file APLOANA_STATISTICS.TXT (statistics analysis result)
$!
$! Side Effects
$! ============
$! User terminal turned to 132 columns width.
$!
$! Revision History
$! ================
$!  v1.0-0   01-MAY-2012 DTL creation 
$v="v2.0-0" !03-MAY-2012 DTL add stats
$!-
</pre>

Sample REPORT file:

<pre>
APLOANA Report from    HTTP_20120504072802.LOG on  4-MAY-2012 07:29:29.47
File was created on  :  4-MAY-2012 07:28:01.97
First entry is dated : 02/May/2012:00:02:04 +0200
Last entry is dated  : 02/May/2012:23:58:11 +0200
Analysis performed on: all HTTP statuses but 200
Nr of records in file: 1261
Command line         : @aploana HTTP_20120504072802.LOG * B S
---+----------------------+---------------------------------...---------------
Sts Timestamp              Request                             Host
---+----------------------+---------------------------------...---------------
301|2012-05-02 12:35:11.00|GET /DTL_Conseil//presentation_AS.htm|66.249.72.205
304|2012-05-02 04:38:19.00|GET /DTL_Conseil/documents/WASC-TC-v2_0.pdf|66.249.72.205
../..
</pre>

Sample STATISTICS file:

<pre>
APLOANA Report from     HTTP_20120504072802.LOG on  4-MAY-2012 07:29:54.12
File was created on   :  4-MAY-2012 07:28:01.97
First entry is dated  : 02/May/2012:00:02:04 +0200
Last entry is dated   : 02/May/2012:23:58:11 +0200
Analysis performed on : all HTTP statuses
Nr of records in file : 1261
Nr of favicons skipped: 12
Command line          : @aploana HTTP_20120504072802.LOG * B S
--------------------------------------------------------------------------------
100 : 0       101 : 0       102 : 0       118 : 0

200 : 1199    201 : 0       202 : 0       203 : 0       204 : 0       205 : 0
206 : 0       207 : 0       208 : 0       210 : 0       226 : 0

300 : 0       301 : 1       302 : 0       303 : 0       304 : 13      305 : 0
306 : 0       307 : 0       308 : 0       310 : 0

400 : 0       401 : 0       402 : 0       403 : 0       404 : 36      405 : 0
406 : 0       407 : 0       408 : 0       409 : 0       410 : 0       411 : 0
412 : 0       413 : 0       414 : 0       415 : 0       416 : 0       417 : 0
418 : 0       420 : 0       422 : 0       423 : 0       424 : 0       425 : 0
426 : 0       428 : 0       429 : 0       431 : 0       444 : 0       449 : 0
450 : 0       499 : 0

500 : 0       501 : 0       502 : 0       503 : 0       504 : 0       505 : 0
506 : 0       507 : 0       508 : 0       509 : 0       510 : 0       511 : 0
598 : 0       599 : 0
--------------------------------------------------------------------------------
[File SYS$LOGIN:APLOANA_STATISTICS.TXT was generated by APLOANA.COM v2.0-0]
</pre>

Patent pending :-)



More information about the Info-vax mailing list