< Back
Get-AzureBatchPoolUsageMetrics
Post
NAME Get-AzureBatchPoolUsageMetrics
SYNOPSIS
Gets pool usage metrics for a Batch account.
SYNTAX
Get-AzureBatchPoolUsageMetrics -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-EndTime <DateTime>] [-Filter
<String>] [-StartTime <DateTime>] [<CommonParameters>]
DESCRIPTION
The Get-AzureBatchPoolUsageMetrics cmdlet gets the usage metrics, aggregated by pool across individual time intervals, for the specified account.
You can get the statistics for a specific pool and for a time range.
PARAMETERS
-BatchContext <BatchAccountContext>
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the Get-AzureRmBatchAccount
cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be used when interacting with the Batch service. To
use shared key authentication instead, use the Get-AzureRmBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys
populated. When using shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-EndTime <DateTime>
Specifies the end of a time range for which this cmdlet gets usage metrics. Specify a time at least two hours earlier. If you do not specify
an end time, this cmdlet uses the last aggregation interval currently available.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Filter <String>
Specifies an OData filter clause to use to filter the metrics that this cmdlet retruns. The only valid property is poolId with a string value.
Possible operations are the following: eq, ge, gt, le, lt, startswith.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StartTime <DateTime>
Specifies the start of a time range for which this cmdlet gets usage metrics. Specify a time at least two and a half hours earlier. If you do
not specify a start time, this cmdlet uses the last aggregation interval currently available.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BatchAccountContext
Parameter 'BatchContext' accepts value of type 'BatchAccountContext' from the pipeline
OUTPUTS
PSPoolUsageMetrics
NOTES
Example 1: Get pool usage metrics for a time range
PS C:\\>$Context = Get-AzureRmBatchAccountKeys -AccountName "ContosoBatchAccount"
PS C:\\> $StartTime = Get-Date -Date "2016-05-16 00:00:00Z"
PS C:\\> $EndTime = Get-Date -Date "2016-05-16 01:00:00Z"
PS C:\\> Get-AzureBatchPoolUsageMetrics -StartTime $StartTime -EndTime $EndTime -BatchContext $context
DataEgressGiB : 6.68875873088837E-06
DataIngressGiB : 1.9485130906105E-05
EndTime : 5/16/2016 12:30:00 AM
PoolId : testpool1
StartTime : 5/16/2016 12:00:00 AM
TotalCoreHours : 8
VirtualMachineSize : standard_d4
DataEgressGiB : 5.61587512493134E-06
DataIngressGiB : 1.76150351762772E-05
EndTime : 5/16/2016 12:30:00 AM
PoolId : testpool2
StartTime : 5/16/2016 12:00:00 AM
TotalCoreHours : 12
VirtualMachineSize : standard_d4
DataEgressGiB : 7.36676156520844E-06
DataIngressGiB : 2.10804864764214E-05
EndTime : 5/16/2016 1:00:00 AM
PoolId : testpool1
StartTime : 5/16/2016 12:30:00 AM
TotalCoreHours : 7.99999999955555
VirtualMachineSize : standard_d4
DataEgressGiB : 5.80586493015289E-06
DataIngressGiB : 1.80602073669434E-05
EndTime : 5/16/2016 1:00:00 AM
PoolId : testpool2
StartTime : 5/16/2016 12:30:00 AM
TotalCoreHours : 11.9999999993333
VirtualMachineSize : standard_d4
The first command creates an object reference to the account keys for the batch account named ContosoBatchAccount by using
Get-AzureRmBatchAccountKeys . The command stores this object reference in the $Context variable.
The next two commands create DateTime objects by using the Get-Date cmdlet. The commands store these values in the $StartTime and $EndTime
variables for use with the final command.
The final command returns all of the pool usage metrics, aggregated by pool, across time interval between the specified start and end times.
Example 2: Get pool usage metrics by using a filter
PS C:\\>Get-AzureBatchPoolUsageMetrics -Filter "poolId eq 'ContosoPool'" -BatchContext $Context
DataEgressGiB : 9.0496614575386E-06
DataIngressGiB : 2.60043889284134E-05
EndTime : 5/16/2016 5:30:00 PM
PoolId : MyPool
StartTime : 5/16/2016 5:00:00 PM
TotalCoreHours : 12
VirtualMachineSize : standard_d4
This command returns the usage metrics for pool named ContosoPool. The command specifies a filter string to specify that pool, and uses the same
$Context value as the previous example.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... agemetrics
Get-AzureRmBatchAccountKeys
Get-AzureBatchPoolStatistics
Get-AzureBatchJobStatistics
SYNOPSIS
Gets pool usage metrics for a Batch account.
SYNTAX
Get-AzureBatchPoolUsageMetrics -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-EndTime <DateTime>] [-Filter
<String>] [-StartTime <DateTime>] [<CommonParameters>]
DESCRIPTION
The Get-AzureBatchPoolUsageMetrics cmdlet gets the usage metrics, aggregated by pool across individual time intervals, for the specified account.
You can get the statistics for a specific pool and for a time range.
PARAMETERS
-BatchContext <BatchAccountContext>
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the Get-AzureRmBatchAccount
cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be used when interacting with the Batch service. To
use shared key authentication instead, use the Get-AzureRmBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys
populated. When using shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-EndTime <DateTime>
Specifies the end of a time range for which this cmdlet gets usage metrics. Specify a time at least two hours earlier. If you do not specify
an end time, this cmdlet uses the last aggregation interval currently available.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Filter <String>
Specifies an OData filter clause to use to filter the metrics that this cmdlet retruns. The only valid property is poolId with a string value.
Possible operations are the following: eq, ge, gt, le, lt, startswith.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StartTime <DateTime>
Specifies the start of a time range for which this cmdlet gets usage metrics. Specify a time at least two and a half hours earlier. If you do
not specify a start time, this cmdlet uses the last aggregation interval currently available.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BatchAccountContext
Parameter 'BatchContext' accepts value of type 'BatchAccountContext' from the pipeline
OUTPUTS
PSPoolUsageMetrics
NOTES
Example 1: Get pool usage metrics for a time range
PS C:\\>$Context = Get-AzureRmBatchAccountKeys -AccountName "ContosoBatchAccount"
PS C:\\> $StartTime = Get-Date -Date "2016-05-16 00:00:00Z"
PS C:\\> $EndTime = Get-Date -Date "2016-05-16 01:00:00Z"
PS C:\\> Get-AzureBatchPoolUsageMetrics -StartTime $StartTime -EndTime $EndTime -BatchContext $context
DataEgressGiB : 6.68875873088837E-06
DataIngressGiB : 1.9485130906105E-05
EndTime : 5/16/2016 12:30:00 AM
PoolId : testpool1
StartTime : 5/16/2016 12:00:00 AM
TotalCoreHours : 8
VirtualMachineSize : standard_d4
DataEgressGiB : 5.61587512493134E-06
DataIngressGiB : 1.76150351762772E-05
EndTime : 5/16/2016 12:30:00 AM
PoolId : testpool2
StartTime : 5/16/2016 12:00:00 AM
TotalCoreHours : 12
VirtualMachineSize : standard_d4
DataEgressGiB : 7.36676156520844E-06
DataIngressGiB : 2.10804864764214E-05
EndTime : 5/16/2016 1:00:00 AM
PoolId : testpool1
StartTime : 5/16/2016 12:30:00 AM
TotalCoreHours : 7.99999999955555
VirtualMachineSize : standard_d4
DataEgressGiB : 5.80586493015289E-06
DataIngressGiB : 1.80602073669434E-05
EndTime : 5/16/2016 1:00:00 AM
PoolId : testpool2
StartTime : 5/16/2016 12:30:00 AM
TotalCoreHours : 11.9999999993333
VirtualMachineSize : standard_d4
The first command creates an object reference to the account keys for the batch account named ContosoBatchAccount by using
Get-AzureRmBatchAccountKeys . The command stores this object reference in the $Context variable.
The next two commands create DateTime objects by using the Get-Date cmdlet. The commands store these values in the $StartTime and $EndTime
variables for use with the final command.
The final command returns all of the pool usage metrics, aggregated by pool, across time interval between the specified start and end times.
Example 2: Get pool usage metrics by using a filter
PS C:\\>Get-AzureBatchPoolUsageMetrics -Filter "poolId eq 'ContosoPool'" -BatchContext $Context
DataEgressGiB : 9.0496614575386E-06
DataIngressGiB : 2.60043889284134E-05
EndTime : 5/16/2016 5:30:00 PM
PoolId : MyPool
StartTime : 5/16/2016 5:00:00 PM
TotalCoreHours : 12
VirtualMachineSize : standard_d4
This command returns the usage metrics for pool named ContosoPool. The command specifies a filter string to specify that pool, and uses the same
$Context value as the previous example.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... agemetrics
Get-AzureRmBatchAccountKeys
Get-AzureBatchPoolStatistics
Get-AzureBatchJobStatistics