Taking temperature of CFMX
As we know CFMX runs on top of J2EE(Java Virtual Machine). How do I find out how hot the coffee is boiling? Well, easy enough:
ColdFusion Memory Usage Stats
Quick sample:
<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
Total Memory Allocated: #Round(totalMemory)#mb
Max Memory Available to JVM: #Round(maxMemory)#mb
</cfoutput>
UPDATE: This is a repost of
ColdFusion Memory Usage Stats, thank you Freitag for pointing it out.
3 Comments:
Great article! Thanks.
Thanks for interesting article.
Excellent website. Good work. Very useful. I will bookmark!
Post a Comment
<< Home