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       -h, --help
25              Display help information and exit.
26
27       --input-filter[=]<task number>
28              Only transmit standard input to a  single  task,  or  print  the
29              standard  output or standard error from a single task.  The fil‐
30              tering is performed locally in sattach.
31
32       -l, --label
33              Prepend each line of task standard output or standard error with
34              the task number of its origin.
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       --output-filter[=]<task number>
42              Only  transmit  standard  input  to  a single task, or print the
43              standard output or standard error from a single task.  The  fil‐
44              tering is performed locally in sattach.
45
46       --pty  Execute  task  zero in pseudo terminal.  Not compatible with the
47              --input-filter,  --output-filter,  or  --error-filter   options.
48              Notes:  The  terminal size and resize events are ignored by sat‐
49              tach.  Proper operation requires that the job step be  initiated
50              by srun using the --pty option.
51
52       -Q, --quiet
53              Suppress  informational messages from sattach. Errors will still
54              be displayed.
55
56       -u, --usage
57              Display brief usage message and exit.
58
59       -V, --version
60              Display Slurm version number and exit.
61
62       -v, --verbose
63              Increase the  verbosity  of  sattach's  informational  messages.
64              Multiple -v's will further increase sattach's verbosity.
65

PERFORMANCE

67       Executing sattach sends a remote procedure call to slurmctld. If enough
68       calls from sattach or other Slurm client commands that send remote pro‐
69       cedure  calls to the slurmctld daemon come in at once, it can result in
70       a degradation of performance of the slurmctld daemon, possibly  result‐
71       ing in a denial of service.
72
73       Do not run sattach or other Slurm client commands that send remote pro‐
74       cedure calls to slurmctld from loops in shell  scripts  or  other  pro‐
75       grams.  Ensure that programs limit calls to sattach to the minimum nec‐
76       essary for the information you are trying to gather.
77
78

INPUT ENVIRONMENT VARIABLES

80       Upon startup, salloc will read and handle the options set in  the  fol‐
81       lowing  environment variables.  Note: Command line options always over‐
82       ride environment variables settings.
83
84
85       SLURM_CONF
86              The location of the Slurm configuration file.
87
88       SLURM_EXIT_ERROR
89              Specifies the exit code generated  when  a  Slurm  error  occurs
90              (e.g. invalid options).  This can be used by a script to distin‐
91              guish application exit codes from  various  Slurm  error  condi‐
92              tions.
93

EXAMPLES

95       Attach to job 15, step 0:
96
97              $ sattach 15.0
98
99
100       Limit the output to the 5th task of job 65386, step 15:
101
102              $ sattach --output-filter 5 65386.15
103
104

COPYING

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

SEE ALSO

126       sinfo(1),  salloc(1),  sbatch(1),  squeue(1),  scancel(1), scontrol(1),
127       slurm.conf(5), sched_setaffinity (2), numa (3)
128
129
130
131August 2022                     Slurm Commands                      sattach(1)
Impressum