Win32_PerfRawData_FileReplicaConn 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_FileReplicaConn 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_FileReplicaConn_FileReplicaConn", "WQL");
foreach my $objItem (in $colItems) {
print "Authentications: $objItem->{Authentications}\n";
print "AuthenticationsinError: $objItem->{AuthenticationsinError}\n";
print "Bindings: $objItem->{Bindings}\n";
print "BindingsinError: $objItem->{BindingsinError}\n";
print "Caption: $objItem->{Caption}\n";
print "CommunicationTimeouts: $objItem->{CommunicationTimeouts}\n";
print "Description: $objItem->{Description}\n";
print "FetchBlocksReceived: $objItem->{FetchBlocksReceived}\n";
print "FetchBlocksReceivedinBytes: $objItem->{FetchBlocksReceivedinBytes}\n";
print "FetchBlocksSent: $objItem->{FetchBlocksSent}\n";
print "FetchBlocksSentinBytes: $objItem->{FetchBlocksSentinBytes}\n";
print "FetchRequestsReceived: $objItem->{FetchRequestsReceived}\n";
print "FetchRequestsSent: $objItem->{FetchRequestsSent}\n";
print "Frequency_Object: $objItem->{Frequency_Object}\n";
print "Frequency_PerfTime: $objItem->{Frequency_PerfTime}\n";
print "Frequency_Sys100NS: $objItem->{Frequency_Sys100NS}\n";
print "InboundChangeOrdersDampened: $objItem->{InboundChangeOrdersDampened}\n";
print "JoinNotificationsReceived: $objItem->{JoinNotificationsReceived}\n";
print "JoinNotificationsSent: $objItem->{JoinNotificationsSent}\n";
print "Joins: $objItem->{Joins}\n";
print "LocalChangeOrdersSent: $objItem->{LocalChangeOrdersSent}\n";
print "LocalChangeOrdersSentAtJoin: $objItem->{LocalChangeOrdersSentAtJoin}\n";
print "Name: $objItem->{Name}\n";
print "OutboundChangeOrdersDampened: $objItem->{OutboundChangeOrdersDampened}\n";
print "PacketsSent: $objItem->{PacketsSent}\n";
print "PacketsSentinBytes: $objItem->{PacketsSentinBytes}\n";
print "PacketsSentinError: $objItem->{PacketsSentinError}\n";
print "RemoteChangeOrdersReceived: $objItem->{RemoteChangeOrdersReceived}\n";
print "RemoteChangeOrdersSent: $objItem->{RemoteChangeOrdersSent}\n";
print "Timestamp_Object: $objItem->{Timestamp_Object}\n";
print "Timestamp_PerfTime: $objItem->{Timestamp_PerfTime}\n";
print "Timestamp_Sys100NS: $objItem->{Timestamp_Sys100NS}\n";
print "Unjoins: $objItem->{Unjoins}\n";
print "\n";
print "########\n";
print "\n";
}
