cacct - View Job Accounting Information¶
cacct displays accounting information for jobs and steps in the cluster. It queries all job states, including completed, failed, and cancelled jobs. The output automatically includes jobs and their associated steps.
View all jobs and steps in the cluster:
Options¶
- -h, --help
-
Applies to:
Job,Step
Display help information for the cacct command. - -v, --version
-
Applies to:
Job,Step
Display cacct version information. - -C, --config=<path>
-
Applies to:
Job,Step
Configuration file path. Default: "/etc/crane/config.yaml". - -j, --job=<jobid1,jobid2,...>
-
Applies to:
Job,Step
Specify job IDs to query (comma-separated list). For example,-j=2,3,4. When querying jobs, results will be filtered by job ID. The output will include matching jobs and their associated steps. Supports using job step ID formatjobid.stepidto query specific steps. - -n, --name=<name1,name2,...>
-
Applies to:
Job,Step
Specify job names to query (comma-separated list for multiple names). - -u, --user=<username1,username2,...>
-
Applies to:
Job,Step
Specify users to query (comma-separated list for multiple users). Filter jobs and steps by the specified usernames. - -A, --account=<account1,account2,...>
-
Applies to:
Job,Step
Specify accounts to query (comma-separated list for multiple accounts). Filter jobs and steps by the specified accounts. - -p, --partition=<partition1,partition2,...>
-
Applies to:
Job,Step
Specify partitions to view (comma-separated list for multiple partitions). Default: all partitions. - -q, --qos=<qos1,qos2,...>
-
Applies to:
Job,Step
Specify QoS to view (comma-separated list for multiple QoS). Default: all QoS levels. - -t, --state=<state>
-
Applies to:
Job,Step
Specify job state to view. Supported states: 'pending' or 'p', 'running' or 'r', 'completed' or 'c', 'failed' or 'f', 'cancelled' or 'x', 'time-limit-exceeded' or 't', and 'all'. Default: 'all'. Multiple states can be specified as a comma-separated list. - -s, --submit-time=<time_range>
-
Applies to:
Job,Step
Filter jobs by submit time range. Supports closed intervals (format:2024-01-02T15:04:05~2024-01-11T11:12:41) or half-open intervals (format:2024-01-02T15:04:05~for after a specific time, or~2024-01-11T11:12:41for before a specific time). - -S, --start-time=<time_range>
-
Applies to:
Job,Step
Filter jobs by start time range. Format same as submit-time. - -E, --end-time=<time_range>
-
Applies to:
Job,Step
Filter jobs by end time range. Format same as submit-time. For example,~2023-03-14T10:00:00filters jobs that ended before the specified time. - -w, --nodelist=<node1,node2,...>
-
Applies to:
Job,Step
Specify node names to view (comma-separated list or pattern such as node[1-10]). Default: all nodes. - --type=<type1,type2,...>
-
Applies to:
Job,Step
Specify task types to view (comma-separated list). Valid values: 'Interactive', 'Batch', 'Container'. Default: all types. - -F, --full
-
Applies to:
Job,Step
Display full information without truncating fields. By default, each cell displays only 30 characters. - -N, --noheader
-
Applies to:
Job,Step
Hide table header in output. - -m, --max-lines=<number>
-
Applies to:
Job,Step
Specify the maximum number of output results. For example,-m=500limits output to 500 lines. Default: 100 lines. - --json
-
Applies to:
Job,Step
Output command execution results in JSON format instead of table format. - -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 or string. 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. See the Format Specifiers section below for available format identifiers.
Default Output Fields¶
When displaying default format, the following fields are shown:
- JobId: Job or job step identifier (format: jobid for jobs, jobid.stepid for steps)
- JobName: Job or job step name
- Partition: Partition where job/job step runs
- Account: Account billed for job/job step
- AllocCPUs: Number of allocated CPUs
- State: Job/job step state (e.g., COMPLETED, FAILED, CANCELLED)
- ExitCode: Exit code (format: exitcode:signal, see Exit Code Reference)
Format Specifiers¶
The following format identifiers are supported (case-insensitive):
| Identifier | Description |
|---|---|
| %a / %Account | Account associated with job/job step |
| %C / %ReqCpus | Number of requested CPUs |
| %c / %AllocCpus | Number of allocated CPUs |
| %D / %ElapsedTime | Elapsed time since job/job step started |
| %E / %EndTime | End time of job/job step |
| %e / %ExitCode | Exit code (format: exitcode:signal) |
| %h / %Held | Hold state of job |
| %j / %JobID | Job ID (or job step ID in format jobid.stepid) |
| %K / %Wckey | Workload characterization key |
| %k / %Comment | Comment for job |
| %L / %NodeList | List of nodes where job/job step runs |
| %l / %TimeLimit | Time limit for job/job step |
| %M / %ReqMemPerNode | Memory requested per node |
| %m / %AllocMemPerNode | Memory allocated per node |
| %N / %NodeNum | Number of nodes |
| %n / %JobName | Name of job/job step |
| %P / %Partition | Partition associated with job/job step |
| %p / %Priority | Priority of job |
| %q / %Qos | Quality of service level |
| %R / %Reason | Reason for pending state |
| %r / %ReqNodes | Requested nodes |
| %S / %StartTime | Start time of job/job step |
| %s / %SubmitTime | Submit time of job |
| %t / %State | Current state of job/job step |
| %T / %JobType | Job type (e.g., Batch, Interactive) |
| %U / %UserName | Username that submitted the job |
| %u / %Uid | User ID |
| %x / %ExcludeNodes | Nodes excluded from job |
| %X / %Exclusive | Exclusive state of job |
Usage Examples¶
Basic Queries¶
View all jobs and steps:

Display help:

Hide table header:

Filter by ID and Name¶
Query specific job IDs:

Query by job name:

Query by name pattern:

Filter by User and Account¶
Query jobs by user:

Query jobs by account:

Combine account and max lines:

Filter by Partition and QoS¶
Query jobs in a specific partition:

Query by QoS:

Time Range Filtering¶
Filter by start time range:

Filter by end time range:

Query jobs submitted in a time range:
Query jobs that started after a specific time:
Query jobs that ended before a specific time:
State Filtering¶
View only completed jobs:
View failed and cancelled jobs:
View timed-out jobs:
Filter by job type:
# View only container jobs
cacct --type Container
# View batch jobs
cacct --type Batch
# View interactive jobs
cacct --type Interactive
Container Job Management
In addition to basic queries, see ccon command manual for more container-specific operations.
Output Control¶
Limit output to 10 lines:

JSON output:
Custom Format Output¶
Specify custom output format:

All fields using natural width:
Left-aligned with minimum width:
Right-aligned with minimum width:
Mixed format with labels:
Combined Filtering¶
Multiple filters with full output:

Complex combined query:
