Everything E-Commerce Everything E-Commerce

CFpingPRO professional edition Subscribe to our professional grade of CFping.
 
JUST FOR FUN
Click an arrow to visit the application.

ALL THE STUFF THAT'S LEFT HANDED  

PLAY OUR SLOT MACHINE, WIN NOTHING

GET RID OF THE DOUBLE CLICK SUBMIT

FIX THAT JAVASCRIPT NUMBER

KEEP TABS ON THE HEALTH OF YOUR COLDFUSION SERVER

CREATE A DYNAMIC BAR CHART

COLD FUSION SERVER HEALTH
This little application will keep tabs on the health of your ColdFusion server even when you're in a shared server environment that is hosted at a remote location. It does it by requesting pages and measuring the time it takes for the pages to be returned. Calling it CFping is actually a misnomer in the strict DOS socket call sense. This application makes HTML requests, one for an *.htm file and another for a *.cfm file. It measures the return time for each page and computes the time difference.

 GIVE IT A TRY
CLICK TO BEGIN CF TEST NOTE:  This will not work with Netscape 4/5.x
Click the CFping logo to pop up a window with CFping running. We've disabled the ability to change the "Call" and "Wait" values so someone won't try and overload our server with frequent calls. Wait 30+ seconds for the first reading.

View a screen shot of PingPro, the professional version of CFping

 HERE IS THE "CFping" CODE
GET THE ZIP FILE No need to show the code; you can download the entire package in zip form by clicking the logo. The entire zip file is only 9.5K. It extracts to about 16K. After downloading, extract and open the readme file. The directions on using are very simple. Basically, just upload the entire "CFping" folder and all contents to your server and open the "beginping.htm" file.
 HOW IT WORKS
The problem when you're in a shared server environment is that you can't monitor the CF engine using ColdFusion syntax when the CF engine is down. The trick is not to try. Instead this application uses JavaScript and the onLoad event available to frames (not with Netscape 4/5.x) to trigger a response when a requested document is returned.

The documents in this case are "callhtml.htm" and "callcf.cfm". Both of them are called nearly simultaneously using a JavaScript function. The return destination is to two separate hidden frames. Upon return, a short line of JavaScript code in each of the documents runs to announce their time of arrival. The times are compared with the request time and the differences written to a table. By comparing return times on near simultaneous requests, network delays are mostly eliminated.

The requested ColdFusion page will invoke on the CF server an application.cfm file, set a URL variable to a session, and then timeout the session and application. It is not designed to load test the CF engine, just to make sure it is responding correctly. Greater load testing could be written into the CF file...a db query, for instance.

If, instead of the requested pages being returned, error or timeout pages are returned, then the JS code won't be present in the returned pages and consequently will not report the arrival times. Hence, an "x" will be written to the table in the appropriate results column.

All of this action hangs together using several JS functions that are resident in the "top" "beginping.htm" frameset file. You can view the code upon download.

Writing code is like wrestling alligators:
  The more you thrash around, the more gators join the fray!

site | company | products | services | articles
ImagineNation © 1996 - 2003