cacct - View Job Accounting Information¶
cacct displays accounting information for jobs in the cluster.
View all job information in the cluster (all states), displaying up to 100 entries by default.
cacct Execution Results

Output Fields¶
- TaskId: Job ID
- TaskName: Job name
- Partition: Job partition
- Account: Job account
- AllocCPUs: Number of allocated CPUs
- State: Job state
- ExitCode: Job exit code (see Exit Code reference)
Command Line Options¶
Filtering Options¶
- -j, --job string: Specify job IDs to query, multiple IDs separated by commas (e.g.,
-j=2,3,4) - -n, --name string: Specify job names to query, multiple names separated by commas
- -u, --user string: Specify user(s) whose jobs to query, multiple users separated by commas
- -A, --account string: Specify account(s) to query, multiple accounts separated by commas
- -p, --partition string: Specify partition(s) to view, multiple partitions separated by commas (default: all)
- -q, --qos string: Specify QoS to view, multiple QoS separated by commas (default: all)
Time Range Filtering¶
- -s, --submit-time string: Filter jobs by submission time range. Supports closed interval (format:
2024-01-02T15:04:05~2024-01-11T11:12:41) or half-open interval (format:2024-01-02T15:04:05~or~2024-01-11T11:12:41) - -S, --start-time string: Filter jobs by start time range. Same format as submit-time
- -E, --end-time string: Filter jobs by end time. Format:
~2023-03-14T10:00:00for jobs ending before the specified time
State Filtering¶
- -t, --state string: Specify job state(s) to view. Supported states:
pendingorp: Pending jobsrunningorr: Running jobscompletedorc: Completed jobsfailedorf: Failed jobscancelledorx: Cancelled jobstime-limit-exceededort: Jobs that exceeded time limitall: All states (default)
Output Formatting¶
- -o, --format string: Specify output format using format specifiers starting with
%. A width specifier can be added between%and the format character using a dot (.) and number. Supported format specifiers (case-insensitive): - %a / %Account: Display job account
- %c / %AllocCpus: Display allocated CPU count
- %e / %ExitCode: Display job exit code (special format: exitcode[:signal])
- %h / %ElapsedTime: Display elapsed time since job start
- %j / %JobId: Display job ID
- %k / %Comment: Display job comment
- %l / %NodeList: Display list of nodes running the job
- %m / %TimeLimit: Display job time limit
- %n / %MemPerNode: Display requested memory per node
- %N / %NodeNum: Display number of requested nodes
- %n / %Name: Display job name
- %P / %Partition: Display job partition
- %p / %Priority: Display job priority
- %Q / %QOS: Display Quality of Service (QoS) level
- %R / %Reason: Display reason for job pending
- %r / %ReqNodes: Display requested nodes
- %S / %StartTime: Display job start time
- %s / %SubmitTime: Display job submission time
- %t / %State: Display current job state
- %T / %JobType: Display job type
- %u / %Uid: Display job UID
- %U / %User: Display user who submitted the job
- %x / %ExcludeNodes: Display excluded nodes
- Width specification:
%.5j(right-aligned, min width 5) or%5j(left-aligned, min width 5) - Example:
--format "%.5j %.20n %t"outputs job ID (min width 5), name (min width 20), and state
Display Options¶
- -F, --full: Display full information (no field truncation)
- -N, --no-header: Hide table header in output
- -m, --max-lines uint32: Specify maximum number of output lines (e.g.,
-m=500for max 500 lines) - --json: Output in JSON format
Miscellaneous¶
- -C, --config string: Path to configuration file (default:
/etc/crane/config.yaml) - -h, --help: Display help information
- -v, --version: Display version number
Usage Examples¶
Basic Query¶
View all jobs:
Help Information¶
Display help:
Hide Header¶
Output without header:
Time Range Filtering¶
Filter by start time range:
Filter by end time range:
Job ID Filtering¶
Query specific job IDs:
User Filtering¶
Query jobs by user:
Account Filtering¶
Query jobs by account:
Limit Output Lines¶
Limit to 10 lines:
Partition Filtering¶
Query jobs in specific partition:
Job Name Filtering¶
Query by job name:
Custom Format¶
Specify custom output format:
Combined Filters¶
Combine account and max-lines:
Multiple filters with full output:
Query by name:
Query by QoS:
Complex combined query:
Advanced Features¶
JSON Output¶
Get results in JSON format for parsing:
Time Range Queries¶
Query jobs submitted in a specific time range:
Query jobs that started after a specific time:
Query jobs that ended before a specific time:
State Filtering Examples¶
View only completed jobs:
View failed and cancelled jobs:
View jobs that exceeded time limit:
Format Specification Details¶
The format string supports width control:
- %5j - Left-aligned, minimum width 5
- %.5j - Right-aligned, minimum width 5
Example with multiple width specifications: