1sattach(1)                      Slurm Commands                      sattach(1)
2
3
4

NAME

6       sattach - Attach to a Slurm job step.
7

SYNOPSIS

9       sattach [options] <jobid.stepid>
10

DESCRIPTION

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

OPTIONS

19       --error-filter[=]<task number>
20              Only transmit standard input to a  single  task,  or  print  the
21              standard  output or standard error from a single task.  The fil‐
22              tering is performed locally in sattach.
23
24
25       -h, --help
26              Display help information and exit.
27
28
29       --input-filter[=]<task number>
30              Only transmit standard input to a  single  task,  or  print  the
31              standard  output or standard error from a single task.  The fil‐
32              tering is performed locally in sattach.
33
34
35       -l, --label
36              Prepend each line of task standard output or standard error with
37              the task number of its origin.
38
39
40       --layout
41              Contacts the slurmctld to obtain the task layout information for
42              the job step, prints the task layout information, and then exits
43              without attaching to the job step.
44
45
46       --output-filter[=]<task number>
47              Only  transmit  standard  input  to  a single task, or print the
48              standard output or standard error from a single task.  The  fil‐
49              tering is performed locally in sattach.
50
51
52       --pty  Execute  task  zero in pseudo terminal.  Not compatible with the
53              --input-filter,  --output-filter,  or  --error-filter   options.
54              Notes:  The  terminal size and resize events are ignored by sat‐
55              tach.  Proper operation requires that the job step be  initiated
56              by srun using the --pty option.
57
58
59       -Q, --quiet
60              Suppress  informational messages from sattach. Errors will still
61              be displayed.
62
63
64       -u, --usage
65              Display brief usage message and exit.
66
67
68       -V, --version
69              Display Slurm version number and exit.
70
71
72       -v, --verbose
73              Increase the  verbosity  of  sattach's  informational  messages.
74              Multiple -v's will further increase sattach's verbosity.
75
76

PERFORMANCE

78       Executing sattach sends a remote procedure call to slurmctld. If enough
79       calls from sattach or other Slurm client commands that send remote pro‐
80       cedure  calls to the slurmctld daemon come in at once, it can result in
81       a degradation of performance of the slurmctld daemon, possibly  result‐
82       ing in a denial of service.
83
84       Do not run sattach or other Slurm client commands that send remote pro‐
85       cedure calls to slurmctld from loops in shell  scripts  or  other  pro‐
86       grams.  Ensure that programs limit calls to sattach to the minimum nec‐
87       essary for the information you are trying to gather.
88
89

INPUT ENVIRONMENT VARIABLES

91       Upon startup, salloc will read and handle the options set in  the  fol‐
92       lowing  environment variables.  Note: Command line options always over‐
93       ride environment variables settings.
94
95
96       SLURM_CONF
97              The location of the Slurm configuration file.
98
99       SLURM_EXIT_ERROR
100              Specifies the exit code generated  when  a  Slurm  error  occurs
101              (e.g. invalid options).  This can be used by a script to distin‐
102              guish application exit codes from  various  Slurm  error  condi‐
103              tions.
104
105
106

EXAMPLES

108       Attach to job 15, step 0:
109
110              $ sattach 15.0
111
112
113       Limit the output to the 5th task of job 65386, step 15:
114
115              $ sattach --output-filter 5 65386.15
116
117

COPYING

119       Copyright  (C)  2006-2007  The Regents of the University of California.
120       Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
121       Copyright (C) 2008-2009 Lawrence Livermore National Security.
122       Copyright (C) 2010-2021 SchedMD LLC.
123
124       This file is part of Slurm, a resource  management  program.   For  de‐
125       tails, see <https://slurm.schedmd.com/>.
126
127       Slurm  is free software; you can redistribute it and/or modify it under
128       the terms of the GNU General Public License as published  by  the  Free
129       Software  Foundation;  either version 2 of the License, or (at your op‐
130       tion) any later version.
131
132       Slurm is distributed in the hope that it will be  useful,  but  WITHOUT
133       ANY  WARRANTY;  without even the implied warranty of MERCHANTABILITY or
134       FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General  Public  License
135       for more details.
136
137

SEE ALSO

139       sinfo(1),  salloc(1),  sbatch(1),  squeue(1),  scancel(1), scontrol(1),
140       slurm.conf(5), sched_setaffinity (2), numa (3)
141
142
143
144April 2021                      Slurm Commands                      sattach(1)
Impressum