Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI Performance Counters » JScript

MSAS2008StorageEngineQuery - WMI sample in JScript

The foundations for Manageability in Windows 2019/2012/2008/ and Windows 10/8/7/Vista/XP are 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.

On this site, you can find many WMI samples.

The MSAS2008StorageEngineQuery WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


MSAS2008StorageEngineQuery

Example(s)

var strComputer = ".";

var objWMIService = GetObject("winmgmts:\\\\" + strComputer + "\\root\\CIMV2");
var colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PerfRawData_MSSQLServerOLAPService_MSAS2008StorageEngineQuery", "WQL");

var enumItems = new Enumerator(colItems);

for (; !enumItems.atEnd(); enumItems.moveNext()) {
	var objItem = enumItems.item();
	WScript.Echo("AggregationhitsPersec: " + objItem.AggregationhitsPersec);
	WScript.Echo("AggregationlookupsPersec: " + objItem.AggregationlookupsPersec);
	WScript.Echo("AvgtimePerquery: " + objItem.AvgtimePerquery);
	WScript.Echo("AvgtimePerquery_Base: " + objItem.AvgtimePerquery_Base);
	WScript.Echo("BytessentPersec: " + objItem.BytessentPersec);
	WScript.Echo("CalculationcachehitsPersec: " + objItem.CalculationcachehitsPersec);
	WScript.Echo("CalculationcachelookupsPersec: " + objItem.CalculationcachelookupsPersec);
	WScript.Echo("Caption: " + objItem.Caption);
	WScript.Echo("Currentdimensionqueries: " + objItem.Currentdimensionqueries);
	WScript.Echo("Currentmeasuregroupqueries: " + objItem.Currentmeasuregroupqueries);
	WScript.Echo("DatabytesPersec: " + objItem.DatabytesPersec);
	WScript.Echo("DatareadsPersec: " + objItem.DatareadsPersec);
	WScript.Echo("Description: " + objItem.Description);
	WScript.Echo("DimensioncachehitsPersec: " + objItem.DimensioncachehitsPersec);
	WScript.Echo("DimensioncachelookupsPersec: " + objItem.DimensioncachelookupsPersec);
	WScript.Echo("DimensionqueriesPersec: " + objItem.DimensionqueriesPersec);
	WScript.Echo("FlatcachehitsPersec: " + objItem.FlatcachehitsPersec);
	WScript.Echo("FlatcachelookupsPersec: " + objItem.FlatcachelookupsPersec);
	WScript.Echo("Frequency_Object: " + objItem.Frequency_Object);
	WScript.Echo("Frequency_PerfTime: " + objItem.Frequency_PerfTime);
	WScript.Echo("Frequency_Sys100NS: " + objItem.Frequency_Sys100NS);
	WScript.Echo("MapbytesPersec: " + objItem.MapbytesPersec);
	WScript.Echo("MapreadsPersec: " + objItem.MapreadsPersec);
	WScript.Echo("MeasuregroupcachehitsPersec: " + objItem.MeasuregroupcachehitsPersec);
	WScript.Echo("MeasuregroupcachelookupsPersec: " + objItem.MeasuregroupcachelookupsPersec);
	WScript.Echo("MeasuregroupqueriesPersec: " + objItem.MeasuregroupqueriesPersec);
	WScript.Echo("Name: " + objItem.Name);
	WScript.Echo("NetworkroundtripsPersec: " + objItem.NetworkroundtripsPersec);
	WScript.Echo("PersistedcachehitsPersec: " + objItem.PersistedcachehitsPersec);
	WScript.Echo("PersistedcachelookupsPersec: " + objItem.PersistedcachelookupsPersec);
	WScript.Echo("QueriesansweredPersec: " + objItem.QueriesansweredPersec);
	WScript.Echo("QueriesfromcachedirectPersec: " + objItem.QueriesfromcachedirectPersec);
	WScript.Echo("QueriesfromcachefilteredPersec: " + objItem.QueriesfromcachefilteredPersec);
	WScript.Echo("QueriesfromfilePersec: " + objItem.QueriesfromfilePersec);
	WScript.Echo("RowssentPersec: " + objItem.RowssentPersec);
	WScript.Echo("Timestamp_Object: " + objItem.Timestamp_Object);
	WScript.Echo("Timestamp_PerfTime: " + objItem.Timestamp_PerfTime);
	WScript.Echo("Timestamp_Sys100NS: " + objItem.Timestamp_Sys100NS);
	WScript.Echo("Totalbytessent: " + objItem.Totalbytessent);
	WScript.Echo("Totaldimensionqueries: " + objItem.Totaldimensionqueries);
	WScript.Echo("Totalmeasuregroupqueries: " + objItem.Totalmeasuregroupqueries);
	WScript.Echo("Totalnetworkroundtrips: " + objItem.Totalnetworkroundtrips);
	WScript.Echo("Totalqueriesanswered: " + objItem.Totalqueriesanswered);
	WScript.Echo("Totalqueriesfromcachedirect: " + objItem.Totalqueriesfromcachedirect);
	WScript.Echo("Totalqueriesfromcachefiltered: " + objItem.Totalqueriesfromcachefiltered);
	WScript.Echo("Totalqueriesfromfile: " + objItem.Totalqueriesfromfile);
	WScript.Echo("Totalrowssent: " + objItem.Totalrowssent);
	WScript.Echo("")
	WScript.Echo("########")
	WScript.Echo("")
}