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. Marketeers 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, Cricket, that's perfect for this application.
What is 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": The detailed "hourly" table has readings at 5-minute intervals for the last 24 hours, the "daily" table has averages of the load times for the last seven 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) to log data from all sorts of networked gear.
See Cricket in Action!
See for yourself how Cricket works. Click here to jump to a table listing four web site options. Each option is a live web page. Choose a page, and within seconds Cricket will analyze its load time and build the graphs displaying its results.
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 sample setups for network gear. Once you've got it running, refer to these documents to take on more ambitious projects. There is also a 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, you won't get as sharp a picture of the change resulting from the new software.
On page 2, we'll walk through the Cricket installation process step by step.