Home > CFML, Projects, Web Development > CFTracker: Memory, Apps, Sessions

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

  1. June 29, 2009 at 7:50 pm | #1

    This is interesting. I have something similar. Look forward to seeing your code.

  2. Teeps
    June 30, 2009 at 4:41 am | #2

    Good stuff! Course… I am a little biased.

  3. Rudi Shumpert
    July 1, 2009 at 12:35 pm | #3

    Nice code. Dropped it on the server and WHAM! Insta-data…

  4. misterdai
    July 1, 2009 at 1:36 pm | #4

    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…

  1. No trackbacks yet.