This project was made for the third year undergraduate course "Operating Systems" of the Computer Engineering & Informatics Department (CEID), University of Patras.
This shell script parses a server's access log file to extract various information about the connected clients, such as the browsers used and the authenticated user IDs. It can also filter based on user, month of request, request method (GET/POST) or IP protocol version (IPv4/IPv6)
- Calling the script with one parameter does nothing:
./logparser.sh
- The script needs at least one parameter, which is the log file name. If it's the only parameter, it prints the whole file:
./logparser.sh access.log
- See all connected clients:
./logparser.sh access.log --usrid
- See all used browsers:
./logparser.sh access.log --browsers
- Filter file based on one specific client:
./logparser.sh access.log --usrid root
- Filter based on request method:
./logparser.sh access.log -method POST
- Filter based on IP protocol:
./logparser.sh access.log --servprot IPv4
- Filter based on date:
./logparser.sh access.log --datum Feb