blank.gif
webreview.com - Cross-Training for Web Teams
Search for:  
Jump to:  
blank.gif
blank.gif

 

Sponsored by:

Walking the Thin Blue Line

Apache Server Page Load Monitoring

by Brian Wilson
Feb. 25, 2000

What is Cricket?

Cricket is an easy to set up application for recording page-load times, and it has a nice web-based grapher that will generate charts to display the data in several formats.

Everyone wants something different from our web server. Marketing people want to know the geographical areas that hits are coming from. Editors want to know what content readers find most interesting. Advertisers demand to know how many times their banner ads are delivered, and from what pages.

And of course, as system administrator, I need to know that pages are being delivered promptly. I can't get that information from conventional web server log files. Instead, I need a system that can periodically load test pages from each of my servers, and log how long it takes. By graphing that data, I can get a feel for how well my servers are running.

For the last year, I have been using a free software package called "Cricket" that's perfect for this application.

What's Cricket?

Cricket can be easily set up to record page-load times, and it has a nice web-based grapher that will generate charts to display the data in several formats. Cricket is based on RRDtool, whose ancestor is MRTG (short for "Multi-Router Traffic Grapher"). RRDtool (round robin data tool) is a package that collects data in "round robin" databases; each data file is fixed in size so that running Cricket does not slowly fill up your disks. The database tables are sized when created and do not grow larger over time. As the data ages, it's averaged; this works fine for the graphing we are doing here.

Each RRDtool table "wraps around": that is, the detailed "hourly'" table has readings at 5 minute intervals for the last 24 hours, then the "daily" table has averages of the load times for the last 7 days, and so on. It's pretty intuitive when you look at the graphs, but you should be aware that you won't be able to get back exact 5 minute interval readings for something that took place a month ago if you use the RRDtool as your logging system—only the interpolated averages are stored. This is good enough for most purposes however.

Tracking page-load times is just one small facet of what Cricket can do for you. I use it to track how much traffic travels across our etherswitch so that we can track bandwidth utilization of our subnet and each individual host. Cricket uses SNMP (simple network management protocol) so it can log data from all sorts of networked gear.

In addition, you can even write your own "collector" scripts that log data on just about anything, and then use Cricket to graph the data. I tested this by logging subscriber counts for a mailing list.

In this article, we're going to set up Cricket to track web server performance. Cricket comes with good documentation, and good sample setups for network gear. Once you've got it running, refer to those docs to take on more ambitious projects. There is also a good Cricket mailing list that you can sign up for to get more help. (See the Cricket web site for info on how to sign up.)

When Cricket is installed to log page-load times, I can show folks the before and after pictures when I perform system tuning operations such as adding memory or a new hard drive. This helps to justify the expense by showing concrete evidence that the change has improved load times.

If you make a major software change, you can track its effect on load times. Keep in mind that you have to select the right URLs to track. If you turn on server side "includes" but point Cricket only at a page with no "includes" in it, then you won't get as sharp a picture of the change resulting from the new software.

In part two, we'll walk through the Cricket installation process step by step.


Apache Server Page Load Monitoring With Cricket

Next: Cricket Part 2 - Step by Step Installation


Web Review copyright © 1995-2000 Miller Freeman, Inc.