qacct
Overview
qacct queries accounting information for completed jobs. It is similar to the Sun Grid Engine (SGE) qacct command. You can filter and view job records for specific conditions and aggregate by job, user, queue, project, host, and more.
Options
Supported Options
| Option | Requires Value | Description | Main Differences |
|---|---|---|---|
-j | Optional | Filter by job ID/job name/pattern. With a value: show details only (no summary). Without a value: show details + system summary. | No difference. |
-o | Optional | Filter or group by submitter; supports multiple users (e.g. user1,user2). | No difference. |
-u | Optional | Same as -o, filter/group by submitter. | No difference. |
-b | Yes | Show jobs that started after the specified time. Format: [[CC]YY]MMDDhhmm[.SS] (e.g. 202601150800, 01150800, 2601150800, 01150800.30). | No difference. |
-e | Yes | Show jobs that started before the specified time. Format: [[CC]YY]MMDDhhmm[.SS]. | No difference. |
-d | Yes | Show jobs that started within the last N days. | No difference. |
-E | No | Use job end time instead of start time for time filtering (use with -b/-e/-d). | No difference. |
-h | Optional | Filter/group by host name. | No difference. |
-t | Yes | Filter array job tasks by task ID; must be used with -j. | No difference. |
-A | Optional | Filter/group by account. | No difference. |
-P | Optional | Filter/group by project. | project maps to wckey. |
-q | Optional | Filter/group by queue. | No difference. |
-g | Optional | Filter/group by user group. | No difference. |
-pe | Optional | Filter/group by parallel environment (PE). | Extracted from job comment field (PE:name or PE:name:slots). |
-slots | Optional | Filter/group by slots (CPU count). | No difference. |
-D | Optional | Filter/group by department. | Always shows defaultdepartment (no department concept). |
-ar | Optional | Filter/group by advanced reservation (AR). | Always shows 0 (no AR concept). |
-l | Yes | Filter by resource requirements (e.g. mem_free=1G,arch=x86_64). | Supports hostname, arch, num_proc, mem_free, mem_total, virtual_free, virtual_total. Only jobs that actually ran (start_time != 0). |
-m | No | Show master tasks only. | Placeholder; behaves the same as without this option. |
-f | Yes | Specify a custom accounting file path. | Not supported; errors and suggests using the database instead. |
Output Modes
| Mode | Trigger | Output |
|---|---|---|
| Detail mode | -j <job_id|job_name|pattern> | Detailed accounting for matched jobs (no summary). |
| Summary mode | No -j, or -j with no value | Grouped summary statistics (WALLCLOCK, UTIME, STIME, CPU, MEMORY, etc.). |
| Mixed mode | -j (without value) | All job details + Total System Usage summary. |
Summary Fields
| Field | Description | Main Differences |
|---|---|---|
WALLCLOCK | Total wall-clock time (seconds). | No difference. |
UTIME | User CPU time (seconds). | No difference. |
STIME | System CPU time (seconds). | No difference. |
CPU | Total CPU time (UTIME + STIME, seconds). | No difference. |
MEMORY | Memory usage (bytes). | Placeholder; shows 0.000. |
IO | I/O bytes. | Placeholder; shows 0.000. |
IOW | I/O wait time (seconds). | Placeholder; shows 0.000. |
Detail Mode Fields
| Field | Description | Main Differences |
|---|---|---|
qname | Queue name (partition). | No difference. |
hostname | Execution host. | No difference. |
group | User group. | No difference. |
owner | User name. | No difference. |
project | Project name (wckey). | project maps to wckey. |
department | Department name. | Always defaultdepartment. |
jobname | Job name. | No difference. |
jobnumber | Job ID. | Array jobs show array_job_id. |
taskid | Task ID (array jobs). | Non-array jobs show undefined. |
account | Account name. | Defaults to sge. |
priority | Job priority. | Always 0. |
qsub_time | Submit time. | No difference. |
start_time | Start time. | No difference. |
end_time | End time. | No difference. |
granted_pe | Granted parallel environment. | Always NONE. |
slots | Allocated slots (CPU count). | Extracted from TRES data. |
failed | Failure code. | Mapped from job state (26/37/100, etc.). |
exit_status | Job exit status. | Failed jobs add 128 (ABNORMAL_EXIT_STATE_BASE). |
ru_wallclock | Wall-clock time. | No difference. |
ru_utime | User CPU time. | No difference. |
ru_stime | System CPU time. | No difference. |
ru_maxrss | Max resident set size. | Extracted from job step TRES data. |
cpu | Total CPU time. | No difference. |
mem | Memory usage (with s suffix). | Extracted from job step TRES data. |
maxvmem | Max virtual memory. | Extracted from job step TRES data. |
Examples
Example 1: Query accounting for a specific job (detail mode)
$ qacct -j 5678
==============================================================
qname normal
hostname compute01
group users
owner user1
project project1
department defaultdepartment
jobname myjob
jobnumber 5678
taskid undefined
account sge
priority 0
qsub_time Mon Jan 15 10:30:00 2026
start_time Mon Jan 15 10:31:00 2026
end_time Mon Jan 15 11:30:00 2026
...
Note: Shows full accounting details for job 5678, without summary totals.
Example 2: Query by job name pattern
$ qacct -j "test_*"
==============================================================
qname normal
hostname compute01
...
==============================================================
qname normal
hostname compute02
...
Note: Supports * and ? wildcards for job name matching.
Example 3: Summary by user and time range
$ qacct -o user1 -b "202601010000"
OWNER WALLCLOCK UTIME STIME CPU MEMORY IO IOW
=============================================================================================================================
user1 3600 100.000 50.000 150.000 0.000 0.000 0.000
Note: Shows aggregated usage for user user1 for jobs started after 2026-01-01 00:00.
Example 4: Summary grouped by queue
$ qacct -q
CLUSTER QUEUE WALLCLOCK UTIME STIME CPU MEMORY IO IOW
==============================================================================================================================
normal 36000 1000.000 500.000 1500.000 0.000 0.000 0.000
highmem 72000 2000.000 1000.000 3000.000 0.000 0.000 0.000
Note: Shows summary grouped by queue.
Example 5: Summary grouped by host
$ qacct -h
HOST WALLCLOCK UTIME STIME CPU MEMORY IO IOW
=============================================================================================================================
compute01 2317 0.000 0.000 0.000 0.000 0.000 0.000
compute02 111 0.000 0.000 0.000 0.000 0.000 0.000
Note: Shows summary grouped by execution host.
Example 6: Query a specific array task
$ qacct -j 1234 -t 10
==============================================================
qname normal
hostname compute01
...
jobnumber 1234
taskid 10
...
Note: -t must be used with -j to query an array task.
Example 7: Filter by resource requirements
$ qacct -l "mem_free=1G,arch=x86_64"
HOST WALLCLOCK UTIME STIME CPU MEMORY IO IOW
=============================================================================================================================
compute01 2317 0.000 0.000 0.000 0.000 0.000 0.000
Note: Shows only jobs that ran on nodes meeting the resource constraints.
Example 8: Filter by end time
$ qacct -E -b "202601010000" -e "202601312359"
Note: -E makes time filters apply to job end time instead of start time.
Example 9: Show total system summary (default mode)
$ qacct
Total System Usage
WALLCLOCK UTIME STIME CPU MEMORY IO IOW
=============================================================================================================================
108000 3000.000 1500.000 4500.000 0.000 0.000 0.000
Note: With no parameters, shows total system usage.
Example 10: Mixed mode (details + summary)
$ qacct -j
==============================================================
qname normal
...
==============================================================
qname normal
...
Total System Usage
WALLCLOCK UTIME STIME CPU MEMORY IO IOW
=============================================================================================================================
108000 3000.000 1500.000 4500.000 0.000 0.000 0.000
Note: When -j is used without a value, all job details are shown followed by the system summary.
Notes
1. Option combination rules
- Detail mode:
-jwith a value (-j <job_id\|name\|pattern>) shows detailed info only. - Summary mode: no
-j, or-jwithout a value, shows aggregated statistics. - Filter combinations: multiple filters (
-j,-o,-h,-q,-l, etc.) use AND logic. - Special combinations:
-land-htogether show the intersection (jobs on hosts matching-hand meeting-lresource constraints).-tmust be used with-j, and-jmust include a value.
2. Time filtering behavior
- Default range: without time parameters, defaults to jobs started within the last 30 days (paging size adjustable via
FSCHED_ACCT_PAGE_SIZE). - Time basis:
- Without
-E: filters by job start time (start_time). - With
-E: filters by job end time (end_time).
- Without
- Time format:
[[CC]YY]MMDDhhmm[.SS](e.g.202601150800,01150800,2601150800,01150800.30).
3. Query performance
- Paging: non-specific queries (no
-jor-jwithout a value) use paging to avoid memory spikes. - Environment variable:
FSCHED_ACCT_PAGE_SIZEcontrols page size (default 100).