COSC 4377 - Introduction to Computer NetworksSpring 2012MW 1:00-2:30pm at PGH347
Homework 5 : Networked Service Analysis and Exam ReviewDue: midnight February 22, 2012
Question 1 : HTTP Server AnalysisWe will survey a list of popular websites and find out which web servers are used by those sites. Grab this list (provided by Google) of top 1000 most-visited websites: http://www.google.com/adplanner/static/top1000/ For each site on the list, please find out which web server they use. If you want to do this manually, you would connect to the website on port 80, issue a HEAD command, and parse the appropriate header field. If details such as version number is available for the server, please include them in the server name. One challenge in this assignment is automating this discovery process. Feel free to use schell scripts and any programming language you want as long as it will run on bayou without installing any external or additional library. You will also realize that it will require significant effort to automate the last few cases. You should make a judgment if you want to automate those cases or manually determine the server they use on those sites. You should submit the following:
Question 2 : Moving AveragesLinux provides a way to probe various statistics about the networking stack using a special files under /proc/net. To get a count for the number of bytes transmitted and received on an interface, we can run the following command:$ cat /proc/net/devwhich will produce the following output: Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed lo: 22343841 6372 0 0 0 0 0 0 22343841 6372 0 0 0 0 0 0 eth0: 3889365741 12749462 0 50 0 0 0 0 1407816270 3806761 0 0 0 0 0 0The output tells the number of bytes received (first column), number of packets received (second column), etc. We ran a script to take a snapshot of the number of bytes received and transmitted approximately every 100ms and extracted just the bytes received and transmitted into two files: devsnap1.txt and devsnap2.txt. Each line on these files has row number, bytes received, and bytes transmitted. Each row corresponds to a snapshot taken every 100ms. G1: Draw a line graph that shows time on x-axis and moving average with a window of 1s on y-axis. This graph will have 30 data points because we have 30 seconds of data. G2: Same as G1, except y-axis should be EWMA with a window of 1s and alpha of 0.8. G3: Same as G2, except use alpha of 0.2. Please put G1, G2, and G3 as three different lines on a single graph. Label your lines as G1, G2, and G3. You will have two graphs corresponding to the two data sets. Put the two graphs on a single page. Please answer the following questions:
SubmissionPut all your files in a single folder with the name: uhid_hw5, where uhid is the prefix of your .uh.edu email address. Then, zip the directory and upload the zip file using Blackboard. |