You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/batch/batch-application-packages.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Deploy application packages to compute nodes
3
3
description: Learn how to use the application packages feature of Azure Batch to easily manage multiple applications and versions for installation on Batch compute nodes.
Copy file name to clipboardExpand all lines: articles/batch/batch-get-resource-counts.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,27 @@
1
1
---
2
2
title: Count states for tasks and nodes
3
3
description: Count the state of Azure Batch tasks and compute nodes to help manage and monitor Batch solutions.
4
-
ms.date: 12/13/2021
4
+
ms.date: 04/25/2025
5
5
ms.topic: how-to
6
6
ms.devlang: csharp
7
7
---
8
8
# Monitor Batch solutions by counting tasks and nodes by state
9
9
10
10
To monitor and manage large-scale Azure Batch solutions, you may need to determine counts of resources in various states. Azure Batch provides efficient operations to get counts for Batch tasks and compute nodes. You can use these operations instead of potentially time-consuming list queries that return detailed information about large collections of tasks or nodes.
11
11
12
-
-[Get Task Counts](/rest/api/batchservice/job/gettaskcounts) gets an aggregate count of active, running, and completed tasks in a job, and of tasks that succeeded or failed. By counting tasks in each state, you can more easily display job progress to a user, or detect unexpected delays or failures that may affect the job.
12
+
-[Get Task Counts](/rest/api/batchservice/job/gettaskcounts) gets an aggregate count of active, running, and completed tasks in a job, and of tasks that succeeded or failed. By counting tasks in each state, you can easily display job progress to a user, or detect unexpected delays or failures that may affect the job.
13
13
14
14
-[List Pool Node Counts](/rest/api/batchservice/account/listpoolnodecounts) gets the number of dedicated and [Spot compute nodes](batch-spot-vms.md) in each pool that are in various states: creating, idle, offline, preempted, rebooting, reimaging, starting, and others. By counting nodes in each state, you can determine when you have adequate compute resources to run your jobs, and identify potential issues with your pools.
15
15
16
-
Note that at times, the numbers returned by these operations may not be up to date. If you need to be sure that a count is accurate, use a list query to count these resources. List queries also let you get information about other Batch resources such as applications. For more information about applying filters to list queries, see [Create queries to list Batch resources efficiently](batch-efficient-list-queries.md).
16
+
At times, the numbers returned by these operations may not be up to date. If you need to be sure that a count is accurate, use a list query to count these resources. List queries also let you get information about other Batch resources such as applications. For more information about applying filters to list queries, see [Create queries to list Batch resources efficiently](batch-efficient-list-queries.md).
17
17
18
18
## Task state counts
19
19
20
-
The Get Task Counts operation counts tasks by the following states:
20
+
The `Get` Task Counts operation counts tasks by the following states:
21
21
22
-
-**Active**: A task that is queued and able to run, but is not currently assigned to a compute node. A task is also `active` if it is [dependent on a parent task](batch-task-dependencies.md) that has not yet completed.
23
-
-**Running**: A task that has been assigned to a compute node, but has not yet completed. A task is counted as `running` when its state is either `preparing` or `running`, as indicated by the [Getinformation about a task](/rest/api/batchservice/task/get) operation.
24
-
-**Completed**: A task that is no longer eligible to run, because it either finished successfully, or finished unsuccessfully and also exhausted its retry limit.
22
+
-**Active**: A task that's queued and ready to run but isn't currently assigned to any compute node. A task is also `active` if it's [dependent on a parent task](batch-task-dependencies.md) that hasn't yet completed.
23
+
-**Running**: A task that has been assigned to a compute node but hasn't yet finished. A task is counted as `running` when its state is either `preparing` or `running`, as indicated by the [`Get`information about a task](/rest/api/batchservice/task/get) operation.
24
+
-**Completed**: A task that's no longer eligible to run, because it either finished successfully, or finished unsuccessfully and also exhausted its retry limit.
25
25
-**Succeeded**: A task where the result of task execution is `success`. Batch determines whether a task has succeeded or failed by checking the `TaskExecutionResult` property of the [executionInfo](/rest/api/batchservice/task/get) property.
26
26
-**Failed**: A task where the result of task execution is `failure`.
27
27
@@ -43,19 +43,19 @@ You can use a similar pattern for REST and other supported languages to get task
43
43
44
44
The List Pool Node Counts operation counts compute nodes by the following states in each pool. Separate aggregate counts are provided for dedicated nodes and Spot nodes in each pool.
45
45
46
-
-**Creating**: An Azure-allocated VM that has not yet started to join a pool.
47
-
-**Idle**: An available compute node that is not currently running a task.
46
+
-**Creating**: An Azure-allocated VM that hasn't yet started to join a pool.
47
+
-**Idle**: A compute node that's availale and currently not running any tasks.
48
48
-**LeavingPool**: A node that is leaving the pool, either because the user explicitly removed it or because the pool is resizing or autoscaling down.
49
49
-**Offline**: A node that Batch cannot use to schedule new tasks.
50
50
-**Preempted**: A Spot node that was removed from the pool because Azure reclaimed the VM. A `preempted` node can be reinitialized when replacement Spot VM capacity is available.
51
51
-**Rebooting**: A node that is restarting.
52
-
-**Reimaging**: A node on which the operating system is being reinstalled.
52
+
-**Reimaging**: A node where the OS is being reinstalled.
53
53
-**Running** : A node that is running one or more tasks (other than the start task).
54
-
-**Starting**: A node on which the Batch service is starting.
55
-
-**StartTaskFailed**: A node on which the [start task](/rest/api/batchservice/pool/add#starttask) failed and exhausted all retries, and on which `waitForSuccess` is set on the start task. The node is not usable for running tasks.
54
+
-**Starting**: A node where the Batch service is starting up.
55
+
-**StartTaskFailed**: A node where the [start task](/rest/api/batchservice/pool/add#starttask) failed after all retries, and `waitForSuccess` is enabled. This node cannot run tasks.
56
56
-**Unknown**: A node that lost contact with the Batch service and whose state isn't known.
57
57
-**Unusable**: A node that can't be used for task execution because of errors.
58
-
-**WaitingForStartTask**: A node on which the start task started running, but `waitForSuccess` is set and the start task has not completed.
58
+
-**WaitingForStartTask**: A node on which the start task is running, but `waitForSuccess` is enabled and it hasn't completed.
59
59
60
60
The following C# snippet shows how to list node counts for all pools in the current account:
0 commit comments