<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>
>From these numbers we can also determine the percent of free allocated
memory available, and also the percent of avalaible memory allocated
<cfset percentFreeAllocated = Round((freeMemory / totalMemory) * 100)>
<cfset percentAllocated = Round((totalMemory / maxMemory ) * 100)>
<cfoutput>
% of Free Allocated Memory: #percentFreeAllocated#%<br>
% of Available Memory Allocated: #percentAllocated#%<br>
</cfoutput>
-----Original Message-----
From: Robert Everland III [mailto:[EMAIL PROTECTED]
Sent: Friday, January 20, 2006 12:01 PM
To: CF-Talk
Subject: Re: Monitoring JRun Memory Usage
I'm sure if you look through the java docs there will be something in there
to get the memory size. Though size of memory doesn't necesarily mean bad
server.
Bob
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230142
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54