Skip to content

Commit

Permalink
Add a README.md file to describe the utility:
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bernstein (DPLAT) authored and Michael Bernstein (DPLAT) committed Sep 25, 2024
1 parent 4b5a7c3 commit 52cc47d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions helpful_tools/Query-JobLimits/Query-JobLimits.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
############################################################
# Script to query the job limits inside a process-isolated container
############################################################

<#
.NOTES
Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down
56 changes: 56 additions & 0 deletions helpful_tools/Query-JobLimits/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## Query-JobLimits.ps1

#### NAME
Query-JobLimits.ps1

#### SYNOPSIS
Queries the job limits from inside a process-isolated container

#### SYNTAX
Query-JobLimits.ps1 [-LimitType <String>] [<CommonParameters>]


#### DESCRIPTION
Queries the job limits from inside a process-isolated container

Once the container platform has set a CPU or Memory limit, this utility
can be used to query those limits and potentially pass them to processes
or workloads inside the container.

#### PARAMETERS
-LimitType [<String>]
The limit type to query from within the container
Required? True
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

Determines the type of limit to query. The following values are supported:
- JobMemoryLimit: Returns the job memory limit in bytes
- PeakJobMemoryUsed: Returns the peak job memory used in bytes
- CpuRateControl: Returns the CPU rate control, if enabled, which is generally a cycle count out of a total of
10000

#### NOTES
Copyright (c) Microsoft Corporation. All rights reserved.
Use of this sample source code is subject to the terms of the Microsoft
license agreement under which you licensed this sample source code. If
you did not accept the terms of the license agreement, you are not
authorized to use this sample source code. For the terms of the license,
please see the license agreement between you and Microsoft or, if applicable,
see the LICENSE.RTF on your install media or the root of your tools installation.
THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.

#### Examples

PS C:\>.\Query-JobLimits.ps1 -LimitType JobMemoryLimit

PS C:\>.\Query-JobLimits.ps1 -LimitType PeakJobMemoryUsed

PS C:\>.\Query-JobLimits.ps1 -LimitType CpuRateControl

#### Prerequisites
Requires PowerShell version 5.0

0 comments on commit 52cc47d

Please sign in to comment.