CFTracker: Memory, Apps, Sessions
CFTracker is a CFC for ColdFusion (7/8) which provides methods for accessing the following information:
- Names of all active applications
- Get the application scope keys for any active application
- Get values from any application scope (CF8 Only) without changing the last accessed time
- Application details (time alive, last accessed, idle timeout, expiry status)
- Names of all sessions or per application sessions
- List of keys for any session scope
- Get values from any session (CF8 Only) without changing the last accessed time
- Session information (time alive, last accessed, idle timeout, expiry status)
- ColdFusion Memory information (free, allocated, free allocated, used, maximum allocatable)
Planned additions
There is a setMaxInactiveInterval method for application / session scopes but I’ve been unable to use it so far without triggering the last accessed time to update. Anyone with some Java reflection knowledge could probably work it out, *hint* *hint*.
Usage example
<cfscript>
cfcTracker = CreateObject('component', 'tracker').init();
apps = cfcTracker.getApplications();
sess = cfcTracker.getSessions(apps[1]);
</cfscript>
Download and issue reporting
Thanks to the awesome RIAForge, you can download CFTracker from its project site.
Credit
- Ben Nadel
For discovering the Java array.Contains() method - Teeps (Terry Palmer) & his co-worker Java guy
For getting getValueWIthoutChange working.
Categories: CFML, Projects, Web Development
CFML, cftracker, coldfusion
This is interesting. I have something similar. Look forward to seeing your code.
Good stuff! Course… I am a little biased.
Nice code. Dropped it on the server and WHAM! Insta-data…
Thanks for the comments. Glad people like it, chuffed enough that it’s over 50 downloads already.
My next plan is to add in a companian component to record some of the information to a RRD database via a scheduled task. This would give a historical view of apps, sessions per app and memory usage over larger periods of time.
Also, maybe a snapshot page that shows current sessions per app and how long each one has to expire etc…