Imported Upstream version 12.1.0
[contrib/python-twisted.git] / doc / core / man / twistd.1
1 .TH TWISTD "1" "Dec 2011" "" ""
2 .SH NAME
3 twistd \- run Twisted applications (TACs, TAPs)
4 .SH SYNOPSIS
5 .B twistd
6 [options]
7 .SH DESCRIPTION
8 Read a twisted.application.service.Application out of a file and run it.
9 .SH OPTIONS
10 \fB\-n\fR, \fB\--nodaemon\fR
11 Don't daemonize (stay in foreground).
12 .TP
13 \fB\-q\fR, \fB\--quiet\fR
14 No-op for backwards compatibility.
15 .TP
16 \fB\-p\fR, \fB\--profile\fR \fI<profile output>\fR
17 Run the application under the profiler, dumping results to the specified file.
18 .TP
19 \fB\--profiler\fR \fI<profiler name>\fR
20 Specify the profiler to use. Defaults to the 'hotshot' profiler.
21 .TP
22 \fB--savestats\fR
23 Save the Stats object rather than the text output of the profiler.
24 .TP
25 \fB\-b\fR, \fB\--debug\fR
26 Run the application in the Python Debugger (implies \fB\--nodaemon\fR option).
27 Sending a SIGINT or SIGUSR2 signal to the process will drop it into the
28 debugger.
29 .TP
30 \fB\-e\fR, \fB\--encrypted\fR \fI<file>\fR
31 The specified tap/aos file is encrypted.
32 .TP
33 \fB--euid\fR
34 Set only effective user-id rather than real user-id. This option has no  
35 effect unless the server is running as root, in which case it means not  
36 to shed all privileges after binding ports, retaining the option to regain 
37 privileges in cases such as spawning processes. Use with caution. 
38 .TP
39 \fB\-o\fR, \fB\--no_save\fR
40 Do not save shutdown state.
41 .TP
42 \fB\--originalname\fR
43 Behave as though the specified Application has no process name set, and run
44 with the standard process name (the Python binary in most cases).
45 .TP
46 \fB\-l\fR, \fB\--logfile\fR \fI<logfile>\fR
47 Log to a specified file, - for stdout (default: twistd.log).
48 The log file will be rotated on SIGUSR1.
49 .TP
50 \fB\-l\fR, \fB\--logger\fR \fI<fully qualified python name>\fR
51 A fully-qualified name to a log observer factory to use for the initial log
52 observer. Takes precedence over --logfile and --syslog.
53 .TP
54 \fB\--pidfile\fR \fI<pidfile>\fR
55 Save pid in specified file (default: twistd.pid).
56 .TP
57 \fB\--chroot\fR \fI<directory>\fR
58 Chroot to a supplied directory before running (default: don't chroot).
59 Chrooting is done before changing the current directory.
60 .TP
61 \fB\-d\fR, \fB\--rundir\fR \fI<directory>\fR
62 Change to a supplied directory before running (default: .).
63 .TP
64 \fB\-u\fR, \fB\--uid\fR \fI<uid>\fR
65 The uid to run as (default: don't change).
66 .TP
67 \fB\-g\fR, \fB\--gid\fR \fI<gid>\fR
68 The gid to run as (default: don't change).
69 .TP
70 \fB--umask\fR \fI<mask>\fR
71 The (octal) file creation mask to apply. (default: 0077 for daemons, no
72 change otherwise).
73 .TP
74 \fB\-r\fR, \fB\--reactor\fR \fI<reactor>\fR
75 Choose which reactor to use. See \fB\--help-reactors\fR for a list of
76 possibilities.
77 .TP
78 \fB--help-reactors\fR
79 List the names of possibly available reactors.
80 .TP
81 \fB\--spew\fR
82 Write an extremely verbose log of everything that happens. Useful for
83 debugging freezes or locks in complex code.
84 .TP
85 \fB\-f\fR, \fB\--file\fR \fI<tap file>\fR
86 Read the given .tap file (default: twistd.tap).
87 .TP
88 \fB\-s\fR, \fB\--source\fR \fI<tas file>\fR
89 Load an Application from the given .tas (AOT Python source) file.
90 .TP
91 \fB\-y\fR, \fB\--python\fR \fI<python file>\fR
92 Use the variable "application" from the given Python file. This option overrides
93 \fB\-f\fR. This option implies \fB\--no_save\fR.
94 .TP
95 \fB\--syslog\fR
96 Log to syslog instead of a file.
97 .TP
98 \fB\--version\fR
99 Print version information and exit.
100 .TP
101 \fB\--prefix\fR \fI<prefix>\fR
102 Use the specified prefix when logging to logfile. Default is "twisted".
103 .PP
104 Note that if \fBtwistd\fR is run as root, the working directory is \fInot\fR
105 searched for Python modules.
106 .SH SIGNALS
107 A running twistd accepts SIGINT for a clean shutdown and SIGUSR1 to rotate log
108 files.
109 .SH AUTHOR
110 Written by Moshe Zadka, based on twistd's help messages.
111 .SH "REPORTING BUGS"
112 To report a bug, visit
113 \fIhttp://twistedmatrix.com/trac/wiki/TwistedDevelopment#DevelopmentProcess\fR
114 .SH COPYRIGHT
115 Copyright \(co 2001-2011 Twisted Matrix Laboratories.
116 .br
117 This is free software; see the source for copying conditions. There is NO
118 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.