Skip to main content
InSource KnowledgeCenter

TN AppSvr105 Capturing RAM available in ArchestrA script

insource logo large.jpg

                           (Tech Note                 

 

Description

When a computer has a platform deployed to it you can usually monitor the RAM available by simply looking at the RAM field for the platform in question.  An alternative approach would be to use a performance counter to get a view into the available RAM. The script below is an example of how this can be done.

 

  • Author: Joe Hefner
  • Published: 10/14/2014
  • Applies to: Application Server 3.1 

 

Instructions

 

 

The sample script above can be copied from below if desired:

 

dim ramCounter as System.Diagnostics.PerformanceCounter;
ramCounter = new System.Diagnostics.PerformanceCounter("Memory", "Available MBytes");
ramCounter.NextValue();
System.Threading.Thread.Sleep(1000);
LogMessage( "Ram Available: " + ramCounter.NextValue()+"MB");

Confirmation of Success

See message log in the System Management console