Monitoring Apache Page-Load Times With Cricket
Pages: 1, 2, 3
Web Browsing
|
Contents |
Basically everything is already installed, but you have to make
symbolic links from the Cricket account's public_html area into the
Cricket install. (Using symlinks instead of copying the files makes
upgrading very easy, so I highly recommend it.)
% su - cricket
Password:
% mkdir public_html
% cd public_html
% ln -s ../cricket/doc doc
% mkdir cricket
% cd cricket
% ln -s ../../cricket/VERSION
% ln -s ../../cricket/grapher.cgi
% ln -s ../../cricket/images
% ln -s ../../cricket/lib
% ln -s ../../cricket/mini-graph.cgi
Configure your Web Server
You have to have your web server configured to allow viewing of user
directories. You need to allow symlinks and CGIs in the Cricket
subdirectory. This would be appropriate code to add to your Apache
httpd.conf file. (This part is pretty generic; if you have installed a recent Apache server, it's probably already there.)
UserDir public_html
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Order deny,allow
Deny from all
</Limit>
</Directory>
# This is for the Cricket Traffic Grapher
<Directory /home/cricket/public_html/cricket>
Options SymLinksIfOwnerMatch ExecCGI
</Directory>
Of course, if you have to add this to your httpd.conf file, you will have to
tell httpd that your configuration has changed. If you compiled and
installed Apache from sources, you can use the apachectl command to
signal httpd. This command should work for you.
apachectl restart
If you used the Red Hat RPM version of Apache, you can use this instead:
/etc/rc.d/init.d/httpd restart
Now you should be able to run the grapher.cgi program using this URL,
http://yoursystem/~cricket/cricket/grapher.cgi
|
One last tip If it's a possibility for you, install Cricket on several different networks to get a more accurate picture of how the Internet affects page-load times. I run a copy on my personal ISP account across town. |
if you insert the name of your web server in where it
says yoursystem.
If you get an "internal server" error message in the browser, the
first place to look is in your Apache error_log file. (The exact
location of this file depends on your system.)
When things are running normally, you will get a menu back from
grapher.cgi. You should be able to click on the link,
http-performance. This will return a list of the targets you set up
to be monitored. Click on one of them and you should get the graph
page. Alas, the first time you view a page there will be no data to
view! Patience. Come back in a few hours and more interesting graphs
will start to show up.
Brian Wilson is the system administrator for O'Reilly Network. He is also calls himself the 'online services coordinator' (whatever that is) for the International Human Powered Vehicle Association.
Discuss this article in the O'Reilly Network Apache Forum.
Return to the Apache DevCenter.