Web based CFStat tool
I've never been 100% confident in the page count displayed by the CFStat command line tool - the number of pages it says it has served just doesn't seem to match up with the number of pages running. Internally, CF keeps track of the number of pages served as an incrementing number. Subtract the value one second ago from the current value and you have the number of pages served in the last second. However, I suspect the CFStat command line tool displays the number of pages served at that instant in time.
So, I decided to create a web-based tool that mimics the MS-DOS command line CFStat tool and for gee-wiz factor, I made it look just like the MS-DOS interface.
Installing:
Simply save the cfstat.cfm template and run it via your browser. It'll automatically create five images it uses for the MS-DOS graphics if not existing (located in the same directory as cfstat.cfm) and then display the CFStat information.
Important notes:
1. This CFStat tool is a CF page so you'll see it affecting the CFStat information - there will always be one request running and somewhere around 378 bytes served every second.
2. Since it runs in an endless loop, restarting it will show an abnormally high value in the Avg Req time column. Changing the number of lines display restarts the process which will demonstrate this abnormally high value until several threads run. This is normal.
3. There are several smart breaks to the endless loop logic. First, there is a hidden iframe refreshing itself every 30 seconds that updates a session variable with the current time. The CFStat logic checks this time stamp every second and if it exceeds one minute from the current time, it'll abort the process. So if you close the browser without stopping the CFStat, it'll only run for up to 60 seconds before stopping itself.
4. I've never seen the Cache Pop (CP) column display anything but -1 so since I don't know if this is a changing value or an incrementing value, this tool will only display -1 for both columns, just to keep it in sync with the command line tool.
5. The CPU on Windows will hit 100% on a single-CPU box while the tool is running but doesn't seem to slow other resources down. This tool is meant to be run for short periods of time so really not an issue.
6. It emulates a MS-DOS window so only 300 lines history will be available. (You can change this.)
7. It's pretty cool.
Download!