Over the past week we have been working closely with David Boyer from the CFTracker team to work on the new features for our CFManager to give our ColdFusion customers application data which would include information such as sessions, memory usage and so on. With CFTracker enabled within our CFManager we will be able to provide a powerful tool for free.
The next version of CFManager will hopefully be released within the next couple of weeks and ready for the release of our CF9 with cPanel servers.
We are very proud to be working with CFTracker and we are also running monthly donations for the project to support CFTracker which our director has now setup. If you would like to donate to keep this fantastic project going please visit the donations page. (Make a donation) Check out how we support CFTracker. (Host Media UK helping CFTracker)
CFTracker can be used on your local machines & live servers for both Railo and ColdFusion. If you are unsure what CFTracker is and how it can be used then the best place to start learning can be found below:
CfTracker is a ColdFusion based web application for viewing the current status of your ColdFusion server. It’ll show you active applications and sessions, let you peak inside the query cache, provide very detailed memory usage information, view all the threads on the system and expose various other statistics.
CfTracker started life as a single ColdFusion component that contained code to access all active sessions on an Adobe ColdFusion instance (CF7+). Gradually, sometimes with the help of others, I managed to undercover further ways to access metadata about the sessions (time alive, expired?, last accessed etc…) and similar methods for application instances. Once it got to a certain point of functionality, things went quiet as I didn’t have a need for the component.
After I attended the “Scotch on the Rocks” 2010 conference, I was inspired by Claude Englebert’s presentation on “Intro to CF 9 Server Manager Cluster and Manage CF”. He had to rewrite part of his presentation due to issues with Internet access and ended up talking about Adobe CFIDE Admin extensions. This was something I hadn’t encountered before and, as always with SOTR, I came away with a desire to use it for something.
Hence, CfTracker as an Adobe CFIDE Admin extension was born. I quickly put together various templates to display active applications, sessions plus some memory and performance information. Adding to that I provided methods for stopping / refreshing any session selected. A couple of people took an interest in this new version of the project and everything picked up from that point.
CfTracker is turning into quite a flexible application, it has more options for installation:
- Adobe CFIDE Admin Extension.
- Railo Server Admin plugin (currently in the beta release).
- Set of core components that provide all the functionality (this is what CFManager is using).
It also provides a lot more information and actions you can take:
- Applications (all active application instances)
- Metadata (date created, expiration date, sessions, initialised)
- Scope dump.
- Dump of the application.cfc instance.
- Can stop, restart (runs onApplicationStart, but maintains application scope) or refresh any application.
- Sessions (all active sessions on the server)
- Metadata (date created, expiration date, client IP, last accessed time).
- Scope dump.
- Can stop or refresh (update last accessed time) any session.
- Query Cache
- View cached queries.
- SQL, result sets, creation date.
- Purge all or individual items.
- Heap and Non-heap memory usage.
- Heap and Non-heap memory pools usage.
- JVM Garbage collection activity.
- Server OS memory usage (physical and swap).
- Request Garbage collection takes place.
- Time spent compiling code.
- CPU Usage.
- Various performance counters.
- See all threads on the JVM.
What can you use it for?
CfTracker can be a great tool when used for development purposes. You can easily see what applications and sessions are being created and peak inside them without having to use CfDump / WriteDump in your code. See what items are making it into the query cache and investigate how much memory usage is taking place.
If you’ve made a mistake in your application scope, you no longer have to wait for expiration, restart the server or try and write some code to correct it. You can use CfTracker to simply stop the application instance and the same goes for sessions.
Can be very useful to see what’s going on. If a user reports a problem, you could check the application and session scopes to see if there is anything that looks odd. Make sure that your memory usage isn’t getting out of hand and that search engines haven’t created a load of extra sessions.
This is the next version in development and currently available as a beta (can contain bugs). Most of the work is complete and only the Railo Server Admin plugin is left to complete.
- Historical Graphs (survive crashes or restarts).
- CPU Usage, Compilation effort, Classes loaded, Class loading/unloading activity.
- Heap, non-heap memory usage.
- Garbage Collection activity.
- Physical and Swap memory usage for the OS.
- Improved Thread information.
- CPU time spent.
- Template trace of any CFML threads.
- Railo Server Admin plugin support
- Allows CfTracker to operate within the Railo admin itself.
- Negates the need to request the server admin password.
- If installed to a web admin, restricts applications / sessions to that web context only.
Here is an idea of what else is in the pipeline for versions down the line.
- Receive email alerts when user configurable limits are hit.
- Memory usage hits 80%.
- Too many garbage collections over a certain time period.
- Unexpected rise in compilation effort (lots of new code being compiled).
- Query Cache full.
- CPU usage above 80% for ColdFusion over a certain period of time.
- Each alert has an alert and reset level, plus a non-alert period, so constant emails aren’t fired.
- For example, alert when memory is over 80%, unset the alert when it returns to 50%, don’t alert again for 10 minutes.
- Stack Traces
- Enable stack traces for all threads on the system.
- Useful for tracking down long running threads.
- Request monitoring
- Still on the drawing board but should be able to monitor the CPU usage of each request, time taken to process and returned status code etc…
- Remote monitoring
- CfTracker running in a dedicated ColdFusion instance, monitoring multiple remote instances.
- Easily see what’s happening across your servers / instances.
So what now?
Go and try it out. The installation is straight forward (standalone), you just drop it on your server, open a web browser and surf to it. See if it’s useful and if it is, let others know about it.
We have been hosting websites since 2002 and are always moving forward. All articles written under the Host Media author are created by the team who support our customers.