Can ColdFusion Access Windows Memory Values

Is there a way for ColdFusion 8/9, via Java or other means to retrieve or calculate memory metrics on the Windows OS such as jrun's Private Work Set Memory and Commit Memory values?

Note that the desired memory values are not to be confused with JVM free memory and other heap related stats available using the Java Runtime object. Thank you.

Answers


I was not familiar with it, but did a bit of searching and found this thread which suggests it can be done with .NET System.Diagnostics. Below is a translation, which seems to work CF 9 / .NET 3.5 / Win7. It should at least give you a starting point.

<cfscript>
    process = createObject(".net", "System.Diagnostics.Process");
    PerfCounter = createObject(".net", "System.Diagnostics.PerformanceCounter")
    counter = PerfCounter.init("Process", "Working Set - Private", "jrun");
    WriteDump( (counter.get_RawValue() / 1024) &"K");
</cfscript>

Need Your Help

Making GridView Visible

c# gridview windows-phone-8.1 windows-10 win-universal-app

I'm trying to create a simple popup in windows 10 universal application. I've made a GridView

Performance of modelling inheritance in database using superclass table

mysql performance database-design database-performance

My Question, is actually a question about the usability / performance of a concept / idea I had: