cqueue - View Job Queue¶
cqueue displays information about jobs and steps in the queue. By default, it shows job information including pending,
running, and other states. Use the -s/--step option to query step information instead.
View all jobs in the cluster's queues:
Options¶
- -h, --help
-
Applies to:
job,step
Display help information for cqueue command. - -v, --version
-
Applies to:
job,step
Display cqueue version information. - -C, --config=<path>
-
Applies to:
job,step
Path to configuration file. Default: "/etc/crane/config.yaml". - -F, --full
-
Applies to:
job,step
Display full content without truncation. By default, only 30 characters per cell are displayed. - -N, --noheader
-
Applies to:
job,step
Hide table headers in output. - -m, --max-lines=<number>
-
Applies to:
job,step
Specify maximum number of output lines. For example,-m=500limits output to 500 lines. By default, displays 100 entries. - -i, --iterate=<seconds>
-
Applies to:
job,step
Refresh query results at specified intervals (in seconds). For example,-i=3outputs results every 3 seconds. - --json
-
Applies to:
job,step
Output command execution results in JSON format instead of table format. - -s, --step[=<stepid1,stepid2,...>]
-
Applies to:
step
Query step information instead of job information. Accepts optional comma-separated list of step IDs in formatjobid.stepid(e.g.,123.1,123.2,456.3). If no argument is provided, shows all steps. This option switches the query mode from jobs to steps. - -j, --job=<jobid1,jobid2,...>
-
Applies to:
job,step
Specify job IDs to query (comma-separated list). For example,-j=2,3,4. When used with--step, filters steps belonging to the specified jobs. - -n, --name=<name1,name2,...>
-
Applies to:
job,step
Specify job names to query (comma-separated list for multiple names). - -t, --state=<state>
-
Applies to:
job,step
Specify states to query. Valid values are 'pending(p)', 'running®' and 'all'. Default is 'all' (both pending and running). For steps, valid states include 'running' and other step-specific states. - -S, --start
-
Applies to:
job
Display start time. For pending jobs, shows expected start time. For running jobs, shows actual start time. - -u, --user=<username1,username2,...>
-
Applies to:
job,step
Specify users to query (comma-separated list for multiple users). Filters jobs or steps by the specified usernames. - -A, --account=<account1,account2,...>
-
Applies to:
job,step
Specify accounts to query (comma-separated list for multiple accounts). Filters jobs or steps by the specified accounts. - -p, --partition=<partition1,partition2,...>
-
Applies to:
job,step
Specify partitions to query (comma-separated list for multiple partitions). Filters jobs or steps by the specified partitions. - -q, --qos=<qos1,qos2,...>
-
Applies to:
job,step
Specify QoS to query (comma-separated list for multiple QoS). Filters jobs or steps by the specified Quality of Service levels. - --self
-
Applies to:
job,step
View jobs or steps submitted by current user only. - -o, --format=<format_string>
-
Applies to:
job,step
Customize output format using format specifiers. Fields are identified by a percent sign (%) followed by a character. Format specification syntax:%[.]<size><type>. Without size: field uses natural width. With size only (%5j): minimum width, left-aligned. With dot and size (%.5j): minimum width, right-aligned. The available format specifiers differ between job and step queries (see Format Specifiers sections below).
Default Output Fields¶
When querying jobs (default mode), the following fields are displayed:
- JobId: Job identification number
- Partition: Partition where the job is running
- Name: Job name
- User: Username of job owner
- Account: Account charged for the job
- Status: Current job state (e.g., RUNNING, PENDING)
- Type: Job type (e.g., BATCH, INTERACTIVE)
- TimeLimit: Time limit for the job
- Nodes: Number of nodes allocated
- NodeList: Names of nodes where the job is running
When querying steps (using --step), the following fields are displayed:
- StepId: Step identification in format jobid.stepid
- JobId: Parent job identification number
- Name: Step name
- Partition: Partition (inherited from parent job)
- User: Username (inherited from parent job)
- State: Current step state
- ElapsedTime: Time elapsed since step started
- NodeList: Names of nodes where the step is running
Job Format Specifiers¶
When querying jobs (default mode), the following format identifiers are supported (case-insensitive):
| Identifier | Full Name | Description |
|---|---|---|
| %a | Account | Account associated with the job |
| %c | AllocCpus | CPUs allocated to the job |
| %C | ReqCpus | Total CPUs requested by the job |
| %e | ElapsedTime | Elapsed time since job started |
| %h | Held | Hold state of the job |
| %j | JobID | Job ID |
| %k | Comment | Comment of the job |
| %l | TimeLimit | Time limit for the job |
| %L | NodeList | List of nodes the job is running on (or reason for pending) |
| %m | AllocMemPerNode | Allocated memory per node |
| %M | ReqMemPerNode | Requested memory per node |
| %n | Name | Job name |
| %N | NodeNum | Number of nodes requested by the job |
| %o | Command | Command line of the job |
| %p | Priority | Priority of the job |
| %P | Partition | Partition the job is running in |
| %q | QoS | Quality of Service level for the job |
| %Q | ReqCpuPerNode | Requested CPUs per node |
| %r | ReqNodes | Requested nodes |
| %R | Reason | Reason for pending status |
| %s | SubmitTime | Submission time of the job |
| %S | StartTime | Start time of the job |
| %t | State | Current state of the job |
| %T | JobType | Job type |
| %u | User | User who submitted the job |
| %U | Uid | UID of the job |
| %x | ExcludeNodes | Nodes excluded from the job |
| %X | Exclusive | Exclusive status of the job |
Step Format Specifiers¶
When querying steps (using --step), the following format identifiers are supported (case-insensitive):
| Identifier | Full Name | Description |
|---|---|---|
| %i | StepId | Step ID in format jobid.stepid |
| %j | JobId | Parent job ID |
| %n | Name | Step name |
| %P | Partition | Partition (inherited from parent job) |
| %u | User | Username (inherited from parent job) |
| %U | Uid | User ID |
| %e | ElapsedTime | Elapsed time since step started |
| %L | NodeList | List of nodes the step is running on |
| %t | State | Current state of the step |
| %l | TimeLimit | Time limit for the step |
| %N | NodeNum | Number of nodes allocated to the step |
| %a | Account | Account (inherited from parent job) |
| %q | QoS | Quality of Service (inherited from parent job) |
| %o | Command | Command line of the step |
Usage Examples¶
Basic Job Queries¶
View all jobs:

Display help:

Hide table header:

Show start times:

Filtering Jobs¶
Query specific jobs:

Filter by state (pending jobs):

Filter by state (running jobs, shorthand):

Query jobs for specific user:

Show only current user's jobs:

Query jobs for specific account:

Filter by partition:

Filter by job name:

Filter by QoS:

Output Control¶
Limit output to 3 lines:

Auto-refresh every 3 seconds:

JSON output:
Custom Format Output¶
Natural width for all fields:
Left-aligned with minimum widths:
Right-aligned with minimum widths:
Mixed formatting with labels:
Complex custom format:

Step Queries¶
Query all steps:
Query specific steps:
Query steps for a specific job:
Query steps with custom format:
Querying Container Jobs
Container jobs (Pods) and container steps are displayed with type Container. Use cacct --type Container to filter container jobs, or use cqueue --step -j <pod_job_id> to view container job steps. For more container operations, see ccon Command Manual.
Query steps for specific user:
Right-aligned format for steps:
Filter steps by state:
Query steps for multiple jobs: