1sattach(1) Slurm Commands sattach(1)
2
3
4
6 sattach - Attach to a Slurm job step.
7
9 sattach [options] <jobid.stepid>
10
12 sattach attaches to a running Slurm job step. By attaching, it makes
13 available the IO streams of all of the tasks of a running Slurm job
14 step. It also suitable for use with a parallel debugger like To‐
15 talView.
16
17
19 -h, --help
20 Display help information and exit.
21
22
23 --input-filter[=]<task number>
24 --output-filter[=]<task number>
25 --error-filter[=]<task number>
26 Only transmit standard input to a single task, or print the
27 standard output or standard error from a single task. The fil‐
28 tering is performed locally in sattach.
29
30
31 -l, --label
32 Prepend each line of task standard output or standard error with
33 the task number of its origin.
34
35
36 --layout
37 Contacts the slurmctld to obtain the task layout information for
38 the job step, prints the task layout information, and then exits
39 without attaching to the job step.
40
41
42 --pty Execute task zero in pseudo terminal. Not compatible with the
43 --input-filter, --output-filter, or --error-filter options.
44 Notes: The terminal size and resize events are ignored by sat‐
45 tach. Proper operation requires that the job step be initiated
46 by srun using the --pty option.
47
48
49 -Q, --quiet
50 Suppress informational messages from sattach. Errors will still
51 be displayed.
52
53
54 -u, --usage
55 Display brief usage message and exit.
56
57
58 -V, --version
59 Display Slurm version number and exit.
60
61
62 -v, --verbose
63 Increase the verbosity of sattach's informational messages.
64 Multiple -v's will further increase sattach's verbosity.
65
66
68 Executing sattach sends a remote procedure call to slurmctld. If enough
69 calls from sattach or other Slurm client commands that send remote pro‐
70 cedure calls to the slurmctld daemon come in at once, it can result in
71 a degradation of performance of the slurmctld daemon, possibly result‐
72 ing in a denial of service.
73
74 Do not run sattach or other Slurm client commands that send remote pro‐
75 cedure calls to slurmctld from loops in shell scripts or other pro‐
76 grams. Ensure that programs limit calls to sattach to the minimum nec‐
77 essary for the information you are trying to gather.
78
79
81 Upon startup, salloc will read and handle the options set in the fol‐
82 lowing environment variables. Note: Command line options always over‐
83 ride environment variables settings.
84
85
86 SLURM_CONF
87 The location of the Slurm configuration file.
88
89 SLURM_EXIT_ERROR
90 Specifies the exit code generated when a Slurm error occurs
91 (e.g. invalid options). This can be used by a script to distin‐
92 guish application exit codes from various Slurm error condi‐
93 tions.
94
95
96
98 Attach to job 15, step 0:
99
100 $ sattach 15.0
101
102
103 Limit the output to the 5th task of job 65386, step 15:
104
105 $ sattach --output-filter 5 65386.15
106
107
109 Copyright (C) 2006-2007 The Regents of the University of California.
110 Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
111 Copyright (C) 2008-2009 Lawrence Livermore National Security.
112 Copyright (C) 2010-2013 SchedMD LLC.
113
114 This file is part of Slurm, a resource management program. For de‐
115 tails, see <https://slurm.schedmd.com/>.
116
117 Slurm is free software; you can redistribute it and/or modify it under
118 the terms of the GNU General Public License as published by the Free
119 Software Foundation; either version 2 of the License, or (at your op‐
120 tion) any later version.
121
122 Slurm is distributed in the hope that it will be useful, but WITHOUT
123 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
124 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
125 for more details.
126
127
129 sinfo(1), salloc(1), sbatch(1), squeue(1), scancel(1), scontrol(1),
130 slurm.conf(5), sched_setaffinity (2), numa (3)
131
132
133
134April 2021 Slurm Commands sattach(1)