NAME

Get-DcsPerformanceCounter

SYNOPSIS

Returns performance counter data for the specified object.

SYNTAX

Get-DcsPerformanceCounter   -Object <Object>   [ -Connection <String> ]   [ -PipelineVariable <String> ]

DESCRIPTION

Returns performance counter data for the specified object. Some counter values accumulate and some counter values are displayed as the value at collection time (CollectionTime field in the returned object, see example). The accumulated values in returned objects are raw, unprocessed data at collection time, not "per second" as displayed in the DataCore Management Console. For instance, to receive values per second the cmdlet would have to be invoked at least twice to calculate values per second. Descriptions of performance counters are provided as tool tips in the Performance tool in the DataCore DataCore Management Console. Some counters in the Performance tool are derived from raw data counters found in PerformanceData objects. Therefore, some raw data counters may not appear in the tool and some derived counters may not appear in retrieved PerformanceData objects. Special notes about these raw data counters are documented. For the Pool PerformanceData object: TotalWriteTime is a cumulative counter that measures the total time it took to perform all the write I/Os to the back-end pool disk. It is used to compute the Average Time/Write counter in the Performance tool. Average Time per Write = ∆ TotalWriteTime / ∆ TotalWrites. TotalReadTime is a cumulative counter that measures the total time it took to perform all read I/Os to the back-end pool disk. It is used to compute the Average Time/Read counter in the Performance tool. Average Time per Read = ∆ TotalReadTime / ∆ TotalReads.

PARAMETERS

-Object<Object>
Any object or ID that identifies one of the following object types: servers, server SCSI ports, server groups, client hosts, host groups, client host SCSI ports, physical disks, pool Members, pools, pool mirrors, virtual disks, snapshots, logical disks, logical disks with Continuous Data Protection, virtual logical units, target devices, and target domains. Special Notes: To get performance counter data for a shared physical disk, provide the SharedPhysicalDiskData object; data will be aggregated from all servers sharing the physical disk. If the PhysicalDiskData object is provided for a shared physical disk, then the performance counter data returned will only be from one server. To get performance counter data for a shared disk pool, always provide the SharedDiskPoolData object for the pool.

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

-Connection<String>
Alias of the connection to the server group. If not specified, the default connection is 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

Object : Any object that has performance counters, used to identify the Object parameter.

OUTPUTS

PerformanceData : Object that describes the performance data for an object.

NOTES

To add counters to a recording session, see Add-DcsRecordingPoint. Also see Get-DcsRecordingInstance, Get-DcsRecordingPerformance, Get-DcsRecordingPoint, Get-DcsRecordingResolution, Get-DcsRecordingEndpoint, Get-DcsRecordingSession, Get-DcsRecordingStatistics

EXAMPLES


-------------- Example 1 Returns data for a specified SAN component by piping an object --------------
Get-DcsPool -Server SSV1 -Pool "Disk pool 1" | Get-DcsPerformanceCounter
			

The cmdlet Get-DcsPool is used to obtain the object for the pool named "Disk pool 1". The server "SSV1" must be specified because the same pool name exists on another server in the server group. The object is piped to Get-DcsPerformance to returns the Performance counter data for the pool "Disk pool 1" on server "SSV1".
(In the example output, the collection time uses the UTC time standard.)


TotalBytesTransferred:402739200
TotalBytesRead:402739200
TotalBytesWritten:0
TotalBytesMigrated:0
TotalReads:2607
TotalWrites:0
TotalOperations:2607
BytesAllocated:402653184
BytesAvailable:159584878592
BytesInReclamation:0
BytesTotal:159987531776
PercentAllocated:0
PercentAvailable:99
TotalReadTime:226572
TotalWriteTime:0
MaxReadTime:0
MaxWriteTime:0
MaxReadWriteTime:0
MaxnumberChunks:8290112
BytesReserved:0
CollectionTime:8/11/2011 3:16:29 PM
   

-------------- Example 2 Returns data for a specific counter in an object. --------------
Get-DcsLogicalDisk -VirtualDisk 'Virtual Disk 1' -Server SSV2 | Get-DcsPerformanceCounter | select-object BytesAllocated
			

The cmdlet Get-DcsLogicalDisk is used to obtain the LogicalDiskData object for the logical disk in "Virtual Disk 1" that resides on server "SSV2". This object is piped to Get-DcsPerformanceCounter to return the Bytes Allocated value for the logical disk on server "SSV2" within "Virtual Disk 1". The BytesAllocated Member contains the amount of pool space allocated to Virtual Disk 1 on SSV2.

BytesAllocated
--------------
4194304
		

-------------- Example 3 Returns bytes allocated for all virtual disks in the server group in a text file --------------
$resultsLocation = "C:\"
$allocationResult = @()
foreach($vd in (Get-DcsVirtualDisk))
{
$result = New-Object PSObject
$result | Add-Member -MemberType NoteProperty -Name "Virtual Disk" -Value ($vd.Alias)
$result | Add-Member -MemberType NoteProperty -Name "Allocation" -Value (($vd[0] | Get-DcsPerformanceCounter).BytesAllocated)
$result | Add-Member -MemberType NoteProperty -Name "Size" -Value "Bytes"
$allocationResult += $result
}
$allocationResult > $resultsLocation\allocation-results.txt

This is a script file which retrieves the number of allocated bytes for each virtual disk in the server group. A high level explanation follows. The number of allocated bytes is part of the performance data for the virtual disk. The cmdlet Get-DcsVirtualDisk is invoked to retrieve the virtual disk objects. The objects are passed to the cmdlet Get-DcsPerformanceCounter in order to get the count for BytesAllocated in the PerformanceData object. A custom object is created with the data returned from the cmdlets. The virtual disk name and allocation size are output to the file allocation-results.txt in the specified folder location.

Virtual Disk                        Allocation Size
------------                        ---------- ----
Virtual disk 1                     53284438016 Bytes
Virtual disk 2                     30601641984 Bytes
Virtual disk 3                     24293408768 Bytes
Virtual disk 4                     24024973312 Bytes
		

-------------- Example 4 Returns pool allocations for the server group --------------
$MiB = 1024*1024
$Pools = Get-DcsPool
foreach($p in $Pools)
{
Write-Host "Allocation for" $p.ExtendedCaption " = " $Alloc ($p | Get-DcsPerformanceCounter | % {$_.BytesAllocated/$MiB}) "MiB"
Write-Host
}
			

This simple script file returns the allocations for each pool in the server group in megabytes. The cmdlet Get-DcsPool is used to get the DiskPoolData objects for all pools in the server group and assign to the variable $Pools. For each object in $Pools, the variable is used to output the name of the pool and is piped to the cmdlet Get-DcsPerformanceCounter. The returned performance data is used to get the bytes allocated for each pool. The bytes allocated is multiplied by 1024 * 1024 to get the number of megabytes allocated for each pool.

Allocation for Disk pool 1 on SSV1  =  1408 MiB
Allocation for Shared pool 1 on SSV1  =  2176 MiB
Allocation for Disk pool 2 on SSV2  =  896 MiB
Allocation for Shared pool 1 on SSV2  =  2176 MiB
Allocation for Disk pool 3 on SSV3  =  512 MiB
Allocation for Shared pool 1 on SSV3  =  2176 MiB
		

-------------- Example 5 Returns performance metrics for physical disks in a specified pool. --------------
Get-DcsPoolMember -Pool "Disk pool 1" | Get-DcsPerformanceCounter
		

The cmdlet Get-DcsPoolMember is invoked to obtain the PoolMemberData object for the pool "Disk pool 1" and the results are piped to the cmdlet Get-DcsPerformanceCounter to retrieve the counters for the physical disk in the pool. In this case, there is one physical disk in the pool so one object is returned.

BytesAllocated:268435456
BytesAvailable:20803747840
BytesInReclamation:0
BytesRecovered:0
BytesRemainingToRecover:0
BytesTotalToRecover:0
BytesMigrated:0
CollectionTime:9/8/2015 8:18:16 PM
NullCounterMap:0
   

-------------- Example 6 Get the current retention period when Continous Data Protection is enabled. --------------
Get-DcsLogicalDisk -VirtualDisk "Virtual Disk 1" -Server SSV2 | Get-DcsPerformanceCounter
			

To obtain the up-to-date retention period of a virtual disk with CDP, invoke the cmdlet Get-DcsLogicalDisk for the virtual disk "Virtual Disk 1" for the Server named "SSV2" and pipe the results to the cmdlet Get-DcsPerformanceCounter. The Retention Period is in milliseconds.
The result of the following is in hours:


(Get-DcsLogicalDisk -VirtualDisk "[VIRTUAL DISK NAME]" -Server [DATACORE SERVER NAME] | Get-DcsPerformanceCounter).RetentionPeriod/(1000*60*60)
DestageTime:63585965524000
StreamBytesCopied:0
StreamBytesTotal:1
StreamRevertOrDetachPercent:0
StreamAllocationPercent:1
RetentionPeriod:85289386
BytesAllocated:0
BytesMigrated:0
BytesOutOfAffinity:0
TotalBytesTransferred:5632
TotalBytesRead:5632
TotalBytesWritten:0
TotalOperations:4
TotalReads:4
TotalWrites:0
CacheReadHits:4
CacheReadMisses:0
CacheWriteHits:0
CacheWriteMisses:0
CacheReadHitBytes:5632
CacheReadMissBytes:0
CacheWriteHitBytes:0
CacheWriteMissBytes:0
PercentRecovered:0
PendingClientIOsToMirror:0
PendingRecoveryIOs:0
RemoteReads:0
RemoteWrites:0
BytesRecovered:0
BytesToRecover:0
TotalReadTime:0
TotalWriteTime:0
MaxReadTime:0
MaxWriteTime:0
PercentReplaced:0
CacheBackendTotalWrites:0
CacheBackendTotalReads:0
CacheBackendTotalWriteTime:0
CacheBackendTotalReadTime:0
CacheBackendMaxReadTime:0
CacheBackendMaxWriteTime:0
CacheBackendMaxIOTime:0
CollectionTime:12/18/2015 3:53:33 PM
NullCounterMap:0