ColdFusion MX Runtime Monitoring

Installation
Create a directory under your application's web root directory or under \CFusionMX\wwwroot, for example, "log_sys_perf". Unzip the contents of PerfHist.zip to this directory. For out-of-the-box installation, install to \CFusionMX\wwwroot\log_sys_perf

By default, all data files created by the performance monitor will be stored in this directory, nothing else needs to be done if you wish to locate the files here. However, if you wish to locate them elsewhere, set two variables in your Application.cfm template. Be sure to include a trailing slash!

Variable Default Definition
Request.GenFilePath   Location of log_sys_perf.cfm   Directory to store the generated files
Request.ImgPath /log_sys_perf/images/ URL directory where the images are located

MX Admin Configuration
Create a new Scheduled Task with the following settings, assuming out-of-the-box installation:

Name: log_sys_perf
Frequency:  Daily, every five minutes, from 12:00 AM to 11:59 PM
URL: http://127.0.0.1:8500/log_sys_perf/log_sys_perf.cfm

After the task is created, you can run the scheduled task or manually kick off the template via your browser. In either case, two files should be created which would indicate a successful execution: PerfHist.wddx and PerfHist.html. If you open up PerfHist.html in your browser, you should see a small set of graphs that will grow every five minutes. If you wanted to increase it manually, simply run the log_sys_perf.cfm template a few dozen times. The PerfHist.wddx query packet will contain the results for the past 12 hours and the PerfHist.html will display all data available.

An example of this performance logging being run on multiple servers can be viewed here.

Notes
Currently, this utility will only capture the CPU percentage if running on a *nux box with top installed. For all other OS's, a zero will be stored. The Windows metric data does not show a percentage value for CPU usage. If you're running this utility on a *nux box with multiple processors and top installed, the average of all the processors will be stored.

If your application keeps track of the users who are logged on, you can add your logic to log_sys_perf.cfm to set the variable FORM.UserCnt to the number of users currently logged in. Otherwise, this value will always reflect zero.

For questions, comments, or smart remarks, please email John Bartlett.