Last active
August 29, 2015 14:05
-
-
Save crisp2u/aca7ebd0ead3c8188535 to your computer and use it in GitHub Desktop.
List active applications and session on the CF server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
adminObj = createObject("component","cfide.adminapi.administrator").login("password"); | |
serverMonitor = createObject("component","cfide.adminapi.servermonitoring"); | |
sessions = serverMonitor.getAllActiveSessions(); | |
ss = ""; | |
writeOutput("Nr of active sessions: #Arraylen(sessions)# <br/>"); | |
writeOutput("List of all active CF applications:<br/>"); | |
for( aSession in sessions) { | |
if(ListFindNoCase(ss,aSession.appName) eq 0) { | |
ss = ListAppend(ss,aSession.appName); | |
} | |
} | |
writeoutput(ListChangeDelims(ss,"<br />")); | |
//serverMonitor.enableMemoryMonitoring(); | |
</cfscript> | |
<!---<p>total memory used by apps: <cfdump var="#serverMonitor.getAllApplicationScopesMemoryUsed()#" /></p>---> | |
<cfscript> | |
//serverMonitor.disableMemoryMonitoring(); | |
</cfscript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment