Win32_PerfRawData_FileReplicaSet 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_FileReplicaSet 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_FileReplicaSet_FileReplicaSet", "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 "BytesofFilesInstalled: $objItem->{BytesofFilesInstalled}\n"; print "BytesofStagingFetched: $objItem->{BytesofStagingFetched}\n"; print "BytesofStagingGenerated: $objItem->{BytesofStagingGenerated}\n"; print "BytesofStagingRegenerated: $objItem->{BytesofStagingRegenerated}\n"; print "Caption: $objItem->{Caption}\n"; print "ChangeOrdersAborted: $objItem->{ChangeOrdersAborted}\n"; print "ChangeOrdersEvaporated: $objItem->{ChangeOrdersEvaporated}\n"; print "ChangeOrdersIssued: $objItem->{ChangeOrdersIssued}\n"; print "ChangeOrdersMorphed: $objItem->{ChangeOrdersMorphed}\n"; print "ChangeOrdersPropagated: $objItem->{ChangeOrdersPropagated}\n"; print "ChangeOrdersReceived: $objItem->{ChangeOrdersReceived}\n"; print "ChangeOrdersRetired: $objItem->{ChangeOrdersRetired}\n"; print "ChangeOrdersRetried: $objItem->{ChangeOrdersRetried}\n"; print "ChangeOrdersRetriedatFetch: $objItem->{ChangeOrdersRetriedatFetch}\n"; print "ChangeOrdersRetriedatGenerate: $objItem->{ChangeOrdersRetriedatGenerate}\n"; print "ChangeOrdersRetriedatInstall: $objItem->{ChangeOrdersRetriedatInstall}\n"; print "ChangeOrdersRetriedatRename: $objItem->{ChangeOrdersRetriedatRename}\n"; print "ChangeOrdersSent: $objItem->{ChangeOrdersSent}\n"; print "CommunicationTimeouts: $objItem->{CommunicationTimeouts}\n"; print "Description: $objItem->{Description}\n"; print "DSBindings: $objItem->{DSBindings}\n"; print "DSBindingsinError: $objItem->{DSBindingsinError}\n"; print "DSObjects: $objItem->{DSObjects}\n"; print "DSObjectsinError: $objItem->{DSObjectsinError}\n"; print "DSPolls: $objItem->{DSPolls}\n"; print "DSPollswithChanges: $objItem->{DSPollswithChanges}\n"; print "DSPollswithoutChanges: $objItem->{DSPollswithoutChanges}\n"; print "DSSearches: $objItem->{DSSearches}\n"; print "DSSearchesinError: $objItem->{DSSearchesinError}\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 "FilesInstalled: $objItem->{FilesInstalled}\n"; print "FilesInstalledwithError: $objItem->{FilesInstalledwithError}\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 "KBofStagingSpaceFree: $objItem->{KBofStagingSpaceFree}\n"; print "KBofStagingSpaceInUse: $objItem->{KBofStagingSpaceInUse}\n"; print "LocalChangeOrdersAborted: $objItem->{LocalChangeOrdersAborted}\n"; print "LocalChangeOrdersIssued: $objItem->{LocalChangeOrdersIssued}\n"; print "LocalChangeOrdersMorphed: $objItem->{LocalChangeOrdersMorphed}\n"; print "LocalChangeOrdersPropagated: $objItem->{LocalChangeOrdersPropagated}\n"; print "LocalChangeOrdersRetired: $objItem->{LocalChangeOrdersRetired}\n"; print "LocalChangeOrdersRetried: $objItem->{LocalChangeOrdersRetried}\n"; print "LocalChangeOrdersRetriedatFetch: $objItem->{LocalChangeOrdersRetriedatFetch}\n"; print "LocalChangeOrdersRetriedatGenerate: $objItem->{LocalChangeOrdersRetriedatGenerate}\n"; print "LocalChangeOrdersRetriedatInstall: $objItem->{LocalChangeOrdersRetriedatInstall}\n"; print "LocalChangeOrdersRetriedatRename: $objItem->{LocalChangeOrdersRetriedatRename}\n"; print "LocalChangeOrdersSent: $objItem->{LocalChangeOrdersSent}\n"; print "LocalChangeOrdersSentAtJoin: $objItem->{LocalChangeOrdersSentAtJoin}\n"; print "Name: $objItem->{Name}\n"; print "OutboundChangeOrdersDampened: $objItem->{OutboundChangeOrdersDampened}\n"; print "PacketsReceived: $objItem->{PacketsReceived}\n"; print "PacketsReceivedinBytes: $objItem->{PacketsReceivedinBytes}\n"; print "PacketsReceivedinError: $objItem->{PacketsReceivedinError}\n"; print "PacketsSent: $objItem->{PacketsSent}\n"; print "PacketsSentinBytes: $objItem->{PacketsSentinBytes}\n"; print "PacketsSentinError: $objItem->{PacketsSentinError}\n"; print "RemoteChangeOrdersAborted: $objItem->{RemoteChangeOrdersAborted}\n"; print "RemoteChangeOrdersIssued: $objItem->{RemoteChangeOrdersIssued}\n"; print "RemoteChangeOrdersMorphed: $objItem->{RemoteChangeOrdersMorphed}\n"; print "RemoteChangeOrdersPropagated: $objItem->{RemoteChangeOrdersPropagated}\n"; print "RemoteChangeOrdersReceived: $objItem->{RemoteChangeOrdersReceived}\n"; print "RemoteChangeOrdersRetired: $objItem->{RemoteChangeOrdersRetired}\n"; print "RemoteChangeOrdersRetried: $objItem->{RemoteChangeOrdersRetried}\n"; print "RemoteChangeOrdersRetriedatFetch: $objItem->{RemoteChangeOrdersRetriedatFetch}\n"; print "RemoteChangeOrdersRetriedatGenerate: $objItem->{RemoteChangeOrdersRetriedatGenerate}\n"; print "RemoteChangeOrdersRetriedatInstall: $objItem->{RemoteChangeOrdersRetriedatInstall}\n"; print "RemoteChangeOrdersRetriedatRename: $objItem->{RemoteChangeOrdersRetriedatRename}\n"; print "RemoteChangeOrdersSent: $objItem->{RemoteChangeOrdersSent}\n"; print "ReplicaSetsCreated: $objItem->{ReplicaSetsCreated}\n"; print "ReplicaSetsDeleted: $objItem->{ReplicaSetsDeleted}\n"; print "ReplicaSetsRemoved: $objItem->{ReplicaSetsRemoved}\n"; print "ReplicaSetsStarted: $objItem->{ReplicaSetsStarted}\n"; print "StagingFilesFetched: $objItem->{StagingFilesFetched}\n"; print "StagingFilesGenerated: $objItem->{StagingFilesGenerated}\n"; print "StagingFilesGeneratedwithError: $objItem->{StagingFilesGeneratedwithError}\n"; print "StagingFilesRegenerated: $objItem->{StagingFilesRegenerated}\n"; print "Threadsexited: $objItem->{Threadsexited}\n"; print "Threadsstarted: $objItem->{Threadsstarted}\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 "UsnReads: $objItem->{UsnReads}\n"; print "UsnRecordsAccepted: $objItem->{UsnRecordsAccepted}\n"; print "UsnRecordsExamined: $objItem->{UsnRecordsExamined}\n"; print "UsnRecordsRejected: $objItem->{UsnRecordsRejected}\n"; print "\n"; print "########\n"; print "\n"; }