Skip to content

PKalozoumis/CEID-OS-LOG-PARSER-2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CEID-OS-LOG-PARSER-2022

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)

Use cases

  • Calling the script with one parameter does nothing:
./logparser.sh

image

  • 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

image

  • See all connected clients:
./logparser.sh access.log --usrid

image

  • See all used browsers:
./logparser.sh access.log --browsers

image

  • Filter file based on one specific client:
./logparser.sh access.log --usrid root

image

  • Filter based on request method:
./logparser.sh access.log -method POST

image

  • Filter based on IP protocol:
./logparser.sh access.log --servprot IPv4

image

  • Filter based on date:
./logparser.sh access.log --datum Feb

image