NAME

Get-DcsRecordingInstance

SYNOPSIS

Returns the instances in the database to which the specified recording endpoint is connected at the moment. The instances can be used to retrieve performance data with Get-DcsRecordingPerformance.

SYNTAX

Get-DcsRecordingInstance   [ -StartTime <DateTime> ]   [ -EndTime <DateTime> ]   [ -Category <String> ]   [ -InstanceId <Object> ]   [ -Endpoint <Object> ]   [ -Connection <String> ]   [ -PipelineVariable <String> ]

DESCRIPTION

Returns the instances in the database to which the specified recording endpoint is connected at the moment. The instances can be used to retrieve performance data with Get-DcsRecordingPerformance. Filtering parameters may be specified to narrow the scope of the data returned. If no parameters are specified, data for all instances recorded in the "!UserRecordingEndpoint" will be returned."

PARAMETERS

-StartTime<DateTime>
The starting date and time of the performance recording. One way to provide the StartTime parameter would be to invoke New-Object with the TypeName parameter of DateTime with the correct arguments (see Help for New-Object, Get-Date). The StartTime parameter can also be provided in a string with the date and time. An example of the format is "Monday, December 3, 2012 2:00:00 PM". All instances which existed at or after the start time will be returned. This parameter can be used with the parameter EndTime to create a time frame.

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-EndTime<DateTime>
The ending date and time of the performance recording. One way to provide the EndTime parameter would be to invoke New-Object with the TypeName parameter of DateTime with the correct arguments (see Help for New-Object, Get-Date). The StartTime parameter can also be provided in a string with the date and time. An example of the format is "Monday, December 3, 2012 4:00:00 PM". All instances which existed before or at the end time will be returned. This parameter can be used with the parameter StartTime to create a time frame.

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-Category<String>
The name of a category. If specified, only data for this category will be returned. Valid values for category names include: "DiskPool", "LogicalDisk", "Machine", "HostGroup", "PhysicalDisk", "PoolMember", "Replication", "RollbackGroup", "ScsiPort", "ServerGroup", "ServerMachine", "ServerScsiPort", "SharedDiskPool", "SharedPhysicalDisk", "SnapshotGroup", "SnapshotRelation", "StreamLogicalDisk", "VirtualDiskGroup", "VirtualDisk", "VirtualLogicalUnit", "VirtualTargetDevice", and "VirtualTargetDomain". Full category names are also supported, for instance "DiskPool" as well "DiskPoolPerformance".

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-InstanceId<Object>
The PerformanceInstanceData object or any other object, ID or name that identifies the instance that is being recorded. If specified only data for that instance will be returned. See example 4.

Required: false
Position: named
Default value:
Accept pipeline input: true (ByValue)
Accept wildcard characters: false

-Endpoint<Object>
The RecordingEndpointData object, name or ID that identifies a recording endpoint. If the endpoint is not specified, statistics for the "!UserRecordingEndpoint" will be returned.

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-Connection<String>
Alias of the connection to the server group. If not specified, the default connection will be used.

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-PipelineVariable<String>

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

INPUTS

PerformanceInstanceData or other object : The PerformanceInstanceData object identifies and describes the instance in a recording session. Any other object that identifies the instance that is being recorded may also be piped.

OUTPUTS

PerformanceInstanceData : Object identifying and describing the instance in a recording session.

NOTES

To get an instance for a physical disk not in a pool, use the PhysicalDiskId. To get an instance for a physical disk in a pool, use the PoolMemberId.In the returned PerformanceInstanceData object, the ActivityWindow field can be used to find the start and end dates of the data for an instance. Note: In the ActivityWindow object, the timestamp for Center, StateTime and EndTime fields will always reflect midnight on the correct day. See Example 2.See Example 4 which demonstrates how to use an instance to get recorded performance data and output the data to a CSV file.Also see Add-DcsRecordingPoint, Get-DcsRecordingPerformance, Get-DcsRecordingPoint, Get-DcsRecordingResolution, Get-DcsRecordingEndpoint, Get-DcsRecordingSession, Get-DcsRecordingStatistics

EXAMPLES


-------------- Example 1 Returns all instances during a specific time frame --------------
Get-DcsRecordingInstance -StartTime "Monday, December 3, 2012 3:15:00 PM" -EndTime "Monday, December 3, 2012 4:15:00 PM"
		

The cmdlet Get-DcsRecordingInstance is invoked with a start time of "Monday, December 3, 2012 3:15:00 PM" and ending time of "Monday, December 3, 2012 4:15:00 PM". This cmdlet returns all instances of resources which existed in the recording session between the start and end time. PerformanceInstanceData objects that fit the criteria are returned.

KeyData:DataCore.Executive.PerformanceInstanceKeyData
Alias:
Caption:Disk pool 1
ExtendedCaption:Disk pool 1 on SSVVM1
ActivityWindow:DataCore.Executive.TimeInterval
   
KeyData:DataCore.Executive.PerformanceInstanceKeyData
Alias:
Caption:Virtual disk 1 on SSVVM1
ExtendedCaption:Virtual disk 1 on SSVVM1
ActivityWindow:DataCore.Executive.TimeInterval
   

-------------- Example 2 Returns all instances for a specified category and finds the start and end time of an instance in the database --------------
$PoolInstances = Get-DcsRecordingInstance -Category DiskPool
$PoolInstances[0].ActivityWindow
		

The cmdlet is invoked to return all instances for the category "DiskPool" and the instances are stored in the variable $PoolInstances. The variable $PoolInstances is used to obtain the ActivityWindow data for the object which contains the start time and end time of the recorded data. Note: the EndTime field in the Activity Window will be at midnight on the last day of the instance in the recorded data. Note: In the ActivityWindow object, the timestamp for Center, StateTime and EndTime fields will always reflect midnight on the correct day.

KeyData:DataCore.Executive.PerformanceInstanceKeyData
Alias:
Caption:Disk pool 1
ExtendedCaption:Disk pool 1 on SSV1
ActivityWindow:DataCore.Executive.TimeInterval
   
KeyData:DataCore.Executive.PerformanceInstanceKeyData
Alias:
Caption:Disk pool 2
ExtendedCaption:Disk pool 2 on SSV2
ActivityWindow:DataCore.Executive.TimeInterval
   
   
Center:6/19/2013 12:00:00 PM
Period:139.00:00:00
IsValid:True
StartTime:4/11/2013 12:00:00 AM
EndTime:8/28/2013 12:00:00 AM
   

-------------- Example 3 Returns a specific instance for the specified endpoint --------------
Get-DcsRecordingInstance -InstanceId (Get-DcsClient -Client "HostVM1").Id -Endpoint "User recording endpoint"
		

The cmdlet is invoked with a value for the parameter InstanceId. The value is retrieved by invoking the cmdlet Get-DcsClient to get the ClientHostData object for the host named "HostVM1". The Id from the object is used as the instance value. The PerformanceInstanceData object for "HostVM1" is returned.

KeyData:DataCore.Executive.PerformanceInstanceKeyData
Alias:
Caption:HostVM1
ExtendedCaption:HostVM1
ActivityWindow:9/3/2015 8:20:00 PM - 9/3/2015 8:30:00 PM
   

-------------- Example 4 Uses an instance to retrieve performance data for an object category --------------
$PoolInstances = Get-DcsRecordingInstance -Category DiskPool
$PoolInstances[0].ActivityWindow
Center    : 4/2/2014 2:17:01 PM
Period    : 00:45:57.3670000
IsValid   : True
StartTime : 4/2/2014 1:54:02 PM
EndTime   : 4/2/2014 2:40:00 PM
$StartTime = $PoolInstances[0].ActivityWindow.StartTime
$EndTime = $PoolInstances[0].ActivityWindow.EndTime
$Resolution = (New-TimeSpan -Minutes 10)
$RecPerf = Get-DcsRecordingPerformance -StartTime $StartTime -EndTime $EndTime -Instance $PoolInstances[0] -Resolution $Resolution
$RecPerf.PerformanceSeries | Export-Csv -Path C:\Example.csv
			

The cmdlet Get-DcsRecordingInstance is used to retrieve recorded disk pool instances and store them in the variable $PoolInstances. The ActivityWindow for the first instance is retrieved and displayed. The Start time from the Activity Window is stored in the variable $StartTime and the End Time from the Activity Window is stored in the variable $EndTime. A resolution of 12 hours is stored in the variable $Resolution. the cmdlet Get-DcsRecordingPerformance is used to get the recording data for every 12 hours between the start time and end time and the performance data is stored in the variable $RecPerf. The Performance Series in the variable $RecPerf is exported to a CSV file named Example.csv located in the C:\ path. Data for all recorded disk pool counters are in the file. An excerpt from the Example.csv file follows:

#TYPE DataCore.Executive.DiskPoolPerformance
"TotalBytesTransferred","TotalBytesRead","TotalBytesWritten","TotalBytesMigrated","TotalReads","TotalWrites","TotalOperations","BytesAllocated","BytesAvailable","BytesInReclamation","BytesTotal","PercentAllocated","PercentAvailable","TotalReadTime","TotalWriteTime","MaxReadTime","MaxWriteTime","MaxReadWriteTime","MaxPoolBytes","BytesReserved","BytesAllocatedPercentage","BytesReservedPercentage","BytesInReclamationPercentage","BytesAvailablePercentage","BytesOverSubscribed","CollectionTime","NullCounterMap"
"9253376","5824512","3428864","0","2602","1664","4266","2147483648","92288109772","0","106568876032","13","86","172271","1457","74","6","74","1108127332171776","12133282611","2","11","0","86","23125338724761","4/2/2014 2:00:00 PM","18446744073675997184"
"90112","90112","0","0","16","0","16","536870912","106032005120","0","106568876032","1","99","1684","0","96","0","96","1108127332171776","0","1","0","0","99","23197923672064","4/2/2014 2:10:00 PM","18446744073675997184"
"199680","196608","3072","0","48","6","54","590558003","105978318028","0","106568876032","1","99","214","30","3","0","3","1108127332171776","0","1","0","0","99","23197923672064","4/2/2014 2:20:00 PM","18446744073675997184"
"832150528","817792000","14358528","26172456960","19845","7011","26856","104233487564","15837691904","72074919936","192146099404","58","41","2275090","161310","1084","646","1096","1108127332171776","0","58","0","33","8","23112346448691","4/2/2014 2:30:00 PM","18446744073675997184"
"436641792","430460928","6180864","20267139072","9196","3018","12214","108000531797","51136954368","54402919082","213540405248","51","48","1510510","24018","1067","207","1067","1108127332171776","0","51","0","25","23","23090952142848","4/2/2014 2:40:00 PM","18446744073675997184"
		

-------------- Example 5 Gets all disk pool instances for a server by passing the disk pool object --------------
Get-DcsPool -Server SSV1 | Get-DcsRecordingInstance
		

The cmdlet Get-DcsPool is invoked to get DiskPoolData objects for all pools on server SSV1. The objects are piped to the cmdlet Get-DcsRecordingInstance. In this case, there are recording instances in the recording database for two pools on SSV1: "Disk pool 1" and "SharedPool1".

KeyData:DataCore.Executive.PerformanceInstanceKeyData
Alias:
Caption:Disk pool 1
ExtendedCaption:Disk pool 1 on SSV1
ActivityWindow:DataCore.Executive.TimeInterval
   
KeyData:DataCore.Executive.PerformanceInstanceKeyData
Alias:
Caption:SharedPool1
ExtendedCaption:SharedPool1 on SSV1
ActivityWindow:DataCore.Executive.TimeInterval