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_DEBUG_FLAGS
89              Specify debug flags for sattach to use. See  DebugFlags  in  the
90              slurm.conf(5) man page for a full list of flags. The environment
91              variable takes precedence over the setting in the slurm.conf.
92
93       SLURM_EXIT_ERROR
94              Specifies the exit code generated  when  a  Slurm  error  occurs
95              (e.g. invalid options).  This can be used by a script to distin‐
96              guish application exit codes from  various  Slurm  error  condi‐
97              tions.
98

EXAMPLES

100       Attach to job 15, step 0:
101
102              $ sattach 15.0
103
104
105       Limit the output to the 5th task of job 65386, step 15:
106
107              $ sattach --output-filter 5 65386.15
108
109

COPYING

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

SEE ALSO

131       sinfo(1),  salloc(1),  sbatch(1),  squeue(1),  scancel(1), scontrol(1),
132       slurm.conf(5), sched_setaffinity (2), numa (3)
133
134
135
136August 2022                     Slurm Commands                      sattach(1)
Impressum