Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI » perl sample

Win32_PerfRawData_ASMcuPerf perl 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_PerfRawData_ASMcuPerf WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


Sample Code

use Win32::OLE('in');

my $computer = ".";

my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or die "WMI connection failed.\n";
my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_PerfRawData_ASMcuPerf_LCAsMcu00AsMcuConferences", "WQL");

foreach my $objItem (in $colItems) {
	print "ASMCU000ActiveConferences: $objItem->{ASMCU000ActiveConferences}\n";
	print "ASMCU001ActiveConferencesMax: $objItem->{ASMCU001ActiveConferencesMax}\n";
	print "ASMCU002ActiveConferencesperSecond: $objItem->{ASMCU002ActiveConferencesperSecond}\n";
	print "ASMCU003ActiveTranscoders: $objItem->{ASMCU003ActiveTranscoders}\n";
	print "ASMCU004ActiveTranscodersMax: $objItem->{ASMCU004ActiveTranscodersMax}\n";
	print "ASMCU005ActiveTranscodersperSecond: $objItem->{ASMCU005ActiveTranscodersperSecond}\n";
	print "ASMCU006ActiveDataChannels: $objItem->{ASMCU006ActiveDataChannels}\n";
	print "ASMCU007ActiveDataChannelsperConference: $objItem->{ASMCU007ActiveDataChannelsperConference}\n";
	print "ASMCU008ActiveDataChannelsMax: $objItem->{ASMCU008ActiveDataChannelsMax}\n";
	print "ASMCU009ActiveDataChannelsperSecond: $objItem->{ASMCU009ActiveDataChannelsperSecond}\n";
	print "ASMCU010ConnectedUsers: $objItem->{ASMCU010ConnectedUsers}\n";
	print "ASMCU011ConnectedUsersperConference: $objItem->{ASMCU011ConnectedUsersperConference}\n";
	print "ASMCU012ConnectedUsersMax: $objItem->{ASMCU012ConnectedUsersMax}\n";
	print "ASMCU013ConnectedUsersperSecond: $objItem->{ASMCU013ConnectedUsersperSecond}\n";
	print "ASMCU014ConferencesCreatedTotal: $objItem->{ASMCU014ConferencesCreatedTotal}\n";
	print "ASMCU015ActiveTrustedServerConnections: $objItem->{ASMCU015ActiveTrustedServerConnections}\n";
	print "ASMCU016ActiveTrustedServerConnectionsperConference: $objItem->{ASMCU016ActiveTrustedServerConnectionsperConference}\n";
	print "ASMCU017ActiveTrustedServerConnectionsMax: $objItem->{ASMCU017ActiveTrustedServerConnectionsMax}\n";
	print "ASMCU018ActiveTrustedServerConnectionsperSecond: $objItem->{ASMCU018ActiveTrustedServerConnectionsperSecond}\n";
	print "ASMCU019ActiveAjaxViewers: $objItem->{ASMCU019ActiveAjaxViewers}\n";
	print "ASMCU020ActiveAjaxViewersperConference: $objItem->{ASMCU020ActiveAjaxViewersperConference}\n";
	print "ASMCU021ActiveAjaxViewersMax: $objItem->{ASMCU021ActiveAjaxViewersMax}\n";
	print "ASMCU022ActiveAjaxViewersperSecond: $objItem->{ASMCU022ActiveAjaxViewersperSecond}\n";
	print "ASMCU023ActiveAnonymousConnections: $objItem->{ASMCU023ActiveAnonymousConnections}\n";
	print "ASMCU024ActiveAnonymousConnectionsperConference: $objItem->{ASMCU024ActiveAnonymousConnectionsperConference}\n";
	print "ASMCU025ActiveAnonymousConnectionsMax: $objItem->{ASMCU025ActiveAnonymousConnectionsMax}\n";
	print "ASMCU026ActiveAnonymousUserConnectionsperSecond: $objItem->{ASMCU026ActiveAnonymousUserConnectionsperSecond}\n";
	print "ASMCU027ActiveFederatedConnections: $objItem->{ASMCU027ActiveFederatedConnections}\n";
	print "ASMCU028ActiveFederatedConnectionsperConference: $objItem->{ASMCU028ActiveFederatedConnectionsperConference}\n";
	print "ASMCU029ActiveFederatedConnectionsMax: $objItem->{ASMCU029ActiveFederatedConnectionsMax}\n";
	print "ASMCU030ActiveFederatedConnectionsperSecond: $objItem->{ASMCU030ActiveFederatedConnectionsperSecond}\n";
	print "ASMCU031ActiveExternalConnections: $objItem->{ASMCU031ActiveExternalConnections}\n";
	print "ASMCU032ActiveExternalConnectionsperConference: $objItem->{ASMCU032ActiveExternalConnectionsperConference}\n";
	print "ASMCU033ActiveExternalConnectionsMax: $objItem->{ASMCU033ActiveExternalConnectionsMax}\n";
	print "ASMCU034ActiveExternalConnectionsperSecond: $objItem->{ASMCU034ActiveExternalConnectionsperSecond}\n";
	print "ASMCU035TotalTranscoderErrors: $objItem->{ASMCU035TotalTranscoderErrors}\n";
	print "ASMCU036TotalCreateTranscoderErrors: $objItem->{ASMCU036TotalCreateTranscoderErrors}\n";
	print "ASMCU037TotalCloseTranscoderErrors: $objItem->{ASMCU037TotalCloseTranscoderErrors}\n";
	print "Caption: $objItem->{Caption}\n";
	print "Description: $objItem->{Description}\n";
	print "Frequency_Object: $objItem->{Frequency_Object}\n";
	print "Frequency_PerfTime: $objItem->{Frequency_PerfTime}\n";
	print "Frequency_Sys100NS: $objItem->{Frequency_Sys100NS}\n";
	print "Name: $objItem->{Name}\n";
	print "Timestamp_Object: $objItem->{Timestamp_Object}\n";
	print "Timestamp_PerfTime: $objItem->{Timestamp_PerfTime}\n";
	print "Timestamp_Sys100NS: $objItem->{Timestamp_Sys100NS}\n";
	print "\n";
	print "########\n";
	print "\n";
}