alscan
alscan is a command-line tool used to extract data from web-server access logs. It creates a report based upon the contents of the logs and the options specified on the command-line.
The tool is released under the Apache 2.0 License.
It is compatible with both the Apache web server’s combined and the common log formats.
The tool is designed for Linux and other Unix-like systems. It may work on other systems, but they are not tested.
Background
The alscan tool was developed based on my experience working for a web hosting company. A recurring task is such companies is diagnose system failures. The web-server access logs are a valuable source of information for such an investigation.
A “one-liner” was a bash pipeline command we were allowed to use to create and pass-on to other admins. The existing text-based tools (grep, awk, comm, etc) are sufficient for simple analysis. The complex parsing required to extact important information complicates the creation of accurate “one-liners”.
Given the need, I decided to create a tool. It would parse one or more access logs, extract the important data, and report on that data. I called it alscan. I wanted it to be easy to install. A single file which could be copied to any linux system we may be investigating. I wrote a program in C++. It compiled to a staticly linked executable. No other installation requirements.
I was told “No one at the company could read C”. My reply that “The tool was in fact written in C++” was not well recieved. No one at the company could review the code, so it was never approved for use. (I was working as an admin, so who would believe I could manage to open a file in read-only mode).
I was told that the only option for a real tool was Perl. But that if I had to, I could use Python. Since my love of Perl knows its bounds I selected Python for the second implementation. I left the company after I submitted it, but before it was approved. I have no idea if it was used or not.
The whole episode reminded me that I love to write software, so I should go back to it. I decided it was time for an Open-Source version of alscan. The current implementation is in JavaScript.
I don’t have a daily need for the tool any longer. I hope someone else find a use for it.
Contribute to this documentation
Feel free to update this content, just click the Improve this page link displayed on bottom right of each page, and pull-request it