squeue(1)
๐ squeue(1) โข Slurm Commands ๐
โจ NAME โจ
squeue โ view information about jobs located in the Slurm scheduling queue. ๐
๐ธ SYNOPSIS ๐ธ
squeue [OPTIONS...]
๐ฆ DESCRIPTION ๐ฆ
Okay bestie, squeue is the command you use to view job and job step information for jobs managed by Slurm. Thatโs the whole vibe. โจ
๐ OPTIONS ๐
-A,--account=<account_list>โ Specify the accounts of the jobs to view. It accepts a comma separated list of account names. This has no effect when listing job steps.-a,--allโ Display information about jobs and job steps in all partitions. This causes information to be displayed about partitions that are configured as hidden, partitions that are unavailable to a user's group, and federated jobs that are in a"revoked"state.-r,--arrayโ Display one job array element per line. Without this option, the display will be optimized for use with job arrays (pending job array elements will be combined on one line of output with the array index values printed using a regular expression).-M,--clusters=<cluster_name>โ Clusters to issue commands to. Multiple cluster names may be comma separated. A value of'all'will query to run on all clusters. Note that theslurmdbdmust be up for this option to work properly, unless running in a federation with eitherFederationParameters=fed_displayconfigured or the--federationoption set. This option implicitly sets the--localoption.--expand-patternsโ Expand any filename patterns from inStdOut,StdErrandStdIn. Fields that map to a range of values will use the first value of the range. For example"%t"for task id will be replaced by"0".--federationโ Show jobs from the federation if a member of one.-o,--format=<output_format>โ Specify the information to be displayed, its size and position (right or left justified). Also see the-O,--Format=<output_format>option described below (which supports less flexibility in formatting, but supports access to all fields). If the command is executed in a federated cluster environment and information about more than one cluster is to be displayed and the-h,--noheaderoption is used, then the cluster name will be displayed before the default output formats shown below.
The default formats with various options are:
defaultโ"%.18i %.9P %.8j %.8u %.2t %.10M %.6D %R"-l,--longโ"%.18i %.9P %.8j %.8u %.8T %.10M %.9l %.6D %R"-s,--stepsโ"%.15i %.8j %.9P %.8u %.9M %N"
The format of each field is "%[[.]size]type[suffix]".
sizeโ Minimum field size. If no size is specified, whatever is needed to print the information will be used..โ Indicates the output should be right justified and size must be specified. By default output is left justified.suffixโ Arbitrary string to append to the end of the field.
Note that many of these type specifications are valid only for jobs while others are valid only for job steps. Valid type specifications include:
%allโ Print all fields available for this data type with a vertical bar separating each field.%aโ Account associated with the job. (Valid for jobs only)%Aโ Number of tasks created by a job step. This reports the value of thesrun --ntasksoption. (Valid for job steps only)%Aโ Job id. This will have a unique value for each element of job arrays. (Valid for jobs only)%Bโ Executing (batch) host. For an allocated session, this is the host on which the session is executing (i.e. the node from which thesrunor thesalloccommand was executed). For a batch job, this is the node executing the batch script. In the case of a typical Linux cluster, this would be the compute node zero of the allocation.%cโ Minimum number of CPUs (processors) per node requested by the job. This reports the value of thesrun --mincpusoption with a default value of zero. (Valid for jobs only)%Cโ Number of CPUs (processors) requested by the job or allocated to it if already running. As a job is completing this number will reflect the current number of CPUs allocated. (Valid for jobs only)%dโ Minimum size of temporary disk space (in MiB) requested by the job. (Valid for jobs only)%Dโ Number of nodes allocated to the job or the minimum number of nodes required by a pending job. The actual number of nodes allocated to a pending job may exceed this number if the job specified a node range count (e.g. minimum and maximum node counts) or the job specifies a processor count instead of a node count. As a job is completing this number will reflect the current number of nodes allocated. (Valid for jobs only)%eโ Time at which the job ended or is expected to end (based upon its time limit). (Valid for jobs only)%Eโ Job dependencies remaining. This job will not begin execution until these dependent jobs complete. In the case of a job that can not run due to job dependencies never being satisfied, the full original job dependency specification will be reported. Once a dependency is satisfied, it is removed from the job. A value ofNULLimplies this job has no dependencies. (Valid for jobs only)%fโ Features required by the job. (Valid for jobs only)%Fโ Job array's job ID. This is the base job ID. For non-array jobs, this is the job ID. (Valid for jobs only)%gโ Group name of the job. (Valid for jobs only)%Gโ Group ID of the job. (Valid for jobs only)%hโ Oversubscribe disposition for the job (OVER_SUBSCRIBEcolumn):"YES"if the job requested--oversubscribe;"NO"otherwise;"OK"if the partition allows oversubscription (without the job disabling it) when the job did not request--oversubscribe. This does not encode exclusivity; see theExclusivefield below. (Valid for jobs only)%Hโ Number of sockets per node requested by the job. This reports the value of thesrun --sockets-per-nodeoption. When--sockets-per-nodehas not been set,"*"is displayed. (Valid for jobs only)%iโ Job or job step id. In the case of job arrays, the job ID format will be of the form"<base_job_id>_<index>". By default, the job array index field size will be limited to 64 bytes. Use the environment variableSLURM_BITSTR_LENto specify larger field sizes. (Valid for jobs and job steps) In the case of heterogeneous job allocations, the job ID format will be of the form"#+#"where the first number is the"heterogeneous job leader"and the second number the zero origin offset for each component of the job.%Iโ Number of cores per socket requested by the job. This reports the value of thesrun --cores-per-socketoption. When--cores-per-sockethas not been set,"*"is displayed. (Valid for jobs only)%jโ Job or job step name. (Valid for jobs and job steps)%Jโ Number of threads per core requested by the job. This reports the value of thesrun --threads-per-coreoption. When--threads-per-corehas not been set,"*"is displayed. (Valid for jobs only)%kโ Comment associated with the job. (Valid for jobs only)%Kโ Job array index. By default, this field size will be limited to 64 bytes. Use the environment variableSLURM_BITSTR_LENto specify larger field sizes. (Valid for jobs only)%lโ Time limit of the job or job step indays-hours:minutes:seconds. The value may be"NOT_SET"if not yet established or"UNLIMITED"for no limit. (Valid for jobs and job steps)%Lโ Time left for the job to execute indays-hours:minutes:seconds. This value is calculated by subtracting the job's time used from its time limit. The value may be"NOT_SET"if not yet established or"UNLIMITED"for no limit. (Valid for jobs only)%mโ Minimum size of memory (in MiB) requested by the job. (Valid for jobs only) If memory was requested per CPU, or per GPU, the value is shown with the assumption that at least one CPU, GPU will be allocated respectively.%Mโ Time used by the job or job step indays-hours:minutes:seconds. The days and hours are printed only as needed. For job steps this field shows the elapsed time since execution began and thus will be inaccurate for job steps which have been suspended. Clock skew between nodes in the cluster will cause the time to be inaccurate. If the time is obviously wrong (e.g. negative), it displays as"INVALID". (Valid for jobs and job steps)%nโ List of node names explicitly requested by the job. (Valid for jobs only)%Nโ List of nodes allocated to the job or job step. In the case of aCOMPLETINGjob, the list of nodes will comprise only those nodes that have not yet been returned to service. (Valid for jobs and job steps)%oโ The command to be executed.%Oโ Are contiguous nodes requested by the job. (Valid for jobs only)%pโ Priority of the job (converted to a floating point number between0.0and1.0). Also see%Q. (Valid for jobs only)%Pโ Partition of the job or job step. (Valid for jobs and job steps)%qโ Quality of service associated with the job. (Valid for jobs only)%Qโ Priority of the job (generally a very large unsigned integer). Also see%p. (Valid for jobs only)%rโ the reason your job is sitting in its current state ๐ง hop down to JOB REASON CODES below for the tea. (jobs only, babes)%Rโ okay this one's a triple threat ๐ for pending jobs it prints, inside parenthesis, why the scheduler hasn't started it yet; for terminated jobs that failed it prints, inside parenthesis, an explanation of why it flopped; and for every other job state it just prints the list of allocate nodes. See JOB REASON CODES below. (jobs only)%sโ the SLUID โจ (jobs only)%Sโ actual or expected start time of the job or job step ๐ (jobs and job steps)%tโ job state, compact form ๐ see JOB STATE CODES below for the full menu of possible states. (jobs only)%Tโ job state, extended form ๐ธ same deal, see JOB STATE CODES below. (jobs only)%uโ user name for a job or job step ๐ซถ (jobs and job steps)%Uโ user ID for a job or job step ๐ (jobs and job steps)%vโ the reservation for the job ๐๏ธ (jobs only)%Vโ the job's submission time โฐ%wโ the Workload Characterization Key (wckey) ๐ (jobs only)%Wโ licenses requested by the job ๐ (jobs only)%xโ the list of node names the job explicitly excluded ๐ซ (jobs only)%Xโ count of cores reserved on each node for system use (that's core specialization, bestie) ๐ (jobs only)%yโ nice value, aka the adjustment to a job's scheduling priority ๐ (jobs only)%Yโ for pending jobs, a list of the nodes expected to be used when the job is started ๐ฎ%zโ number of requested sockets, cores, and threads (S:C:T) per node for the job. When (S:C:T) has not been set,*is displayed ๐ (jobs only)%Zโ the job's working directory ๐
-O,--Format=<output_format>โ tells squeue exactly what info to show you ๐ซก also peep the-o,--format=<output_format>option described above (it's the flexible one, but lowkey it can't reach all the fields because, and I quote, "we ran out of letters" ๐ญ). You hand it a comma separated list of job information to display.
Each field is formatted like this:
type[:[.][size][suffix]]
sizeโ minimum field size. If you don't specify a size, 20 characters get allocated to print the information ๐.โ means the output should be right justified, andsizemust be specified. Default is left justified, no cap โฌ ๏ธsuffixโ an arbitrary string to append to the end of the field ๐
Okay so heads up: lots of these type specs are only valid for jobs, and others are only valid for job steps. The valid type specifications are:
Accountโ print the account associated with the job ๐ณ (jobs only)AccrueTimeโ print the accrue time associated with the job โณ (jobs only)admin_commentโ the administrator comment associated with the job ๐ (jobs only)AllocNodesโ print the nodes allocated to the job ๐ฅ๏ธ (jobs only)AllocSIDโ print the session ID used to submit the job ๐ (jobs only)ArrayJobIDโ prints the job ID of the job array ๐ฏ (jobs and job steps)ArrayTaskIDโ prints the task ID of the job array ๐งฉ (jobs and job steps)AssocIDโ prints the ID of the job association ๐ชช (jobs only)BatchFlagโ prints whether the batch flag has been set ๐ฉ (jobs only)BatchHostโ the executing (batch) host. For an allocated session, this is the host on which the session is executing (i.e. the node from which thesrunor thesalloccommand was executed). For a batch job, this is the node executing the batch script ๐ in the case of a typical Linux cluster, this would be the compute node zero of the allocation. (jobs only)BoardsPerNodeโ prints the number of boards per node allocated to the job ๐งฎ (jobs only)BurstBufferโ Burst Buffer specification ๐ฅ (jobs only)BurstBufferStateโ Burst Buffer state ๐ฅ (jobs only)Clusterโ name of the cluster that is running the job or job step ๐ClusterFeatureโ cluster features required by the job โจ (jobs only)Commandโ the command to be executed โจ๏ธ (jobs only)Commentโ comment associated with the job ๐ฌ (jobs only)Contiguousโ are contiguous nodes requested by the job? ๐งฑ (jobs only)Containerโ OCI container bundle path ๐ฆContainerIDโ OCI container assigned ID ๐ContainerTypeโ job container type for job ๐ท๏ธCoresโ number of cores per socket requested by the job. This reports the value of thesrun --cores-per-socketoption. When--cores-per-sockethas not been set,*is displayed โญ (jobs only)CoreSpecโ count of cores reserved on each node for system use (core specialization) ๐ (jobs only)CPUFreqโ prints the frequency of the allocated CPUs โก (job steps only!)cpus-per-taskโ prints the number of CPUs per tasks allocated to the job ๐ง (jobs only)cpus-per-tresโ print the memory required per trackable resources allocated to the job or job step ๐พCronJobโ printYes/Nodepending on whether the job has been generated byscrontabor not ๐๏ธ (jobs only)Deadlineโ prints the deadline affected to the job โ (jobs only)DelayBootโ delay boot time ๐ฅพ (jobs only)Dependencyโ job dependencies remaining. This job will not begin execution until these dependent jobs complete ๐ง in the case of a job that can not run due to job dependencies never being satisfied, the full original job dependency specification will be reported. Once a dependency is satisfied, it is removed from the job. A value ofNULLimplies this job has no dependencies. (jobs only)DerivedECโ the highest exit code returned by the job's job steps (sruninvocations) ๐ following the colon is the signal that caused the process to terminate if it was terminated by a signal. (jobs only)EligibleTimeโ time the job is eligible for running ๐ (jobs only)EndTimeโ the time of job termination, actual or expected ๐ (jobs only)Exclusiveโ exclusive disposition for the job (theEXCLUSIVEcolumn) ๐ โโ๏ธ (jobs only). Possible values:MCS: only jobs with the same MCS label may share a node (job submitted with--exclusive=mcs).NO: no exclusivity.NODE: whole-node allocation (job submitted with--exclusive, or partitionExclusive=NODE).TOPO: only one job per topology segment (job submitted with--exclusive=topo, or partitionExclusive=TOPO). Same tokens as theExclusivefield inscontrol show job.USER: only one user's jobs may share a node (job submitted with--exclusive=user, or partitionExclusive=USER).
ExcNodesโ the nodes requested to be excluded when allocating this job ๐ซ (jobs only)exit_codeโ the exit code returned by the job, typically as set by theexit()function ๐ช following the colon is the signal that caused the process to terminate if it was terminated by a signal. (jobs only)Featureโ features required by the job ๐ (jobs only)GroupIDโ group ID of the job ๐ฅ (jobs only)GroupNameโ group name of the job ๐ฅ (jobs only)HetJobIDโ job ID of the heterogeneous job leader ๐งฌHetJobIDSetโ expression identifying all components job IDs within a heterogeneous job ๐งฌHetJobOffsetโ zero origin offset within a collection of heterogeneous job components ๐งฌJobArrayIDโ job array's job ID. This is the base job ID. For non-array jobs, this is the job ID ๐ข (jobs only)JobIDโ job ID ๐ this will have a unique value for each element of job arrays and each component of heterogeneous jobs. (jobs only)LastSchedEvalโ prints the last time the job was evaluated for scheduling ๐ต๏ธโโ๏ธ (jobs only)Licensesโ licenses requested by the job ๐ (jobs only)LicensesAllocโ licenses allocated to the job ๐ (jobs only)MaxCPUsโ prints the max number of CPUs allocated to the job ๐ง (jobs only)MaxNodesโ prints the max number of nodes allocated to the job ๐ฅ๏ธ (jobs only)MCSLabelโ prints theMCS_labelof the job ๐ (valid for jobs only)mem-per-tresโ prints the memory (in MiB) required per trackable resource allocated to the job or job step. yes bestie, per TRES, it's giving very granular โจMinCpusโ the minimum number of CPUs (processors) per node that the job asked for. this reports the value of thesrun --mincpusoption, and the default is zero. (valid for jobs only)MinMemoryโ minimum size of memory (in MiB) requested by the job ๐ธ (valid for jobs only)MinTimeโ minimum time limit of the job โณ (valid for jobs only)MinTmpDiskโ minimum size of temporary disk space (in MiB) requested by the job ๐พ (valid for jobs only)Nameโ job or job step name ๐ท๏ธ (valid for jobs and job steps)Networkโ the network the job is running on ๐ (valid for jobs and job steps)Niceโ nice value, aka the adjustment to a job's scheduling priority ๐ (valid for jobs only)NodeListโ list of nodes allocated to the job or job step. plot twist: if the job is in aCOMPLETINGstate, this list only has the nodes that haven't been returned to service yet ๐ (valid for jobs only)Nodesโ same thing, list of nodes allocated to the job or job step, and for aCOMPLETINGjob it's only the nodes not yet returned to service. careful โ this one is (valid job steps only), so don't mix them up ๐NTPerBoardโ number of tasks per board allocated to the job ๐งฉ (valid for jobs only)NTPerCoreโ number of tasks per core allocated to the job ๐ (valid for jobs only)NTPerNodeโ number of tasks per node allocated to the job ๐ฅ๏ธ (valid for jobs only)NTPerSocketโ number of tasks per socket allocated to the job ๐ (valid for jobs only)NumCPUsโ number of CPUs (processors) requested by the job, or allocated to it if it's already running. while a job is completing, this reflects the current number of CPUs allocated. (valid for jobs and job steps)NumNodesโ number of nodes allocated to the job, or the minimum number of nodes a pending job requires. lowkey important: the actual number allocated to a pending job can be more than this if the job gave a node range count (like min and max node counts) or if it specified a processor count instead of a node count. as the job completes, this reflects the current number of nodes allocated ๐ซ (valid for jobs only)NumTasksโ number of tasks requested by a job or job step. this reports the value of the--ntasksoption ๐ (valid for jobs and job steps)Originโ cluster name where the federated job originated from ๐ (valid for federated jobs only)OriginRawโ cluster ID where the federated job originated from ๐ (valid for federated jobs only)OverSubscribeโ same values as%h/OVER_SUBSCRIBE:"YES","NO", or"OK". see%habove โ๏ธ (valid for jobs only)Partitionโ partition of the job or job step ๐๏ธ (valid for jobs and job steps)PendingTimeโ the time (in seconds) between the job's start time and submit time. if the job hasn't started yet, it's the time (in seconds) between now and the submit time โฑ๏ธ (valid for jobs only)PreemptTimeโ the preempt time for the job โก (valid for jobs only)Preferโ the preferred features of a pending job ๐ฏ (valid for jobs only)Priorityโ priority of the job, converted to a floating point number between0.0and1.0. also seeprioritylong๐ (valid for jobs only)PriorityLongโ priority of the job (generally a very large unsigned integer). also seepriority๐ข (valid for jobs only)Profileโ profile of the job ๐ (valid for jobs only)QOSโ quality of service associated with the job ๐ (valid for jobs only)Reasonโ the reason a job is in its current state. see the JOB REASON CODES section below for more ๐ต๏ธ (valid for jobs only)ReasonListโ depends on the state, bestie:- for pending jobs: the reason the job is waiting for execution is printed inside parenthesis
- for terminated jobs with failure: an explanation of why the job failed is printed inside parenthesis
- for all other job states: the list of allocated nodes see the JOB REASON CODES section below for more ๐ (valid for jobs only)
Rebootโ indicates if the allocated nodes should be rebooted before the job starts ๐ (valid on jobs only)ReqNodesโ list of node names explicitly requested by the job ๐ (valid for jobs only)ReqSwitchโ the max number of requested switches by for the job ๐ (valid for jobs only)Requeueโ prints whether the job will be requeued on failure โป๏ธ (valid for jobs only)Reservationโ reservation for the job ๐๏ธ (valid for jobs only)ResizeTimeโ the amount of time changed for the job to run ๐ (valid for jobs only)RestartCntโ the number of restarts for the job ๐ (valid for jobs only)ResvPortโ reserved ports of the job ๐ช (valid for job steps only)SchedNodesโ for pending jobs, a list of the nodes expected to be used when the job is started ๐บ๏ธ (valid for jobs only)SCTโ number of requested sockets, cores, and threads (S:C:T) per node for the job. when (S:C:T) hasn't been set,"*"is displayed โญ (valid for jobs only)SegmentSizeโ segment size requested by the job ๐ (valid for jobs only)SiblingsActiveโ cluster names of where federated sibling jobs exist ๐ฏ (valid for federated jobs only)SiblingsActiveRawโ cluster IDs of where federated sibling jobs exist ๐ (valid for federated jobs only)SiblingsViableโ cluster names of where federated sibling jobs are viable to run ๐ฑ (valid for federated jobs only)SiblingsViableRawโ cluster IDs of where federated sibling jobs are viable to run ๐ (valid for federated jobs only)Sluidโ the Slurm Lexicographically-sortable Unique Identifier assigned to the job ๐ this value stays constant during the lifetime of the job, even after a resize. but note: the accounting database tracks a separate SLUID per accounting record, and that one changes on resize or requeue. iykyk ๐Socketsโ number of sockets per node requested by the job. this reports the value of thesrun --sockets-per-nodeoption. when--sockets-per-nodehasn't been set,"*"is displayed ๐ (valid for jobs only)SPerBoardโ number of sockets per board allocated to the job ๐งฉ (valid for jobs only)StartTimeโ actual or expected start time of the job or job step โฐ (valid for jobs and job steps)Stateโ job state in extended form. see the JOB STATE CODES section below for the possible states ๐ฆ (valid for jobs only)StateCompactโ job state in compact form. see the JOB STATE CODES section below for the possible states ๐ฅ (valid for jobs only)STDERRโ the directory for standard error to output to ๐ (valid for jobs and steps)STDINโ the directory for standard in ๐ (valid for jobs and steps)STDOUTโ the directory for standard out to output to ๐ (valid for jobs and steps)StepIDโ job or job step ID. for job arrays, the job ID format is"<base_job_id>_<index>"๐ท๏ธ (valid for job steps only)StepNameโ job step name โจ (valid for job steps only)StepStateโ the state of the job step ๐ฆ (valid for job steps only)SubmitTimeโ the time the job was submitted at ๐ฐ๏ธ (valid for jobs only)system_commentโ system comment associated with the job ๐ฌ (valid for jobs only)Threadsโ number of threads per core requested by the job. this reports the value of thesrun --threads-per-coreoption. when--threads-per-corehasn't been set,"*"is displayed ๐งต (valid for jobs only)TimeLeftโ time left for the job to execute, indays-hours:minutes:secondsโณ it's calculated by subtracting the job's time used from its time limit. the value can be"NOT_SET"if it isn't established yet, or"UNLIMITED"for no limit ๐ซถ (valid for jobs only)TimeLimitโ timelimit for the job or job step โฒ๏ธ (valid for jobs and job steps)TimeUsedโ time used by the job or job step, indays-hours:minutes:seconds. the days and hours only get printed as needed ๐ couple of caveats though: for job steps this field shows the elapsed time since execution began, so it'll be inaccurate for job steps that have been suspended. also, clock skew between nodes in the cluster will make the time inaccurate. and if the time is obviously wrong (like negative), it displays as"INVALID"๐ (valid for jobs and job steps)tres-allocโ Prints the trackable resources allocated to the job if itโs running. If itโs not running, then print the trackable resources requested by the job. literally knows what the job got or what itโs asking for ๐tres-bindโ Prints the trackable resources task binding requested by the job or job step. binding tea โโจtres-freqโ Prints the trackable resources frequencies requested by the job or job step. freq check ๐ฅtres-per-jobโ Prints the trackable resources requested by the job. per-job, bestie ๐tres-per-nodeโ Prints the trackable resources per node requested by the job or job step. node-by-node, no cap ๐tres-per-socketโ Prints the trackable resources per socket requested by the job or job step. socket moment ๐งtres-per-stepโ Prints the trackable resources requested by the job step. step-specific slay ๐tres-per-taskโ Prints the trackable resources per task requested by the job or job step. task math, iconic ๐UserIDโ User ID for a job or job step. (Valid for jobs and job steps) iykyk ๐ฆUserNameโ User name for a job or job step. (Valid for jobs and job steps) name drop ๐Wait4Switchโ The amount of time to wait for the desired number of switches. (Valid for jobs only) waiting era ๐ญWCKeyโ Workload Characterization Key (wckey). (Valid for jobs only) wckey core ๐WorkDirโ The jobโs working directory. (Valid for jobs only) where the job lives ๐ โจ--helpโ Print a help message describing all optionssqueue. help bestie help ๐ซถ--hideโ Do not display information about jobs and job steps in all partitions. By default, information about partitions that are configured as hidden or are not available to the userโs group will not be displayed (i.e. this is the default behavior). hidden means hidden, periodt ๐-i,--iterate=<seconds>โ Repeatedly gather and report the requested information at the interval specified (in seconds). By default, prints a time stamp with the header. loop era ๐โจ-j,--jobs[=<job_id_list>]โ Specify a comma separated list of job IDs to display. Defaults to all jobs. The--jobs=<job_id_list>option may be used in conjunction with the--stepsoption to print step information about specific jobs. Note: if a list of job IDs is provided, the jobs are displayed even if they are on hidden partitions. Since this optionโs argument is optional, for proper parsing the single letter option must be followed immediately with the value and not include a space between them. For example-j1008and not-j 1008. The job ID format isjob_id[_array_id]. A SLUID may also be used in place of a numeric job ID. Performance of the command can be measurably improved for systems with large numbers of jobs when a single job ID is specified. By default, this field size will be limited to64bytes. Use the environment variableSLURM_BITSTR_LENto specify larger field sizes. job list main character energy ๐
Bestie PSA: for-j, no space between the flag and the value.-j1008slays,-j 1008does not parse right. do not do it ๐ญ
--json,--json=list,--json=<data_parser>โ Dump information as JSON using the defaultdata_parserplugin or explicitdata_parserwith parameters. All information is dumped, even if it would normally not be. Sorting and formatting arguments passed to other options are ignored; however, most filtering arguments are still used. JSON dump, all the tea โ๐-L,--licenses=<license_list>โ Request jobs requesting or using one or more of the named licenses. The license list consists of a comma separated list of license names. license check ๐ฅ--localโ Show only jobs local to this cluster. Ignore other clusters in this federation (if any). Overrides--federation. stay local ๐ธ-l,--longโ Report more of the available information for the selected jobs or job steps, subject to any constraints specified. long mode = more lore ๐--meโ Equivalent to--user=<my username>. itโs me, hi ๐-n,--name=<name_list>โ Request jobs or job steps having one of the specified names. The list consists of a comma separated list of job names. name filter, cute ๐ง--noconvertโ Donโt convert units from their original type (e.g.2048Mwonโt be converted to2G). raw units, no glow-up ๐-w,--nodelist=<hostlist>โ Report only on jobs allocated to the specified node or list of nodes. This may either be theNodeNameorNodeHostnameas defined inslurm.conf(5)in the event that they differ. Anode_nameoflocalhostis mapped to the current host name. node list bestie ๐-h,--noheaderโ Do not print a header on the output. no header, just vibes ๐ฆ--notmeโ Opposite of--me; only display jobs that are not from the invoking user. not me, literally ๐--only-job-stateโ Only query for the job state. Query utilizes RPC that only retainsJobIDandStateinformation, reducing work required byslurmctldto respond. state only, lowkey efficient โจ-p,--partition=<part_list>โ Specify the partitions of the jobs or steps to view. Accepts a comma separated list of partition names. partition picker ๐-P,--priorityโ For pending jobs submitted to multiple partitions, list the job once per partition. In addition, if jobs are sorted by priority, consider both the partition and job priority. This option can be used to produce a list of pending jobs in the same order considered for scheduling by Slurm with appropriate additional options (e.g.--sort=-p,i --states=PD). priority order, main character scheduling ๐-q,--qos=<qos_list>โ Specify the qos(s) of the jobs or steps to view. Accepts a comma separated list of qosโs. qos era ๐-R,--reservation=<reservation_list>โ Specify the reservations of the jobs to view. Accepts a comma separated list of reservation names. Jobs matching any reservation will satisfy the filter (logic works like an OR). reservation filter, OR logic bestie ๐--running-over=<time>โ Display only jobs that have been running over the amount of specified time. Acceptable time formats include"minutes","minutes:seconds","hours:minutes:seconds","days-hours","days-hours:minutes"and"days-hours:minutes:seconds". over the limit ๐ฅ--running-under=<time>โ Display only jobs that have been running under the amount of specified time. Acceptable time formats include"minutes","minutes:seconds","hours:minutes:seconds","days-hours","days-hours:minutes"and"days-hours:minutes:seconds". under the limit ๐ธ--siblingโ Show all sibling jobs on a federated cluster. Implies--federation. sibling slay ๐ฆ-S,--sort=<sort_list>โ Specification of the order in which records should be reported. This uses the same field specification as the<output_format>. The long format option"cluster"can also be used to sort jobs or job steps by cluster name (e.g. federated jobs). Multiple sorts may be performed by listing multiple sort fields separated by commas. The field specifications may be preceded by"+"or"-"for ascending (default) and descending order respectively. For example, a sort value of"P,U"will sort the records by partition name then by user id. The default value of sort for jobs is"P,t,-p"(increasing partition name then within a given partition by increasing job state and then decreasing priority). The default value of sort for job steps is"P,i"(increasing partition name then within a given partition by increasing step id). sorting is a whole personality ๐--startโ Report the expected start time and resources to be allocated for pending jobs in order of increasing start time. This is equivalent to the following options:--format="%.18i %.9P %.8j %.8u %.2t %.19S %.6D %20Y %R",--sort=Sand--states=PENDING. Any of these options may be explicitly changed as desired by combining the--startoption with other option values (e.g. to use a different output format). The expected start time of pending jobs is only available if the Slurm is configured to use the backfill scheduling plugin. pending jobs get a start-time forecast ๐ฎโจ-t,--states=<state_list>โ Specify the states of jobs to view. Accepts a comma separated list of state names or"all". If"all"is specified then jobs of all states will be reported. If no state is specified then pending, running, and completing jobs are reported. See the JOB STATE CODES section below for a list of valid states. Both extended and compact forms are valid. Note the<state_list>supplied is case insensitive ("pd"and"PD"are equivalent). state check, case insensitive bestie ๐-s,--steps[=<step_list>]โ Specify the job steps to view. This flag indicates that a comma separated list of job steps to view follows without an equal sign (see examples). The job step format isjob_id[_array_id].step_id. Defaults to all job steps. Since this optionโs argument is optional, for proper parsing the single letter option must be followed immediately with the value and not include a space between them. For example-s1008.0and not-s 1008.0. step list, no space, no cap ๐
Another bestie PSA:-salso wants the value glued right on.-s1008.0is the move;-s 1008.0is a no. parsing said nope ๐ญ
--usageโ Print a brief help message listing thesqueueoptions. quick usage recap ๐ซถ-u,--user=<user_list>โ Request jobs or job steps from a comma separated list of users. The list can consist of user names or user id numbers. Performance of the command can be measurably improved for systems with large numbers of jobs when a single user is specified. user filter, single-user glow-up โจ-v,--verboseโ Report details ofsqueueโs actions. verbose mode = lore unlocked ๐ฅ-V,--versionโ Print version information and exit. version check, bye ๐๐--yaml,--yaml=list,--yaml=<data_parser>โ Dump information as YAML using the defaultdata_parserplugin or explicitdata_parserwith parameters. All information is dumped, even if it would normally not be. Sorting and formatting arguments passed to other options are ignored; however, most filtering arguments are still used. YAML dump, all the info, iconic ๐ฆ
๐ JOB REASON CODES ๐
Okay so these codes are literally the receipts for why your job hasn't started yet โ the scheduler said no and here's the note it left ๐ซถ
Bestie, hear me: there can be multiple reasons a job can't start right now, and in that case you only get shown the one reason that the attempted scheduling method actually ran into. So it's not the whole story, it's just the one that came up ๐
The Reasons listed below are some of the more common ones you might see. For a full list of Reason codes refer to this page: https://slurm.schedmd.com/job_reason_codes.html
AssocGrp*Limitโ the job's association has hit an aggregate limit on some resource.AssociationJobLimitโ the job's association has reached its maximum job count.AssocMax*Limitโ the job is asking for a resource that violates a per-job limit on the requested association.AssociationResourceLimitโ the job's association has hit some resource limit.AssociationTimeLimitโ the job's association has reached its time limit.BadConstraintsโ the job's constraints literally cannot be satisfied ๐ญBeginTimeโ the job's earliest start time hasn't been reached yet. patience, queen.Cleaningโ the job is being requeued and is still cleaning up from its previous execution.Dependencyโ this job depends on another job that hasn't been satisfied yet.DependencyNeverSatisfiedโ this job depends on another job that will never be satisfied. yeah that one's not happening ๐InactiveLimitโ the job reached the systemInactiveLimit.InvalidAccountโ the job's account is invalid.InvalidQOSโ the job's QOS is invalid.JobHeldAdminโ the job is held by a system administrator.JobHeldUserโ the job is held by the user.JobLaunchFailureโ the job could not be launched. this may be due to a file system problem, invalid program name, etc.Licensesโ the job is waiting for a license.NodeDownโ a node required by the job is down.NonZeroExitCodeโ the job terminated with a non-zero exit code.PartitionDownโ the partition required by this job is in a DOWN state.PartitionInactiveโ the partition required by this job is in an Inactive state and not able to start jobs.PartitionNodeLimitโ the number of nodes required by this job is outside of its partition's current limits. Can also indicate that required nodes are DOWN or DRAINED.PartitionTimeLimitโ the job's time limit exceeds its partition's current time limit.Priorityโ one or more higher priority jobs exist for this partition or advanced reservation. classic queue behavior ๐คPrologโ its Prolog program is still running.QOSGrp*Limitโ the job's QOS has reached an aggregate limit on some resource.QOSJobLimitโ the job's QOS has reached its maximum job count.QOSMax*Limitโ the job requests a resource that violates a per-job limit on the requested QOS.QOSResourceLimitโ the job's QOS has reached some resource limit.QOSTimeLimitโ the job's QOS has reached its time limit.QOSUsageThresholdโ required QOS threshold has been breached.ReqNodeNotAvailโ some node specifically required by the job is not currently available. The node may currently be in use, reserved for another job, in an advanced reservation, DOWN, DRAINED, or not responding. Nodes which are DOWN, DRAINED, or not responding will be identified as part of the job's "reason" field as "UnavailableNodes". Such nodes will typically require the intervention of a system administrator to make available. aka: go find your admin ๐ซถReservationโ the job is waiting for its advanced reservation to become available.Resourcesโ the job is waiting for resources to become available.SystemFailureโ failure of the Slurm system, a file system, the network, etc. not your fault bestie.TimeLimitโ the job exhausted its time limit.WaitingForSchedulingโ no reason has been set for this job yet. Waiting for the scheduler to determine the appropriate reason. it's giving "pending vibes only" โจ
๐ฆ JOB STATE CODES ๐ฆ
Jobs typically pass through several states in the course of their execution. The typical states are PENDING, RUNNING, SUSPENDED, COMPLETING, and COMPLETED. The following states are recognized by squeue. A full list of possible states is available at https://slurm.schedmd.com/job_state_codes.html.
BFBOOT_FAILโ job terminated due to launch failure, typically due to a hardware failure (e.g. unable to boot the node or block and the job can not be requeued).CACANCELLEDโ job was explicitly cancelled by the user or system administrator. The job may or may not have been initiated.CDCOMPLETEDโ job has terminated all processes on all nodes with an exit code of zero. we love a clean finish ๐CFCONFIGURINGโ job has been allocated resources, but are waiting for them to become ready for use (e.g. booting).CGCOMPLETINGโ job is in the process of completing. Some processes on some nodes may still be active.DLDEADLINEโ job terminated on deadline.FFAILEDโ job terminated with non-zero exit code or other failure condition. ๐ญNFNODE_FAILโ job terminated due to failure of one or more allocated nodes.OOMOUT_OF_MEMORYโ job experienced out of memory error. the classic ๐PDPENDINGโ job is awaiting resource allocation.PRPREEMPTEDโ job terminated due to preemption.RRUNNINGโ job currently has an allocation. main character energy, honestly โจRDRESV_DEL_HOLDโ job is being held after requested reservation was deleted.RFREQUEUE_FEDโ job is being requeued by a federation.RHREQUEUE_HOLDโ held job is being requeued.RQREQUEUEDโ completing job is being requeued.RSRESIZINGโ job is about to change size.RVREVOKEDโ sibling was removed from cluster due to other cluster starting the job.SISIGNALINGโ job is being signaled.SESPECIAL_EXITโ the job was requeued in a special state. This state can be set by users, typically inEpilogSlurmctld, if the job has terminated with a particular exit value.SOSTAGE_OUTโ job is staging out files.STSTOPPEDโ job has an allocation, but execution has been stopped withSIGSTOPsignal.CPUShave been retained by this job.SSUSPENDEDโ job has an allocation, but execution has been suspended and CPUs have been released for other jobs.TOTIMEOUTโ job terminated upon reaching its time limit. rip โฐ
๐ฅ PERFORMANCE ๐ฅ
Okay so this part is the "be a considerate bestie" section, and honestly it matters ๐ซถ
Executing squeue sends a remote procedure call to slurmctld. If enough calls from squeue or other Slurm client commands that send remote procedure calls to the slurmctld daemon come in at once, it can result in a degradation of performance of the slurmctld daemon, possibly resulting in a denial of service.
Do not runsqueueor other Slurm client commands that send remote procedure calls toslurmctldfrom loops in shell scripts or other programs. Ensure that programs limit calls tosqueueto the minimum necessary for the information you are trying to gather.
Like, no cap โ spamming squeue in a while true loop is not the flex you think it is, it's lowkey a whole denial of service ๐ be gentle with the controller, she's doing her best ๐ธ
๐ธ ENVIRONMENT VARIABLES ๐ธ
okay so bestie, plot twist: you don't have to type every flag every single time ๐
some squeue options can be set through environment variables, and they've each got a matching option, all listed below for you. One thing though, and this is important โ command line options will ALWAYS override these settings. always. no cap. the env var is the vibe, the flag is the final word ๐
SLURM_BITSTR_LENโ sets the string length used to hold a job array's task ID expression. Default is64bytes. A value of0prints the full expression, however long that ends up being. Heads up though: larger values may adversely impact the application performance ๐ญSLURM_CLUSTERSโ same as--clustersSLURM_CONFโ where the Slurm configuration file livesSLURM_DEBUG_FLAGSโ specify debug flags forsqueueto use. SeeDebugFlagsin theslurm.conf(5)man page for the full list of flags. This env var takes precedence over the setting in theslurm.conf๐ซถSLURM_JSONโ controls JSON serialization:compactโ output JSON as compact as possibleprettyโ output JSON in pretty format to make it more readable
SLURM_TIME_FORMATโ specifies the format used to report time stamps โจstandardโ the default value, generates output in the form"year-month-dateThour:minute:second"relativeโ returns only"hour:minute:second"if it's the current day. For other dates in the current year it prints the"hour:minute"preceded by"Tomorr"(tomorrow),"Ystday"(yesterday), or the name of the day for the coming week (e.g."Mon","Tue", etc.), otherwise the date (e.g."25 Apr"). For other years it returns a date month and year without a time (e.g."6 Jun 2012"). All of the time stamps use a 24 hour format ๐ฐ๏ธ
a valid strftime() format can also be specified. For example, a value of "%a %T" will report the day of the week and a time stamp (e.g. "Mon 12:34:56") โ iconic, honestly.
SLURM_YAMLโ controls YAML serialization:compactโ output YAML as compact as possibleprettyโ output YAML in pretty format to make it more readable
SQUEUE_ACCOUNTโ-A <account_list>,--account=<account_list>SQUEUE_ALLโ-a,--allSQUEUE_ARRAYโ-r,--arraySQUEUE_NAMESโ--name=<name_list>SQUEUE_FEDERATIONโ--federationSQUEUE_FORMATโ-o <output_format>,--format=<output_format>SQUEUE_FORMAT2โ-O <output_format>,--Format=<output_format>SQUEUE_LICENSESโ-p-l <license_list>,--license=<license_list>SQUEUE_LOCALโ--localSQUEUE_PARTITIONโ-p <part_list>,--partition=<part_list>SQUEUE_PRIORITYโ-P,--prioritySQUEUE_QOSโ-p <qos_list>,--qos=<qos_list>SQUEUE_SIBLINGโ--siblingSQUEUE_SORTโ-S <sort_list>,--sort=<sort_list>SQUEUE_STATESโ-t <state_list>,--states=<state_list>SQUEUE_USERSโ-u <user_list>,--users=<user_list>
๐ฆ EXAMPLES ๐ฆ
okay these are my favorite part, look at all this slay in action ๐
Print the jobs scheduled in the debug partition and in the COMPLETED state, in the format with six right justified digits for the job id followed by the priority with an arbitrary fields size:
$ squeue -p debug -t COMPLETED -o "%.6i %p"
JOBID PRIORITY
65543 99993
65544 99992
65545 99991
Print the job steps in the debug partition sorted by user:
$ squeue -s -p debug -S u
STEPID NAME PARTITION USER TIME NODELIST
65552.1 test1 debug alice 0:23 dev[1-4]
65562.2 big_run debug bob 0:18 dev22
65550.1 param1 debug candice 1:43:21 dev[6-12]
Print information only about jobs 12345, 12346 and 12348:
$ squeue --jobs 12345,12346,12348
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
12345 debug job1 dave R 0:21 4 dev[9-12]
12346 debug job2 dave PD 0:00 8 (Resources)
12348 debug job3 ed PD 0:00 4 (Priority)
Print information only about job step 65552.1:
$ squeue --steps 65552.1
STEPID NAME PARTITION USER TIME NODELIST
65552.1 test2 debug alice 12:49 dev[1-4]
see how easy that was? like, look at us go ๐ญ๐ซถ
๐ COPYING ๐
Legal time, bestie โ I'm gonna keep it real and keep it exact, because this stuff is not the place to freestyle ๐
Copyright (C) 2002-2007 The Regents of the University of California. Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). Copyright (C) 2008-2010 Lawrence Livermore National Security. Copyright (C) 2010-2022 SchedMD LLC.
This file is part of Slurm, a resource management program. For details, see <https://slurm.schedmd.com/>.
Slurm is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version ๐
Slurm is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
๐ SEE ALSO ๐
go read these next, i'm literally obsessed with cross-referencing, iykyk ๐โจ
scancel(1)scontrol(1)sinfo(1)srun(1)slurm_load_ctl_conf (3)slurm_load_jobs (3)slurm_load_node (3)slurm_load_partitions (3)
and that's the whole page, bestie!! ๐ฅณ๐ you officially know squeue better than most people know their own phone passcode. this page came from the Slurm 26.05 release โ that's the version stamp โ living in the Slurm Commands section under squeue(1), with whatever date your build shipped it on sitting right there in the footer next to the version. go forth and queue responsibly ๐
๐๐ฆ
๐ฆ where this page comes from
- arch rolling: slurm-llnl 26.05.5.1-1 ยท GPL-2.0-or-later
- epel 10: slurm 26.05.5-1.el10_3 ยท GPL-2.0-or-later AND BSD-2-Clause AND BSD-1-Clause
- nixpkgs unstable: slurm 26-05-5-1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms