Skip to content

Commit f13230b

Browse files
authored
Merge pull request #866 from jpcaruana/document_supervisorctl_actions
Document supervisorctl actions
2 parents 27ac565 + d4af2ab commit f13230b

File tree

1 file changed

+146
-17
lines changed

1 file changed

+146
-17
lines changed

docs/running.rst

Lines changed: 146 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,27 @@ value in the configuration file.
166166
the supervisord process before it will start successfully.
167167

168168

169+
Running :program:`supervisorctl`
170+
--------------------------------
171+
172+
To start :program:`supervisorctl`, run ``$BINDIR/supervisorctl``. A
173+
shell will be presented that will allow you to control the processes
174+
that are currently managed by :program:`supervisord`. Type "help" at
175+
the prompt to get information about the supported commands.
176+
177+
The :command:`supervisorctl` executable may be invoked with "one time"
178+
commands when invoked with arguments from a command line. An example:
179+
``supervisorctl stop all``. If arguments are present on the
180+
command-line, it will prevent the interactive shell from being
181+
invoked. Instead, the command will be executed and ``supervisorctl``
182+
will exit with a code of 0 for success or running and non-zero for
183+
error. An example: ``supervisorctl status all`` would return non-zero
184+
if any single process was not running.
185+
186+
If :command:`supervisorctl` is invoked in interactive mode against a
187+
:program:`supervisord` that requires authentication, you will be asked
188+
for authentication credentials.
189+
169190
:command:`supervisorctl` Command-Line Options
170191
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171192

@@ -205,26 +226,134 @@ interactively is started. Use the action "help" to find out about available
205226
actions.
206227

207228

208-
Running :program:`supervisorctl`
209-
--------------------------------
229+
:command:`supervisorctl` Actions
230+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
210231

211-
To start :program:`supervisorctl`, run ``$BINDIR/supervisorctl``. A
212-
shell will be presented that will allow you to control the processes
213-
that are currently managed by :program:`supervisord`. Type "help" at
214-
the prompt to get information about the supported commands.
232+
help
215233

216-
The :command:`supervisorctl` executable may be invoked with "one time"
217-
commands when invoked with arguments from a command line. An example:
218-
``supervisorctl stop all``. If arguments are present on the
219-
command-line, it will prevent the interactive shell from being
220-
invoked. Instead, the command will be executed and ``supervisorctl``
221-
will exit with a code of 0 for success or running and non-zero for
222-
error. An example: ``supervisorctl status all`` would return non-zero
223-
if any single process was not running.
234+
Print a list of available actions
235+
236+
help <action>
237+
238+
Print help for <action>
239+
240+
add <name> [...]
241+
242+
Activates any updates in config for process/group
243+
244+
remove <name> [...]
245+
246+
Removes process/group from active confi
247+
248+
update
249+
250+
Reload config and add/remove as necessary
251+
252+
clear <name>
253+
254+
Clear a process' log files.
255+
256+
clear <name> <name>
257+
258+
Clear multiple process' log files
259+
260+
clear all
261+
262+
Clear all process' log files
263+
264+
fg <process>
265+
266+
Connect to a process in foreground mode
267+
Press Ctrl+C to exit foreground
268+
269+
pid
270+
271+
Get the PID of supervisord.
272+
273+
pid <name>
274+
275+
Get the PID of a single child process by name.
276+
277+
pid all
278+
279+
Get the PID of every child process, one per line.
280+
281+
restart <name>
282+
283+
Restart a process
284+
Note: restart does not reread config files. For that, see reread and update.
285+
286+
restart <gname>:*
287+
288+
Restart all processes in a group
289+
Note: restart does not reread config files. For that, see reread and update.
290+
291+
restart <name> <name>
292+
293+
Restart multiple processes or groups
294+
Note: restart does not reread config files. For that, see reread and update.
295+
296+
restart all
297+
298+
Restart all processes
299+
Note: restart does not reread config files. For that, see reread and update.
300+
301+
signal
302+
303+
No help on signal
304+
305+
start <name>
306+
307+
Start a process
308+
309+
start <gname>:*
310+
311+
Start all processes in a group
312+
313+
start <name> <name>
314+
315+
Start multiple processes or groups
316+
317+
start all
318+
319+
Start all processes
320+
321+
status
322+
323+
Get all process status info.
324+
325+
status <name>
326+
327+
Get status on a single process by name.
328+
329+
status <name> <name>
330+
331+
Get status on multiple named processes.
332+
333+
stop <name>
334+
335+
Stop a process
336+
337+
stop <gname>:*
338+
339+
Stop all processes in a group
340+
341+
stop <name> <name>
342+
343+
Stop multiple processes or groups
344+
345+
stop all
346+
347+
Stop all processes
348+
349+
tail [-f] <name> [stdout|stderr] (default stdout)
350+
351+
Output the last part of process logs
352+
Ex:
353+
tail -f <name> Continuous tail of named process stdout Ctrl-C to exit.
354+
tail -100 <name> last 100 *bytes* of process stdout
355+
tail <name> stderr last 1600 *bytes* of process stderr
224356

225-
If :command:`supervisorctl` is invoked in interactive mode against a
226-
:program:`supervisord` that requires authentication, you will be asked
227-
for authentication credentials.
228357

229358
Signals
230359
-------

0 commit comments

Comments
 (0)