473,398 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

a python program which will summarise an apache web server log file

2
Please can anyone help me with this ----- I am very new in learning python.

This program should report the total number of successful web server accesses and, if the -p "projectname" option is given then the program should report the number of accesses (in total and as a percentage) under this project. the program should also use a -f option to indicate which web server log file is to be summarised. For example a system administrator might use the program in the following way:

$ ./webscan.py -f access.data

indicates that the total number of accesses as logged in access.data will be displayed.

$ ./webscan.py -f access.data -p /pipermail

indicates that the total number of web server accesses are displayed together with the number of web server accesses in the pipermail folder.


examples
$ ./webscan.py -f access.data
Total number of accesses: 6
$ ./webscan.py -f access.data -p /pipermail
Total number of accesses: 6
Number of accesses in pipermail: 3 (50%)

Thanks
Jan 2 '08 #1
1 1099
oler1s
671 Expert 512MB
This is a homework or job assignment. We do not do other people's assignments. Either come back with a real question or don't spam with homework requests.
Jan 2 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
6
by: Will Stuyvesant | last post by:
I am uploading a .zip file to a Python CGI program, using a form on a HTML page with <input name="yourfile" type="file">... In the Python CGI program I do: import cgi fStorage =...
1
by: Ron Davis | last post by:
I have recently discovered Python and like it quite a bit. I would like to use it on a new project I am starting. The project will gather data from several web services and present the collected...
2
by: arvind | last post by:
When I run the script on server,only HTML part gets executed. But the python code appears as it is on the screen in the text format. How to run the CGI script on web server using Python2.4.3?
14
by: nicolasg | last post by:
Hi folks, I have accomplished to make a python program that make some image manipulation to bmp files. I now want to provide this program as a web service. A user can visit a site and through a...
3
by: Mike Orr | last post by:
I'm trying to install a program that uses Durus on a server. It appears that if a Python program uses eggs, it creates a ~/.python-eggs/ directory, so the home directory must be writeable. This...
113
by: John Nagle | last post by:
The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside...
3
by: joe jacob | last post by:
I configured apache to execute python scripts using mod_python handler. I followed below mentioned steps to configure apache. 1. In http.conf I added <Directory...
1
by: docdoc | last post by:
Please can anyone help me with this ----- I am very new in learning python. This program should report the total number of successful web server accesses and, if the -p "projectname" option is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.