Skip to main content

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

OptionRequires ValueDescriptionMain Differences
-jOptionalFilter by job ID/job name/pattern. With a value: show details only (no summary). Without a value: show details + system summary.No difference.
-oOptionalFilter or group by submitter; supports multiple users (e.g. user1,user2).No difference.
-uOptionalSame as -o, filter/group by submitter.No difference.
-bYesShow jobs that started after the specified time. Format: [[CC]YY]MMDDhhmm[.SS] (e.g. 202601150800, 01150800, 2601150800, 01150800.30).No difference.
-eYesShow jobs that started before the specified time. Format: [[CC]YY]MMDDhhmm[.SS].No difference.
-dYesShow jobs that started within the last N days.No difference.
-ENoUse job end time instead of start time for time filtering (use with -b/-e/-d).No difference.
-hOptionalFilter/group by host name.No difference.
-tYesFilter array job tasks by task ID; must be used with -j.No difference.
-AOptionalFilter/group by account.No difference.
-POptionalFilter/group by project.project maps to wckey.
-qOptionalFilter/group by queue.No difference.
-gOptionalFilter/group by user group.No difference.
-peOptionalFilter/group by parallel environment (PE).Extracted from job comment field (PE:name or PE:name:slots).
-slotsOptionalFilter/group by slots (CPU count).No difference.
-DOptionalFilter/group by department.Always shows defaultdepartment (no department concept).
-arOptionalFilter/group by advanced reservation (AR).Always shows 0 (no AR concept).
-lYesFilter 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).
-mNoShow master tasks only.Placeholder; behaves the same as without this option.
-fYesSpecify a custom accounting file path.Not supported; errors and suggests using the database instead.

Output Modes

ModeTriggerOutput
Detail mode-j <job_id|job_name|pattern>Detailed accounting for matched jobs (no summary).
Summary modeNo -j, or -j with no valueGrouped summary statistics (WALLCLOCK, UTIME, STIME, CPU, MEMORY, etc.).
Mixed mode-j (without value)All job details + Total System Usage summary.

Summary Fields

FieldDescriptionMain Differences
WALLCLOCKTotal wall-clock time (seconds).No difference.
UTIMEUser CPU time (seconds).No difference.
STIMESystem CPU time (seconds).No difference.
CPUTotal CPU time (UTIME + STIME, seconds).No difference.
MEMORYMemory usage (bytes).Placeholder; shows 0.000.
IOI/O bytes.Placeholder; shows 0.000.
IOWI/O wait time (seconds).Placeholder; shows 0.000.

Detail Mode Fields

FieldDescriptionMain Differences
qnameQueue name (partition).No difference.
hostnameExecution host.No difference.
groupUser group.No difference.
ownerUser name.No difference.
projectProject name (wckey).project maps to wckey.
departmentDepartment name.Always defaultdepartment.
jobnameJob name.No difference.
jobnumberJob ID.Array jobs show array_job_id.
taskidTask ID (array jobs).Non-array jobs show undefined.
accountAccount name.Defaults to sge.
priorityJob priority.Always 0.
qsub_timeSubmit time.No difference.
start_timeStart time.No difference.
end_timeEnd time.No difference.
granted_peGranted parallel environment.Always NONE.
slotsAllocated slots (CPU count).Extracted from TRES data.
failedFailure code.Mapped from job state (26/37/100, etc.).
exit_statusJob exit status.Failed jobs add 128 (ABNORMAL_EXIT_STATE_BASE).
ru_wallclockWall-clock time.No difference.
ru_utimeUser CPU time.No difference.
ru_stimeSystem CPU time.No difference.
ru_maxrssMax resident set size.Extracted from job step TRES data.
cpuTotal CPU time.No difference.
memMemory usage (with s suffix).Extracted from job step TRES data.
maxvmemMax 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: -j with a value (-j <job_id\|name\|pattern>) shows detailed info only.
  • Summary mode: no -j, or -j without a value, shows aggregated statistics.
  • Filter combinations: multiple filters (-j, -o, -h, -q, -l, etc.) use AND logic.
  • Special combinations:
    • -l and -h together show the intersection (jobs on hosts matching -h and meeting -l resource constraints).
    • -t must be used with -j, and -j must 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).
  • Time format: [[CC]YY]MMDDhhmm[.SS] (e.g. 202601150800, 01150800, 2601150800, 01150800.30).

3. Query performance

  • Paging: non-specific queries (no -j or -j without a value) use paging to avoid memory spikes.
  • Environment variable: FSCHED_ACCT_PAGE_SIZE controls page size (default 100).