OPS435 Python Assignment 1 2017 - 3

From CDOT Wiki
Revision as of 19:09, 4 September 2017 by Andrew (talk | contribs) (General Instructions)
Jump to: navigation, search

Assignment 1 - Parsing a log file

Weight: 15% of the overall grade

Due Date: Ask your professor for exact date

Overview

Often, system administrators need to analyze log files. This can be done using a paginator such as less when your system has just been set up and/or you're the only user. On a production system it is not unusual to have thousands of legitimate users per month accessing the server's services, plus thousands more bots looking for unpatched vulnerabilities, brute-forcing username/password pairs, or just downloading every available file on your web server.

In this assignment you will create a program that will help you as a mail server administrator to answer questions about the status, load, and security of your mail server. You will not need to set up a mail server for this assignment, though you're welcome to use the one you've set up in OPS335 as a practice machine.

Instructions

Name and Parameters

Your Python3 program will be named maillog.py and it will accept the following parameters:

  • --default or -d as an optional first argument, followed by:
  • filename, or:
  • filename1 filename2 filename3 etc... - any number of filenames from 1 to as many as the command-line supports.

Header

Your program must be a single source file, and at the top of that file it will contain the following true statement as a comment (replace Andrew Smith with your own name):

OPS435 Assignment 1 - Fall 2017
maillog.py
Author: Andrew Smith
The source code in this file (maillog.py) is original work written 
by Andrew Smith and has not been copied from any other source including any
person, textbook, or online resource. I have not shared this work with anyone
or anything except for submission for grading. I understand that the 
Academic Honesty Policy is not a joke and violators will be punished.