jobs
This command can be used to list active and historic jobs.
Usage
bx jobs [-ad] [--help] [-f=<fromId>] [-l=<limit>] [-u=<user>]
Parameters and output
- Parameters
- Column Description
| Shorthand | Long version | Description |
|---|---|---|
-a | --all | Return both running and past jobs |
-l | --limit | Maximum number of jobs to return |
-u | --user | Show only jobs of the specified user |
-f | --fromId | Minimum job id |
-d | --detailed | Detailed information |
--help | Show this help message and exit |
| Name | Description |
|---|---|
ID | Job Id |
IMAGE | Image coordinates |
AGO | Elapsed time since job was submitted |
USER | User that submitted the job |
BX-UNITS | vCPUs, memory (MB) and GPUs assigned by the user to the job |
INPUT | Input size |
STATUS | Job Status |
COST/H | Job's cost per hour based on the BX-UNITS |
RUNTIME | Job run time |
COST | Job cost, based on For running jobs this will be the current job expense. |
List active jobs
Submit a job using the hello-world image.
$ bx submit tutorial/hello-world:0.0.8 '{"yourName":"Michael Jordan"}'
[batchx] [INFO] [2020/03/08 10:58:25] Submitting job...
[batchx] [INFO] [2020/03/08 10:58:25] Job submitted with id 1105
Use the bx jobs command to display all active jobs.
$ bx jobs
ID IMAGE AGO USER BX-UNITS INPUT STATUS COST/H RUNTIME COST
1105 b@t/hello-world:1.0.0 14 s david 1x1000x0 SUBMITTED 0.34 USD 0.00 USD
Adding the -d parameter (detailed information) will provide more information in the IMAGE column, which will show the full image coordinates and in the RUNTIME column, which will use seconds as units.
$ bx jobs -d
ID IMAGE AGO USER BX-UNITS INPUT STATUS COST/H RUNTIME COST
1105 batchx@tutorial/hello-world:1.0.0 26 s david 1x1000x0 SUBMITTED 0.34 USD 0.00 USD
List all jobs
Show the latest jobs with the bx jobs -a -l 3 command, which will display the last three jobs that were submitted (regardless of their status).
In this case, as shown in the STATUS column, the job 1103 succeed, the job 1104 was cancelled and the job 1105 was recently submitted.
$ bx jobs
ID IMAGE AGO USER BX-UNITS INPUT STATUS COST/H RUNTIME COST
1105 b@t/hello-world:1.0.0 14 s david 1x1000x0 SUBMITTED 0.34 USD 0.00 USD
1104 b@b/ctat/starfusion:0.0.2 12 h nacho 1x45000x0 50.3 GB CANCELLED 3.78 USD 22 m 1.42 USD
1103 b@b/ctat/starfusion:0.0.1 12 h david 1x45000x0 50.3 GB SUCCEEDED 3.78 USD 29 m 1.83 USD