This will tell you the memory stuffs. Curteousy of Pete Frietag's blog.
<cfset runtime = CreateObject("java","java.lang.Runtime").getRuntime()>
<cfset freeMemory = runtime.freeMemory() / 1024 / 1024>
<cfset totalMemory = runtime.totalMemory() / 1024 / 1024>
<cfset maxMemory = runtime.maxMemory() / 1024 / 1024>
<cfoutput>
Free Allocated Memory: #Round(freeMemory)#mb<br>
Total Memory Allocated: #Round(totalMemory)#mb<br>
Max Memory Available to JVM: #Round(maxMemory)#mb<br>
</cfoutput>
Doug
-----Original Message-----
From: Tyler Silcox [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 14, 2004 10:38 AM
To: CF-Talk
Subject: Check server memory and CFMX restarts>>>
Is there a way to check available memory for CFMX from code? (i.e. I do not
have access to the physical server.)
I've seen it done before for Java based custom tags, but I was wondering if
there is a way to tell if CFMX is running out of memory (because I keep
losing my application variables way before the specified timeouts.)
And does CF record every time it restarts in the "server" log, or would it
only be recorded in the actual server's log (from IIS for example)?
Tyler S
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

