Win32_PerfFormattedData_LDMPerf jscript sample code
The foundations for Manageability in Windows is Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).
ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself. The Win32_PerfFormattedData_LDMPerf WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Sample Code
var strComputer = "."; var objWMIService = GetObject("winmgmts:\\\\" + strComputer + "\\root\\CIMV2"); var colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PerfFormattedData_LDMPerf_LCLDM00LDMMemory", "WQL"); var enumItems = new Enumerator(colItems); for (; !enumItems.atEnd(); enumItems.moveNext()) { var objItem = enumItems.item(); WScript.Echo("Caption: " + objItem.Caption); WScript.Echo("Description: " + objItem.Description); WScript.Echo("Frequency_Object: " + objItem.Frequency_Object); WScript.Echo("Frequency_PerfTime: " + objItem.Frequency_PerfTime); WScript.Echo("Frequency_Sys100NS: " + objItem.Frequency_Sys100NS); WScript.Echo("LDM000AllocatedbuffersPersec: " + objItem.LDM000AllocatedbuffersPersec); WScript.Echo("LDM001FreedbuffersPersec: " + objItem.LDM001FreedbuffersPersec); WScript.Echo("LDM002ContentionorspinwaitsPersec: " + objItem.LDM002ContentionorspinwaitsPersec); WScript.Echo("LDM003Bufferviewsallocatedtotal: " + objItem.LDM003Bufferviewsallocatedtotal); WScript.Echo("LDM004Bufferviewsfreeincache: " + objItem.LDM004Bufferviewsfreeincache); WScript.Echo("LDM005Smallbuffersallocatedtotal: " + objItem.LDM005Smallbuffersallocatedtotal); WScript.Echo("LDM006Smallbuffersfreeincache: " + objItem.LDM006Smallbuffersfreeincache); WScript.Echo("LDM007Mediumbuffersallocatedtotal: " + objItem.LDM007Mediumbuffersallocatedtotal); WScript.Echo("LDM008Mediumbuffersfreeincache: " + objItem.LDM008Mediumbuffersfreeincache); WScript.Echo("LDM009Largebuffersallocatedtotal: " + objItem.LDM009Largebuffersallocatedtotal); WScript.Echo("LDM010Largebuffersfreeincache: " + objItem.LDM010Largebuffersfreeincache); WScript.Echo("LDM011Compositebuffersallocatedtotal: " + objItem.LDM011Compositebuffersallocatedtotal); WScript.Echo("LDM012Compositebuffersfreeincache: " + objItem.LDM012Compositebuffersfreeincache); WScript.Echo("LDM013Noncacheablebuffersallocations: " + objItem.LDM013Noncacheablebuffersallocations); WScript.Echo("LDM014Noncacheablebuffersreleases: " + objItem.LDM014Noncacheablebuffersreleases); WScript.Echo("Name: " + objItem.Name); WScript.Echo("Timestamp_Object: " + objItem.Timestamp_Object); WScript.Echo("Timestamp_PerfTime: " + objItem.Timestamp_PerfTime); WScript.Echo("Timestamp_Sys100NS: " + objItem.Timestamp_Sys100NS); WScript.Echo("") WScript.Echo("########") WScript.Echo("") }