\fBsacct\fR [\fIOPTIONS\fR...] .SH "DESCRIPTION" .PP Accounting information for jobs invoked with Slurm are either logged in the job accounting log file or saved to the Slurm database, as configured with the AccountingStorageType parameter. .PP The \f3sacct\fP command displays job accounting data stored in the job accounting log file or Slurm database in a variety of forms for your analysis. The \f3sacct\fP command displays information on jobs, job steps, status, and exitcodes by default. You can tailor the output with the use of the \f3\-\-format=\fP option to specify the fields to be shown. .PP For the root user, the \f3sacct\fP command displays job accounting data for all users, although there are options to filter the output to report only the jobs from a specified user or group. .PP For the non\-root user, the \f3sacct\fP command limits the display of job accounting data to jobs that were launched with their own user identifier (UID) by default. Data for other users can be displayed with the \f3\-\-allusers\fP, \f3\-\-user\fP, or \f3\-\-uid\fP options. .PP Elapsed time fields are presented as [days-]hours:minutes:seconds[.microseconds]. Only 'CPU' fields will ever have microseconds. .PP The default input file is the file named in the \f3AccountingStorageLoc\fP parameter in slurm.conf. .TP "7" \f3Note: \fP\c If designated, the slurmdbd.conf option PrivateData may further restrict the accounting data visible to users which are not SlurmUser, root, or a user with AdminLevel=Admin. See the slurmdbd.conf man page for additional details on restricting access to accounting data. .TP \f3Note: \fP\c If the AccountingStorageType is set to "accounting_storage/filetxt", space characters embedded within account names, job names, and step names will be replaced by underscores. If account names with embedded spaces are needed, it is recommended that a database type of accounting storage be configured. .TP \f3Note: \fP\c The contents of Slurm's database are maintained in lower case. This may result in some \f3sacct\fP output differing from that of other Slurm commands. .TP \f3Note: \fP\c Much of the data reported by \f3sacct\fP has been generated by the \f2wait3()\fP and \f2getrusage()\fP system calls. Some systems .TP \f3\-A \fP\f2account_list\fP \fP\f3,\fP \f3\-\-accounts\fP\f3=\fP\f2account_list\fP Displays jobs when a comma separated list of accounts are given as the argument. .IP .TP \f3\-b\fP\f3,\fP \f3\-\-brief\fP Displays a brief listing, which includes the following data: .RS .TP "3" \f3jobid\fP .TP "3" \f3status\fP .TP "3" \f3exitcode\fP .RE .IP .TP \f3\-c\fP\f3,\fP \f3\-\-completion\fP Use job completion data instead of job accounting. The \f3JobCompType\fP parameter in the slurm.conf file must be defined to a non\-none option. Does not support federated cluster information (local data only). .IP .TP \f3\-C \fP\f2constraint_list\fP\f3,\fP \f3\-\-constraints\fP\f3=\fP\f2constraint_list\fP Comma separated list to filter jobs based on what constraints/features the job requested. Multiple options will be treated as 'and' not 'or', so the job would need all constraints specified to be returned not one or the other. .TP \f3\-\-delimiter\f3=\fP\f2characters\fP ASCII characters used to separate the fields when specifying the \f3\-p\fP or \f3\-P\fP options. The default delimiter is a '|'. This option is ignored if \f3\-p\fP or \f3\-P\fP options are not specified. .TP \f3\-D\fP\f3,\fP \f3\-\-duplicates\fP If Slurm job ids are reset, some job numbers will probably appear more than once in the accounting log file but refer to different jobs. Such jobs can be distinguished by the "submit" time stamp in the data records. .IP When data for specific jobs are requested with the \-\-jobs option, \f3sacct\fP returns the most recent job with that number. This behavior can be overridden by specifying \-\-duplicates, in which case all records that match the selection criteria will be returned. Fields available: Account AdminComment AllocCPUS AllocGRES AllocNodes AllocTRES AssocID AveCPU AveCPUFreq AveDiskRead AveDiskWrite AvePages AveRSS AveVMSize BlockID Cluster Comment Constraints ConsumedEnergy ConsumedEnergyRaw CPUTime CPUTimeRAW DBIndex DerivedExitCode Elapsed ElapsedRaw Eligible End ExitCode Flags GID Group JobID JobIDRaw JobName Layout MaxDiskRead MaxDiskReadNode MaxDiskReadTask MaxDiskWrite MaxDiskWriteNode MaxDiskWriteTask MaxPages MaxPagesNode MaxPagesTask MaxRSS MaxRSSNode MaxRSSTask MaxVMSize MaxVMSizeNode MaxVMSizeTask McsLabel MinCPU MinCPUNode MinCPUTask NCPUS NNodes NodeList NTasks Priority Partition QOS QOSRAW Reason ReqCPUFreq ReqCPUFreqMin ReqCPUFreqMax ReqCPUFreqGov ReqCPUS ReqGRES ReqMem ReqNodes ReqTRES Reservation ReservationId Reserved ResvCPU ResvCPURAW Start State Submit Suspended SystemCPU SystemComment Timelimit TimelimitRaw TotalCPU TRESUsageInAve TRESUsageInMax TRESUsageInMaxNode TRESUsageInMaxTask TRESUsageInMin TRESUsageInMinNode TRESUsageInMinTask TRESUsageInTot TRESUsageOutAve TRESUsageOutMax TRESUsageOutMaxNode TRESUsageOutMaxTask TRESUsageOutMin TRESUsageOutMinNode TRESUsageOutMinTask TRESUsageOutTot UID User UserCPU WCKey WCKeyID WorkDir .ft 1 .fi .RE .IP NOTE: When using with Ave[RSS|VM]Size or their values in TRESUsageIn[Ave|Tot]. They represent the average/total of the highest watermarks over all ranks in the step. When using sstat they represent the average/total at the moment the command was run. .IP NOTE: TRESUsage*Min* values represent the lowest highwater mark in the step. .IP The section titled "Job Accounting Fields" describes these fields. .TP \f3\-E \fP\f2end_time\fP\fP\f3,\fP \f3\-\-endtime\fP\f3=\fP\f2end_time\fP .IP Select jobs in any state before the specified time. If states are given with the \-s option return jobs in this state before this period. See the \fBDEFAULT TIME WINDOW\fR for more details. Valid time formats are: .IP .TP \fB\-\-federation\fR Show jobs from the federation if a member of one. .TP \f3\-f \fP\f2file\fP\f3,\fP \f3\-\-file\fP\f3=\fP\f2file\fP Causes the \f3sacct\fP command to read job accounting data from the named \f2file\fP instead of the current Slurm job accounting log file. Only applicable when running the filetxt plugin. .TP \f3\-F \fP\f2flag_list\fP\f3,\fP \f3\-\-flags\fP\f3=\fP\f2flag_list\fP Comma separated list to filter jobs based on what various ways the jobs were handled. Current flags are SchedSubmit, SchedMain, SchedBackfill. These particular options describe the scheduler that started the job. .TP \f3\-g \fP\f2gid_list\fP\f3, \-\-gid=\fP\f2gid_list\fP \f3\-\-group=\fP\f2group_list\fP Displays the statistics only for the jobs started with the GID or the GROUP specified by the \f2gid_list\fP or the \f2group_list\fP operand, which is a comma\-separated list. Space characters are not allowed. Default is no restrictions. .TP \f3\-h\fP\f3,\fP \f3\-\-help\fP Displays a general help message. .TP \f3\-i\fP\f3,\fP \f3\-\-nnodes\fP\f3=\fP\f2N\fP Return jobs which ran on this many nodes (N = min[\-max]) .TP \f3\-j \fP\f2job(.step)\fP \f3,\fP \f3\-\-jobs\fP\f3=\fP\f2job(.step)\fP Displays information about the specified job(.step) or list of job(.step)s. .IP The \f2job(.step)\fP parameter is a comma\-separated list of jobs. Space characters are not permitted in this list. NOTE: A step id of 'batch' will display the information about the batch step. .IP By default sacct shows only jobs with Eligible time, but with this option the non-eligible will be also shown. NOTE: If --state is also specified, as non-eligible are not PD, then non-eligible jobs will not be displayed. See the \fBDEFAULT TIME WINDOW\fR for details about how this option changes the default \-S and \-E options. .TP .TP \f3\-l\fP\f3,\fP \f3\-\-long\fP Equivalent to specifying: .IP .na \-\-format=jobid,jodidraw,jobname,partition,maxvmsize,maxvmsizenode, maxvmsizetask,avevmsize,maxrss,maxrssnode,maxrsstask,averss,maxpages, maxpagesnode,maxpagestask,avepages,mincpu,mincpunode,mincputask,avecpu,ntasks, alloccpus,elapsed,state,exitcode,avecpufreq,reqcpufreqmin,reqcpufreqmax, reqcpufreqgov,reqmem,consumedenergy,maxdiskread,maxdiskreadnode,maxdiskreadtask, avediskread,maxdiskwrite,maxdiskwritenode,maxdiskwritetask,avediskwrite, allocgres,reqgres,reqtres,alloctres,tresusageinave,tresusageinmax, tresusageinmaxn,tresusageinmaxt,tresusageinmin,tresusageinminn,tresusageinmint, tresusageintot,tresusageoutmax,tresusageoutmaxn, tresusageoutmaxt,tresusageoutave,tresusageouttot .ad .TP \f3\-L\fP\f3,\fP \f3\-\-allclusters\fP Display jobs ran on all clusters. By default, only jobs ran on the cluster from where \f3sacct\fP is called are displayed. .TP \f3\-M \fP\f2cluster_list\fP\f3, \-\-clusters=\fP\f2cluster_list\fP Displays the statistics only for the jobs started on the clusters specified by the \f2cluster_list\fP operand, which is a comma\-separated list of clusters. Space characters are not allowed in the \f2cluster_list\fP. A value of \(aq\fIall\fR' will query to run on all clusters. The default is current cluster you are executing the \f3sacct\fP command on or all clusters in the federation when executed on a federated cluster. This option implicitly sets the \fB\-\-local\fR option. .TP \f3\-n\fP\f3,\fP \f3\-\-noheader\fP No heading will be added to the output. The default action is to display a header. .IP .TP \f3\-\-noconvert\fP Don't convert units from their original type (e.g. 2048M won't be converted to 2G). .IP .TP \f3\-N \fP\f2node_list\fP\f3, \-\-nodelist=\fP\f2node_list\fP Display jobs that ran on any of these node(s). \f2node_list\fP can be a ranged string. .IP justified. A %\-30 will print 30 characters left justified. When set, the SACCT_FORMAT environment variable will override the default format. For example: SACCT_FORMAT="jobid,user,account,cluster" .TP \f3\-p\fP\f3,\fP \f3\-\-parsable\fP output will be '|' delimited with a '|' at the end .TP \f3\-P\fP\f3,\fP \f3\-\-parsable2\fP output will be '|' delimited without a '|' at the end .TP \f3\-q\fP\f3,\fP \f3\-\-qos\fP Only send data about jobs using these qos. Default is all. .TP \f3\-r\fP\f3,\fP \f3\-\-partition\fP Comma separated list of partitions to select jobs and job steps from. The default is all partitions. .TP \f3\-R \fP\f2reason_list\fP\f3,\fP \f3\-\-reason\fP\f3=\fP\f2reason_list\fP Comma separated list to filter jobs based on what reason the job wasn't scheduled outside resources/priority. .TP \f3\-s \fP\f2state_list\fP\f3,\fP \f3\-\-state\fP\f3=\fP\f2state_list\fP Selects jobs based on their state during the time period given. Unless otherwise specified, the start and end time will be the current time when the \f3\-\-state\fP option is specified and only currently running jobs can be displayed. A start and/or end time must be specified to view information about jobs not currently running. See the \fBJOB STATE CODES\fR section below for a list of state designators. Multiple state names may be specified using comma separators. Either the short or long form of the state name may be used (e.g. \f3CA\fP or \f3CANCELLED\fP) and the name is case insensitive (i.e. \f3ca\fP and \f3CA\fP both work). NOTE: Note for a job to be selected in the PENDING state it must have "EligibleTime" in the requested time interval or different from "Unknown". The "EligibleTime" is displayed by the "scontrol show job" command. For example jobs submitted with the "\-\-hold" option will have "EligibleTime=Unknown" as they are pending indefinitely. NOTE: When specifying states and no start time is given the default start time is 'now'. This is only when \-j is not used. If \-j is used the start time will default to 'Epoch'. In both cases if no end time is given it HH:MM[:SS][AM|PM] .br MMDD[YY][\-HH:MM[:SS]] .br MM.DD[.YY][\-HH:MM[:SS]] .br MM/DD[/YY][\-HH:MM[:SS]] .br YYYY\-MM\-DD[THH:MM[:SS]] .br today, midnight, noon, fika (3 PM), teatime (4 PM) .br now .TP \f3\-T\fP\f3,\fP \f3\-\-truncate\fP Truncate time. So if a job started before \-\-starttime the start time would be truncated to \-\-starttime. The same for end time and \-\-endtime. .TP \f3\-u \fP\f2uid_list\fP\f3, \-\-uid=\fP\f2uid_list\fP\f3, \-\-user=\fP\f2user_list\fP Use this comma separated list of uids or user names to select jobs to display. By default, the running user's uid is used. .TP \f3\-\-units=[KMGTP]\fP Display values in specified unit type. Takes precedence over \-\-noconvert option. .TP \f3\-\-usage\fP Display a command usage summary. .TP \f3\-v\fP\f3,\fP \f3\-\-verbose\fP Primarily for debugging purposes, report the state of various variables during processing. .TP \f3\-V\fP\f3,\fP \f3\-\-version\fP Print version. .TP \f3\-\-whole\-hetjob=[yes|no]\fP When querying heterogeneous jobs, Slurm by default retrieves the information about all the components of the job if the het_job_id (leader id) is selected. If a non\-leader heterogeneous job component id is selected only that component is retrieved by default. This behavior can be changed by using this option. If set to 'yes' or no value is set, then information about all the components will be retrieved no matter which component is selected in the job filter. Otherwise, if set to 'no' then only the selected heterogeneous job components will be retrieved, even when selecting the leader. .TP \f3\-X\fP\f3,\fP \f3\-\-allocations\fP Only show statistics relevant to the job allocation itself, not taking steps into consideration. \fBNOTE\fR: Without including steps, utilization statistics for job allocation(s) will be reported as zero. .SS "Job Accounting Fields" The following describes each job accounting field: .RS .TP "10" \f3ALL\fP Print all fields listed below. .TP \f3AllocCPUs\fP Count of allocated CPUs. Equivalent to \f3NCPUS\fP. .TP \f3AllocGRES\fP Names and counts of generic resources allocated. NOTE: When a generic resource is configured with the no_consume flag, the allocation will be printed with a zero. .TP \f3AllocNodes\fP Number of nodes allocated to the job/step. 0 if the job is pending. .TP \f3AllocTres\fP Trackable resources. These are the resources allocated to the job/step after the job started running. For pending jobs this should be blank. For more details see AccountingStorageTRES in slurm.conf. NOTE: When a generic resource is configured with the no_consume flag, the allocation will be printed with a zero. .TP \f3Account\fP Account the job ran under. .TP \f3AssocID\fP Reference to the association of user, account and cluster. .TP \f3AveCPU\fP Average (system + user) CPU time of all tasks in job. Average number of page faults of all tasks in job. .TP \f3AveRSS\fP Average resident set size of all tasks in job. .TP \f3AveVMSize\fP Average Virtual Memory size of all tasks in job. .TP \f3Cluster\fP Cluster name. .TP \f3Comment\fP The job's comment string when the AccountingStoreJobComment parameter in the slurm.conf file is set (or defaults) to YES. The Comment string can be modified by invoking \f3sacctmgr modify job\fP or the specialized \f3sjobexitmod\fP command. .TP \f3ConsumedEnergy\fP Total energy consumed by all tasks in job, in joules. Note: Only in case of exclusive job allocation this value reflects the jobs' real energy consumption. .TP \f3CPUTime\fP Time used (Elapsed time * CPU count) by a job or step in HH:MM:SS format. .TP \f3CPUTimeRAW\fP Time used (Elapsed time * CPU count) by a job or step in cpu-seconds. .TP \f3DerivedExitCode\fP The highest exit code returned by the job's job steps (srun invocations). Following the colon is the signal that caused the process to terminate if it was terminated by a signal. The DerivedExitCode can be modified by invoking \f3sacctmgr modify job\fP or the specialized \f3sjobexitmod\fP command. .TP \f3Elapsed\fP The jobs elapsed time. .IP The format of this fields output is as follows: .RS .PD "0" .HP \f2[DD\-[HH:]]MM:SS\fP .TP \f2ss\fP seconds .RE .TP \f3Eligible\fP When the job became eligible to run in the same format as \f3End\fP. .TP \f3End\fP Termination time of the job. Format output is, YYYY\-MM\-DDTHH:MM:SS, unless changed through the SLURM_TIME_FORMAT environment variable. .TP \f3ExitCode\fP The exit code returned by the job script or salloc, typically as set by the exit() function. Following the colon is the signal that caused the process to terminate if it was terminated by a signal. .TP \f3GID\fP The group identifier of the user who ran the job. .TP \f3Group\fP The group name of the user who ran the job. .TP \f3JobID\fP The identification number of the job or job step. .IP Regular jobs are in the form: .IP \f2JobID[.JobStep]\fP\c .IP Array jobs are in the form: .IP \f2ArrayJobID_ArrayTaskID\fP\c .IP Heterogeneous jobs are in the form: .IP \f2HetJobID+HetJobOffset\fP\c \&. .TP \f3JobIDRaw\fP The identification number of the job or job step. Prints the JobID in the form \f2JobID[.JobStep]\fP\c for regular, heterogeneous and array jobs. \&. .TP \f3MaxDiskRead\fP Maximum number of bytes read by all tasks in job. .TP \f3MaxDiskReadNode\fP The node on which the maxdiskread occurred. .TP \f3MaxDiskReadTask\fP The task ID where the maxdiskread occurred. .TP \f3MaxDiskWrite\fP Maximum number of bytes written by all tasks in job. .TP \f3MaxDiskWriteNode\fP The node on which the maxdiskwrite occurred. .TP \f3MaxDiskWriteTask\fP The task ID where the maxdiskwrite occurred. .TP \f3MaxPages\fP Maximum number of page faults of all tasks in job. .TP \f3MaxPagesNode\fP The node on which the maxpages occurred. .TP \f3MaxPagesTask\fP The task ID where the maxpages occurred. .TP \f3MaxRSS\fP Maximum resident set size of all tasks in job. .TP \f3MaxRSSNode\fP The node on which the maxrss occurred. .TP \f3MaxRSSTask\fP The task ID where the maxrss occurred. .TP \f3MaxVMSize\fP Maximum Virtual Memory size of all tasks in job. .TP .TP \f3MinCPUTask\fP The task ID where the mincpu occurred. .TP \f3NCPUS\fP Total number of CPUs allocated to the job. Equivalent to \f3AllocCPUS\fP. .TP \f3NodeList\fP List of nodes in job/step. .TP \f3NNodes\fP Number of nodes in a job or step. If the job is running, or ran, this count will be the number allocated, else the number will be the number requested. .TP \f3NTasks\fP Total number of tasks in a job or step. .TP \f3Priority\fP Slurm priority. .TP \f3Partition\fP Identifies the partition on which the job ran. .TP \f3QOS\fP Name of Quality of Service. .TP \f3QOSRAW\fP Numeric id of Quality of Service. .TP \f3ReqCPUFreq\fP Requested CPU frequency for the step, in kHz. Note: This value applies only to a job step. No value is reported for the job. .TP \f3ReqCPUFreqGov\fP Requested CPU frequency governor for the step, in kHz. Note: This value applies only to a job step. No value is reported for the job. .TP \f3ReqCPUFreqMax\fP Maximum requested CPU frequency for the step, in kHz. Note: This value applies only to a job step. No value is reported for the job. .TP \f3ReqMem\fP Minimum required memory for the job, in MB. A 'c' at the end of number represents Memory Per CPU, a 'n' represents Memory Per Node. Note: This value is only from the job allocation, not the step. .TP \f3ReqNodes\fP Requested minimum Node count for the job/step. .TP \f3ReqTres\fP Trackable resources. These are the minimum resource counts requested by the job/step at submission time. For more details see AccountingStorageTRES in slurm.conf. .TP \f3Reservation\fP Reservation Name. .TP \f3ReservationId\fP Reservation Id. .TP \f3Reserved\fP How much wall clock time was used as reserved time for this job. This is derived from how long a job was waiting from eligible time to when it actually started. Format is the same as \f3Elapsed\fP. .TP \f3ResvCPU\fP How many CPU seconds were used as reserved time for this job. Format is the same as \f3Elapsed\fP. .TP \f3ResvCPURAW\fP How many CPU seconds were used as reserved time for this job. Format is in processor seconds. .TP \f3Start\fP Initiation time of the job in the same format as \f3End\fP. .TP \f3State\fP Displays the job status, or state. See the \fBJOB STATE CODES\fR section below for a list of possible states. If more information is available on the job state than will fit into the current field width (for example, the uid that CANCELLED a job) the state will be followed by a "+". You can increase the size of NOTE: If a job is requeued, the submit time is reset. To obtain the original submit time it is necessary to use the \-D or \-\-duplicate option to display all duplicate entries for a job. .TP \f3Suspended\fP The amount of time a job or job step was suspended. Format is the same as \f2Elapsed\fP. .TP \f3SystemCPU\fP The amount of system CPU time used by the job or job step. Format is the same as \f3Elapsed\fP. NOTE: SystemCPU provides a measure of the task's parent process and does not include CPU time of child processes. .TP \f3Timelimit\fP What the timelimit was/is for the job. Format is the same as \f3Elapsed\fP. .TP \f3TimelimitRaw\fP What the timelimit was/is for the job. Format is in number of minutes. .TP \f3TotalCPU\fP The sum of the SystemCPU and UserCPU time used by the job or job step. The total CPU time of the job may exceed the job's elapsed time for jobs that include multiple job steps. Format is the same as \f3Elapsed\fP. NOTE: TotalCPU provides a measure of the task's parent process and does not include CPU time of child processes. .TP \f3TresUsageInAve\fP Tres average usage in by all tasks in job. NOTE: If corresponding TresUsageInMaxTask is -1 the metric is node centric instead of task. .TP \f3TresUsageInMax\fP Tres maximum usage in by all tasks in job. NOTE: If corresponding TresUsageInMaxTask is -1 the metric is node centric instead of task. .TP \f3TresUsageInMaxNode\fP Node for which each maximum TRES usage out occurred. .TP \f3TresUsageInMinTask\fP Task for which each minimum TRES usage out occurred. .TP \f3TresUsageInTot\fP Tres total usage in by all tasks in job. .TP \f3TresUsageOutAve\fP Tres average usage out by all tasks in job. NOTE: If corresponding TresUsageOutMaxTask is -1 the metric is node centric instead of task. .TP \f3TresUsageOutMax\fP Tres maximum usage out by all tasks in job. NOTE: If corresponding TresUsageOutMaxTask is -1 the metric is node centric instead of task. .TP \f3TresUsageOutMaxNode\fP Node for which each maximum TRES usage out occurred. .TP \f3TresUsageOutMaxTask\fP Task for which each maximum TRES usage out occurred. .TP \f3TresUsageOutTot\fP Tres total usage out by all tasks in job. .TP \f3UID\fP The user identifier of the user who ran the job. .TP \f3User\fP The user name of the user who ran the job. .TP \f3UserCPU\fP The amount of user CPU time used by the job or job step. Format is the same as \f3Elapsed\fP. NOTE: UserCPU provides a measure of the task's parent process and does not include CPU time of child processes. .TP \f3WCKey\fP Workload Characterization Key. Arbitrary string for grouping orthogonal accounts together. .TP .TP \f3CD COMPLETED\fP Job has terminated all processes on all nodes with an exit code of zero. .TP \f3DL DEADLINE\fP Job terminated on deadline. .TP \f3F FAILED\fP Job terminated with non\-zero exit code or other failure condition. .TP \f3NF NODE_FAIL\fP Job terminated due to failure of one or more allocated nodes. .TP \f3OOM OUT_OF_MEMORY\fP Job experienced out of memory error. .TP \f3PD PENDING\fP Job is awaiting resource allocation. .TP \f3PR PREEMPTED\fP Job terminated due to preemption. .TP \f3R RUNNING\fP Job currently has an allocation. .TP \f3RQ REQUEUED\fP Job was requeued. .TP \f3RS RESIZING\fP Job is about to change size. .TP \f3RV REVOKED\fP Sibling was removed from cluster due to other cluster starting the job. .TP \f3S SUSPENDED\fP Job has an allocation, but execution has been suspended and CPUs have been released for other jobs. .TP \f3TO TIMEOUT\fP Job terminated upon reaching its time limit. .SH "DEFAULT TIME WINDOW" .PP The options \-\-starttime and \-\-endtime define the time window between which \fBsacct\fR is going to search. For historical and practical reasons their default values (i.e. the default time window) depends on other options: \-\-jobs and \-\-state. Depending on if \-\-jobs and/or \-\-state are specified, the default values of \fB\-\-starttime\fR and \fB\-\-endtime\fR options are: .TP Defaults to Now. .RE .TP \f3WITHOUT \fB\-\-jobs\fR AND WITH \fB\-\-state\fR\fP specified: .RS .IP \fB\-\-\-starttime\fR Defaults to Now. .IP \fB\-\-\-endtime\fR Defaults to \-\-starttime and to Now if \-\-starttime is not specified. .RE .TP \f3WITH BOTH \fB\-\-jobs\fR AND \fB\-\-state\fR\fP specified: .RS .IP \fB\-\-\-starttime\fR Defaults to Epoch 0. .IP \fB\-\-\-endtime\fR Defaults to \-\-starttime or to Now if \-\-starttime is not specified. .RE .PP NOTE: With \fB\-v/\-\-verbose\fR a message about the actual time window in use is shown. .SH "PERFORMANCE" .PP Executing \fBsacct\fR sends a remote procedure call to \fBslurmdbd\fR. If enough calls from \fBsacct\fR or other Slurm client commands that send remote procedure calls to the \fBslurmdbd\fR daemon come in at once, it can result in a degradation of performance of the \fBslurmdbd\fR daemon, possibly resulting in a denial of service. .PP Do not run \fBsacct\fR or other Slurm client commands that send remote procedure calls to \fBslurmdbd\fR from loops in shell scripts or other programs. Ensure that programs limit calls to \fBsacct\fR to the minimum necessary for the information you are trying to gather. .SH "ENVIRONMENT VARIABLES" .PP Some \fBsacct\fR options may be set via environment variables. These environment variables, along with their corresponding options, are listed below. (Note: Commandline options will always override these settings.) .TP 20 \fBSACCT_FEDERATION\fR Same as \fB\-\-federation\fR .TP \fBSACCT_LOCAL\fR Same as \fB\-\-local\fR 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"). .SH "EXAMPLES" This example illustrates the default invocation of the \f3sacct\fP command: .RS .PP .nf .ft 3 # sacct Jobid Jobname Partition Account AllocCPUS State ExitCode \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\- 2 script01 srun acct1 1 RUNNING 0 3 script02 srun acct1 1 RUNNING 0 4 endscript srun acct1 1 RUNNING 0 4.0 srun acct1 1 COMPLETED 0 .ft 1 .fi .RE .PP This example shows the same job accounting information with the \f3brief\fP option. .RS .PP .nf .ft 3 # sacct \-\-brief Jobid State ExitCode \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\- 2 RUNNING 0 3 RUNNING 0 4 RUNNING 0 4.0 COMPLETED 0 .ft 1 .fi .RE .PP .RS .PP .nf .ft 3 # sacct \-\-allocations Jobid Jobname Partition Account AllocCPUS State ExitCode \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\- 3 sja_init andy acct1 1 COMPLETED 0 4 sjaload andy acct1 2 COMPLETED 0 5 sja_scr1 andy acct1 1 COMPLETED 0 6 sja_scr2 andy acct1 18 COMPLETED 2 7 sja_scr3 andy acct1 18 COMPLETED 0 8 sja_scr5 andy acct1 2 COMPLETED 0 # sacct \-\-format=jobid,elapsed,ncpus,ntasks,state Jobid Elapsed Ncpus Ntasks State \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- 3 00:01:30 2 1 COMPLETED 3.0 00:01:30 2 1 COMPLETED 4 00:00:00 2 2 COMPLETED 4.0 00:00:01 2 2 COMPLETED 5 00:01:23 2 1 COMPLETED 5.0 00:01:31 2 1 COMPLETED .ft 1 .fi .RE .PP This example demonstrates the use of the \-T (\-\-truncate) option when used with \-S (\-\-starttime) and \-E (\-\-endtime). When the \-T option is used, the start time of the job will be the specified \-S value if the job was started before the specified time, otherwise the time will be the job's start time. The end time will be the specified \-E option if the job ends after the specified time, otherwise it will be the jobs end time. Without \-T (normal operation) sacct output would be like this. .RS .PP .nf .ft 3 # sacct \-S2014\-07\-03\-11:40 \-E2014\-07\-03\-12:00 \-X \-ojobid,start,end,state JobID Start End State \-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\- 2 2014\-07\-03T11:33:16 2014\-07\-03T11:59:01 COMPLETED 3 2014\-07\-03T11:35:21 Unknown RUNNING 4 2014\-07\-03T11:35:21 2014\-07\-03T11:45:21 COMPLETED 5 2014\-07\-03T11:41:01 Unknown RUNNING .ft 1 .fi .RE .PP By adding the \-T option the job's start and end times are truncated to reflect only the time requested. If a job started after the start time requested or finished before the end time requested those times are not altered. The \-T option is useful when determining exact run times during any given period. .RS .PP .nf .ft 3 # sacct \-T \-S2014\-07\-03\-11:40 \-E2014\-07\-03\-12:00 \-X \-ojobid,jobname,user,start,end,state JobID Start End State \-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\- 2 2014\-07\-03T11:40:00 2014\-07\-03T11:59:01 COMPLETED 3 2014\-07\-03T11:40:00 2014\-07\-03T12:00:00 RUNNING \fB\-\-state\fR option, all eligible jobs in that time period are shown. .RS .PP .nf .ft 3 # sacct -S11:20:00 -E11:25:00 -X -ojobid,start,end,state JobID Start End State ------------ ------------------- ------------------- ---------- 2955 11:15:12 11:20:12 COMPLETED 2956 11:20:13 11:25:13 COMPLETED .ft 1 .fi .RE .PP With the \fB\-\-state=pending\fR option, only job 2956 will be shown because it had a dependency on 2955 and was still PENDING from 11:20:00 until it started at 11:21:13. Note that even though we requested PENDING jobs, the State shows as COMPLETED because that is the current State of the job. .RS .PP .nf .ft 3 # sacct --state=pending -S11:20:00 -E11:25:00 -X -ojobid,start,end,state JobID Start End State ------------ ------------------- ------------------- ---------- 2956 11:20:13 11:25:13 COMPLETED .ft 1 .fi .RE .SH "COPYING" Copyright (C) 2005\-2007 Copyright Hewlett\-Packard Development Company L.P. .br Copyright (C) 2008\-2010 Lawrence Livermore National Security. Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .br Copyright (C) 2010\-2014 SchedMD LLC. .LP This file is part of Slurm, a resource management program. For details, see <https://slurm.schedmd.com/>. .LP 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. .LP 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. .SH "FILES" .TP "10" \f3/etc/slurm.conf\fP
Man(1) output converted with man2html