[Looking for Charlie's main web site?]

Tracking number of CF sessions per application easily, and why you should care

Note: This blog post is from 2009. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Ever wanted to count how many sessions are active on your server, in total and per application, whether on CF 7 or 8? And regardless of whether you're using CF's regular sessions or the "new" J2EE sessions feature introduced in CF 6? Would you be surprised to find you could have a shocking number of active sessions?

[....Continue Reading....]

Comments
Hi Charlie, Are you aware of any updated version of serverStats that would work for CF2016?
# Posted By Curt | 11/7/19 1:44 PM
Wow, a blast from the past (that old ServerStats utility). Well, there's bad news and very good news. The bad news is that it not that it fails on CF2016. It fails on 10 or above.

But here's the very good news: it's just that one tiny method (two of code) get the instance name, using a jrun method. That no longer works since CF10. (I have a blog post on the new way to get it, since CF10, here: https://www.carehart...)

Anyway, we just need to replace that approach (a single line using the Admin API) for the two lines he had before.

The change is to be made in au\com\lynchconsulting\cfc\managers\SystemManager.cfc

And in there, see the method getCFInstanceName. In there, he has these two lines of code, that I have commented out and added in the newer line:

//var jrunObj = createObject("java", "jrunx.kernel.JRun");
//return jrunObj.getServerName();
return createobject("component","CFIDE.adminapi.runtime").getinstancename();

I did that and it works for me, on CF2018. Let me know how it goes for you.
Copyright ©2024 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting