1 <?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html lang="en" xmlns="http://www.w3.org/1999/xhtml">
3 <title>Twisted Documentation: TWISTD.1</title>
4 <link href="../howto/stylesheet.css" rel="stylesheet" type="text/css"/>
8 <h1 class="title">TWISTD.1</h1>
9 <div class="toc"><ol><li><a href="#auto0">NAME</a></li><li><a href="#auto1">SYNOPSIS</a></li><li><a href="#auto2">DESCRIPTION</a></li><li><a href="#auto3">OPTIONS</a></li><li><a href="#auto4">SIGNALS</a></li><li><a href="#auto5">AUTHOR</a></li><li><a href="#auto6">REPORTING BUGS</a></li><li><a href="#auto7">COPYRIGHT</a></li></ol></div>
14 <h2>NAME<a name="auto0"/></h2>
16 <p>twistd - run Twisted applications (TACs, TAPs)
19 <h2>SYNOPSIS<a name="auto1"/></h2>
21 <p><strong>twistd</strong> [options]
24 <h2>DESCRIPTION<a name="auto2"/></h2>
26 <p>Read a twisted.application.service.Application out of a file and run it.
29 <h2>OPTIONS<a name="auto3"/></h2>
31 <p><strong>-n</strong>, <strong>--nodaemon</strong>
32 Don't daemonize (stay in foreground).
33 <dl><dt><strong>-q</strong>, <strong>--quiet</strong>
34 </dt><dd>No-op for backwards compatibility.
37 <dt><strong>-p</strong>, <strong>--profile</strong> <em><profile output></em>
38 </dt><dd>Run the application under the profiler, dumping results to the specified file.
41 <dt><strong>--profiler</strong> <em><profiler name></em>
42 </dt><dd>Specify the profiler to use. Defaults to the 'hotshot' profiler.
45 <dt><strong>--savestats</strong>
46 </dt><dd>Save the Stats object rather than the text output of the profiler.
49 <dt><strong>-b</strong>, <strong>--debug</strong>
50 </dt><dd>Run the application in the Python Debugger (implies <strong>--nodaemon</strong> option).
51 Sending a SIGINT or SIGUSR2 signal to the process will drop it into the
55 <dt><strong>-e</strong>, <strong>--encrypted</strong> <em><file></em>
56 </dt><dd>The specified tap/aos file is encrypted.
59 <dt><strong>--euid</strong>
60 </dt><dd>Set only effective user-id rather than real user-id. This option has no
61 effect unless the server is running as root, in which case it means not
62 to shed all privileges after binding ports, retaining the option to regain
63 privileges in cases such as spawning processes. Use with caution.
66 <dt><strong>-o</strong>, <strong>--no_save</strong>
67 </dt><dd>Do not save shutdown state.
70 <dt><strong>--originalname</strong>
71 </dt><dd>Behave as though the specified Application has no process name set, and run
72 with the standard process name (the Python binary in most cases).
75 <dt><strong>-l</strong>, <strong>--logfile</strong> <em><logfile></em>
76 </dt><dd>Log to a specified file, - for stdout (default: twistd.log).
77 The log file will be rotated on SIGUSR1.
80 <dt><strong>-l</strong>, <strong>--logger</strong> <em><fully qualified python name></em>
81 </dt><dd>A fully-qualified name to a log observer factory to use for the initial log
82 observer. Takes precedence over --logfile and --syslog.
85 <dt><strong>--pidfile</strong> <em><pidfile></em>
86 </dt><dd>Save pid in specified file (default: twistd.pid).
89 <dt><strong>--chroot</strong> <em><directory></em>
90 </dt><dd>Chroot to a supplied directory before running (default: don't chroot).
91 Chrooting is done before changing the current directory.
94 <dt><strong>-d</strong>, <strong>--rundir</strong> <em><directory></em>
95 </dt><dd>Change to a supplied directory before running (default: .).
98 <dt><strong>-u</strong>, <strong>--uid</strong> <em><uid></em>
99 </dt><dd>The uid to run as (default: don't change).
102 <dt><strong>-g</strong>, <strong>--gid</strong> <em><gid></em>
103 </dt><dd>The gid to run as (default: don't change).
106 <dt><strong>--umask</strong> <em><mask></em>
107 </dt><dd>The (octal) file creation mask to apply. (default: 0077 for daemons, no
111 <dt><strong>-r</strong>, <strong>--reactor</strong> <em><reactor></em>
112 </dt><dd>Choose which reactor to use. See <strong>--help-reactors</strong> for a list of
116 <dt><strong>--help-reactors</strong>
117 </dt><dd>List the names of possibly available reactors.
120 <dt><strong>--spew</strong>
121 </dt><dd>Write an extremely verbose log of everything that happens. Useful for
122 debugging freezes or locks in complex code.
125 <dt><strong>-f</strong>, <strong>--file</strong> <em><tap file></em>
126 </dt><dd>Read the given .tap file (default: twistd.tap).
129 <dt><strong>-s</strong>, <strong>--source</strong> <em><tas file></em>
130 </dt><dd>Load an Application from the given .tas (AOT Python source) file.
133 <dt><strong>-y</strong>, <strong>--python</strong> <em><python file></em>
134 </dt><dd>Use the variable <q>application</q> from the given Python file. This option overrides
135 <strong>-f</strong>. This option implies <strong>--no_save</strong>.
138 <dt><strong>--syslog</strong>
139 </dt><dd>Log to syslog instead of a file.
142 <dt><strong>--version</strong>
143 </dt><dd>Print version information and exit.
146 <dt><strong>--prefix</strong> <em><prefix></em>
147 </dt><dd>Use the specified prefix when logging to logfile. Default is <q>twisted</q>.
154 <p>Note that if <strong>twistd</strong> is run as root, the working directory is <em>not</em>
155 searched for Python modules.
158 <h2>SIGNALS<a name="auto4"/></h2>
160 <p>A running twistd accepts SIGINT for a clean shutdown and SIGUSR1 to rotate log
164 <h2>AUTHOR<a name="auto5"/></h2>
166 <p>Written by Moshe Zadka, based on twistd's help messages.
169 <h2>REPORTING BUGS<a name="auto6"/></h2>
171 <p>To report a bug, visit
172 <em>http://twistedmatrix.com/trac/wiki/TwistedDevelopment#DevelopmentProcess</em>
175 <h2>COPYRIGHT<a name="auto7"/></h2>
177 <p>Copyright © 2001-2011 Twisted Matrix Laboratories.
178 This is free software; see the source for copying conditions. There is NO
179 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
184 <p><a href="../howto/index.html">Index</a></p>
185 <span class="version">Version: 12.1.0</span>