Thursday 4 August 2011

Apache Http Access Log Parser



What Is Log Parser?
Log parser is small java applications that parses apache HTTP access log files and creates a corresponding tsv(Tab Seperated Values) file.
It provides an easily readable view of log data.
The generated tsv file can also be imported in a database and queried for analysis purpose




How To Run Log Parser?


2. For windows:
a. Open command prompt (Windowns--> run -->cmd)
b. Go to folder where you have saved logparser.jar
b. Run command java -jar inputFileName (inputFileName is the fully qualified name of log file, for e.g. C:\logs\test-access.log)

  For linux/unix:
a. Go to folder where you have saved logparser.jar
b. Run command java -jar inputFileName (inputFileName is the fully qualified name of log file, for e.g. temp/logs/test-access.log)

3. Output file is generated in output folder inside the folder where logParser.jar was placed. The file is named as httpLog-yyyymmdd.tsv.



Prerequisites To Run The Jar:
1. JRE(min version 1.5) should be installed on the machine and should be added to classpath

or build it from code. Code is located at https://github.com/nehasaxena/log-parser



Please give your feedback. This will help me to improve the log parser.

1 comment:

  1. Very useful. I had to run some response time analysis for a private company which unfortunately lack the proper data analysis tool and your jar just made job more easy. Thank you!

    ReplyDelete