Queries the list of jobs in a specified cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ehpc:ListJobs |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The cluster ID. You can call ListClusters to query the cluster ID. |
ehpc-hz-csbua72*** |
| PageNumber |
string |
No |
The page number of the list.
|
1 |
| PageSize |
string |
No |
The number of entries per page when using paged query. Paging is applied to the results.
|
10 |
| JobFilter |
object |
No |
The job filter information. |
|
| Users |
array |
No |
The list of users who run the jobs. |
|
|
string |
No |
The username of the user who runs the job. Fuzzy match is supported. You can call ListUsers to query the usernames in the cluster. |
testuser1 |
|
| Queues |
array |
No |
The list of queues that run the jobs. |
|
|
string |
No |
The name of the queue that runs the job. Fuzzy match is supported. |
comp |
|
| Nodes |
array |
No |
The list of compute nodes that run the jobs. |
|
|
string |
No |
The hostname of the compute node. Fuzzy match is supported. |
compute000 |
|
| JobName |
string |
No |
The job name. Fuzzy match is supported. |
testjob |
| JobStatus |
string |
No |
The job status. Valid values:
Default value: all. |
all |
| CreateTimeStart |
string |
No |
The start time of the job. The value is a UNIX timestamp representing the number of seconds that have elapsed since 1970-01-01T00:00:00Z. |
1724122486 |
| CreateTimeEnd |
string |
No |
The last update time of the job. The value is a UNIX timestamp representing the number of seconds that have elapsed since 1970-01-01T00:00:00Z. |
1724123085 |
| SortBy |
object |
No |
The sorting configuration for the job list. |
|
| ExecuteOrder |
string |
No |
Sorts jobs by execution time. Valid values:
Default value: desc. |
asc |
| SubmitOrder |
string |
No |
Sorts jobs by submission time. Valid values:
Default value: desc. |
asc |
| PendOrder |
string |
No |
Sorts jobs by queue wait time. Valid values:
Default value: desc. |
desc |
| Diagnosis |
array<object> |
No |
The job diagnostic analysis list. |
|
|
object |
No |
The job diagnostic analysis details. |
||
| Option |
string |
No |
The job diagnostic analysis metric. |
run_duration |
| Operator |
string |
No |
The comparison operator for the job diagnostic threshold. Valid values:
|
greater |
| Threshold |
string |
No |
The job diagnostic threshold. |
24 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| TotalCount |
integer |
The total number of entries returned. |
10 |
| RequestId |
string |
The request ID. |
EABFBD93-58BE-53F3-BBFE-8654BB2E**** |
| PageNumber |
integer |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
The number of entries per page set for the paged query. Paging settings apply. Default value: 10. |
20 |
| Success |
boolean |
Indicates whether the command was run and the result was obtained. Valid values:
|
true |
| Jobs |
array<object> |
The job list. |
|
|
array<object> |
The job information. |
||
| JobName |
string |
The job name. |
testjob |
| JobSpec |
object |
The job configuration. |
|
| Id |
string |
The job ID. |
12 |
| RunasUser |
string |
The user that ran the job. |
testuser1 |
| Comment |
string |
The job description. |
jobDescription |
| State |
string |
The job state. Valid values: (PBS cluster and Slurm cluster)
|
Running |
| StderrPath |
string |
The error output path. |
./Temp |
| StdoutPath |
string |
The standard output path. |
./Temp |
| Priority |
string |
The job priority. Valid values: 0 to 9. A larger value indicates a higher priority. |
0 |
| ArrayRequest |
string |
The queue format of the job.
|
1-5:2 |
| LastModifyTime |
string |
The time when the job was last updated. |
1724123085 |
| NodeList |
string |
The compute nodes that were used to run the job. |
compute[002,005,003] |
| SubmitTime |
string |
The time when the job was submitted. |
1724122486 |
| JobQueue |
string |
The queue name. |
comp |
| Variables |
string |
The variables of the job. |
{"PBS_O_SHELL":"/bin/bash", "PBS_O_HOST":"manager", "PBS_O_SYSTEM":"Linux", "PBS_O_LANG":"en_US.UTF-8", "PBS_O_QUEUE":"workq"} |
| Resources |
object |
The information about the resources required to run the job. |
|
| Nodes |
string |
The number of compute nodes that were used to run the job. |
3 |
| Cores |
string |
The number of vCPUs that were used to run the job. |
6 |
| Memory |
string |
The size of memory that was used to run the job. |
1536MB |
| Gpus |
string |
The number of GPUs that were used to run the job. |
0 |
| ArrayJobId |
string |
The array job ID. |
4 |
| ArrayJobSubId |
string |
The ID of the job in the array. |
1 |
| ResourcesActualOccupied |
object |
Actual resource usage of the job program |
|
| Nodes |
string |
Number of compute nodes. |
2 |
| Cores |
string |
Number of CPU cores. |
4 |
| Memory |
string |
Number of memory. |
982MB |
| Gpus |
string |
Number of CPUs |
0 |
| StartTime |
string |
Job start time. |
1724122486 |
Examples
Success response
JSON format
{
"TotalCount": 10,
"RequestId": "EABFBD93-58BE-53F3-BBFE-8654BB2E****",
"PageNumber": 1,
"PageSize": 20,
"Success": true,
"Jobs": [
{
"JobName": "testjob",
"JobSpec": {
"Id": "12",
"RunasUser": "testuser1",
"Comment": "jobDescription",
"State": "Running",
"StderrPath": "./Temp",
"StdoutPath": "./Temp",
"Priority": "0",
"ArrayRequest": "1-5:2",
"LastModifyTime": "1724123085",
"NodeList": "compute[002,005,003]",
"SubmitTime": "1724122486",
"JobQueue": "comp",
"Variables": "{\"PBS_O_SHELL\":\"/bin/bash\", \t\"PBS_O_HOST\":\"manager\", \t\"PBS_O_SYSTEM\":\"Linux\", \t\"PBS_O_LANG\":\"en_US.UTF-8\", \t\"PBS_O_QUEUE\":\"workq\"}",
"Resources": {
"Nodes": "3",
"Cores": "6",
"Memory": "1536MB",
"Gpus": "0"
},
"ArrayJobId": "4",
"ArrayJobSubId": "1",
"ResourcesActualOccupied": {
"Nodes": "2",
"Cores": "4",
"Memory": "982MB",
"Gpus": "0"
},
"StartTime": "1724122486"
}
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | The specified parameter %s is invalid. |
| 403 | InvalidClusterStatus | The operation failed due to invalid cluster status. | The cluster status does not support the operation. |
| 404 | ClusterNotFound | The specified cluster does not exist. | The specified instance does not exist. |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The request has failed due to a temporary failure of the server. |
| 406 | DbError | A database service error occurred. | Database request failed. |
| 406 | EcsError | An error occurred while calling the ECS API operation. | ECS API call error. %s |
| 406 | AgentError | The agent service request failed: %s | Operation unsuccessful: %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.