CS701 : Software Practice and Experience Laboratory 2004-2005
Assignment 2 : perl
Some References
Perl Unleashed
Perl by Examples
Perl Manual
CSE docs
Outline of Assignment 2
Assignment 2 will consist of three parts.
PART A
For the given squid log file extract the following information:
- The number of requests by each ip.
- Top 5 user with highest number of requests.
- The
number of unique domains and most frequently accessed domain by the top
5 requester ips. A domain is the server part of the url address. e.g.
If actual url is 'http://www.ndtv.com/images/sports/card/dot.gif', the
domain is 'http://www.ndtv.com'.
- The amount of data downloaded by each ip, and top 5 ips that downloaded largest amount of data. size of data is given in bytes.
- Ratio of cache hits to cache misses in the log (a cache hit is indicated by a 'TCP_HIT' and miss by 'TCP_MISS').
- Hit by response code analysis. (What's this ?)
-
Find total number of hits per 5 mins. Give Maximum number of hits and
Average number of hits per 5 mins. Consider time to start from integral
part of first entrie's timestamp. Time stamps are given in seconds.
The columns of the squidlog data are listed in the order of appearance as under:
timestamp, time elapsed, client ip, status/responce code, data size,
method of access, url, identity, hierarchy neighbor, file mime type.
Get the Squid log file from here.
NOTE:
The IPs should occur in sorted order in the output for each of i) to
vi). Generate the report in suitable format. Proper error handling
should be done.
PART B:
For the given bib file generate one html page for each
entry. Also generate an index page which will have links to all the
"single bib entry html" pages. These links should be the title of the
bib entry. bib file will be provided shortly.
Example bib file and corresponding HTML files
OR
For the given bib file generate html page. The html page should be same as that of bibtex generated ps file output.
Example bib file 1 and bib file 2
NOTE:
you can write a single program for both parts A and B (Process
depending on file extension). Modular and well documented coding will
fetch higher credit.
PART C:
Write a client server program in perl. The server should have two text
files. one containing user ids with passwords. Other with user name and
exam marks.
When a client connects to the server, it should authenticate the client
using password. Then client can then provide with an exam number. The
server provids clients marks for particular exam and the class average
for that exam.
Sample files: Password file, Marks file
Release Date : Sunday, 15 August
Submission Deadline : Friday, 27 August 11:59:59 pm
Note: You can submit only once. Multiple submissions are not allowed.