update NEWS
[manpages-zh.git] / raw / man8 / xinetd.8
blob9c5eb9d2fe08eed7f869ac2ef0bfdf659150fe45
1 .\"(c) Copyright 1992 by Panagiotis Tsirigotis
2 .\"(c) Sections Copyright 1998-2001 by Rob Braun
3 .\"All rights reserved.  The file named COPYRIGHT specifies the terms 
4 .\"and conditions for redistribution.
5 .\"
6 .TH XINETD 8 "14 June 2001"
7 .\" *************************** NAME *********************************
8 .SH NAME
9 xinetd \- the extended Internet services daemon
10 .\" *************************** SYNOPSIS *********************************
11 .SH SYNOPSIS
12 .B xinetd
13 [\fIoptions\fP]
14 .\" *************************** DESCRIPTION *********************************
15 .SH DESCRIPTION
16 \fBxinetd\fP performs the same function as \fBinetd\fP: it starts
17 programs that provide Internet services.  Instead of having such
18 servers started at system initialization time, and be dormant until a
19 connection request arrives, \fBxinetd\fP is the only daemon process
20 started and it listens on all service ports for the services listed in
21 its configuration file. When a request comes in, \fBxinetd\fP starts
22 the appropriate server.  Because of the way it operates, \fBxinetd\fP
23 (as well as \fBinetd\fP) is also referred to as a super-server.
24 .LP
25 The services listed in \fBxinetd\fP's configuration file can be
26 separated into two groups.  Services in the first group are called
27 .I "multi-threaded"
28 and they require the forking of a new server process for each new
29 connection request.  The new server then handles that connection.  For
30 such services, \fBxinetd\fP keeps listening for new requests so that it
31 can spawn new servers.  On the other hand, the second group includes
32 services for which the service daemon is responsible for handling all
33 new connection requests.  Such services are called
34 .I "single-threaded"
35 and \fBxinetd\fP will stop handling new requests for them until the
36 server dies.  Services in this group are usually datagram-based.
37 .LP
38 So far, the only reason for the existence of a super-server was to
39 conserve system resources by avoiding to fork a lot of processes which
40 might be dormant for most of their lifetime.  While fulfilling this
41 function, \fBxinetd\fP takes advantage of the idea of a super-server to
42 provide features such as access control and logging.  Furthermore,
43 \fBxinetd\fP is not limited to services listed in
44 .I /etc/services.
45 Therefore, anybody can use \fBxinetd\fP to start special-purpose
46 servers.
47 .\" *************************** OPTIONS *********************************
48 .SH OPTIONS
49 .TP
50 .BR \-d
51 Enables debug mode. This produces a lot of debugging output, and it
52 makes it possible to use a debugger on \fBxinetd\fP.
53 .TP
54 .BI \-syslog " syslog_facility"
55 This option enables syslog logging of \fBxinetd\fP-produced messages
56 using the specified syslog facility.
57 The following facility names are supported:
58 .I daemon,
59 .I auth,
60 .I user,
61 .I "local[0-7]"
62 (check \fIsyslog.conf(5)\fP for their meanings).
63 This option is ineffective in debug mode since all relevant messages are sent
64 to the terminal.
65 .TP
66 .BI \-filelog " logfile"
67 \fBxinetd\fP-produced messages will be placed in the specified file.
68 Messages are always appended to the file.
69 If the file does not exist, it will be created.
70 This option is ineffective in debug mode since all relevant messages are sent
71 to the terminal.
72 .TP
73 .BI \-f " config_file"
74 Determines the file that \fBxinetd\fP uses for configuration. The
75 default is \fI/etc/xinetd.conf\fP.
76 .TP
77 .BR \-pidfile " pid_file"
78 .br
79 The process ID is written to the file. This option is ineffective in debug mode. 
80 .TP
81 .BI \-dontfork 
82 Tells xinetd to stay in the foreground rather than detaching itself, to
83 support being run from init or daemontools. This option automatically sets 
84 .B \-stayalive
85 (see below).
86 .TP
87 .BI \-stayalive 
88 Tells xinetd to stay running even if no services are specified.
89 .TP
90 .BI \-limit " proc_limit"
91 This option places a limit on the number of concurrently running processes
92 that can be started by
93 .B xinetd.
94 Its purpose is to prevent process table overflows.
95 .TP
96 .BI \-logprocs " limit"
97 This option places a limit on the number of concurrently running servers
98 for remote userid acquisition.
99 .TP
100 .BI \-version
101 This option causes xinetd to print out its version information.
103 .BI \-inetd_compat
104 This option causes xinetd to read /etc/inetd.conf in addition to the
105 standard xinetd config files.  /etc/inetd.conf is read after the
106 standard xinetd config files.
108 .BI \-cc " interval"
109 This option instructs
110 .B xinetd
111 to perform periodic consistency checks on its internal state every
112 .I interval
113 seconds.
115 The \fIsyslog\fP and \fIfilelog\fP options are mutually exclusive.
116 If none is specified, the default is syslog using the
117 .I daemon
118 facility.
119 You should not confuse \fBxinetd\fP messages with messages related to
120 service logging. The latter are logged only if this is specified
121 via the configuration file.
122 .\" *********************** CONTROLLING XINETD ****************************
123 .SH "CONTROLLING XINETD"
125 \fBxinetd\fP performs certain actions when it receives certain signals.
126 The actions associated with the specific signals can be redefined
127 by editing \fIconfig.h\fP and recompiling.
128 .TP 15
129 .B SIGHUP
130 causes a hard reconfiguration, which means that \fBxinetd\fP re-reads 
131 the configuration file and terminates the servers for services that 
132 are no longer available. Access control is performed again on 
133 running servers by checking the remote location, access times and 
134 server instances. If the number of server instances is lowered, some 
135 arbitrarily picked servers will be killed to satisfy the limit; this 
136 will happen \fIafter\fP any servers are terminated because of failing 
137 the remote location or access time checks.
138 Also, if the
139 .B INTERCEPT
140 flag was clear and is set, any running servers for that service will
141 be terminated;
142 \fIthe purpose of this is to ensure that after a hard reconfiguration
143 there will be no running servers that can accept packets from addresses
144 that do not meet the access control criteria\fP.
146 .B SIGQUIT
147 causes program termination.
149 .B SIGTERM
150 terminates all running servers before terminating \fBxinetd\fP.
152 .B SIGUSR1
153 causes an internal state dump (the default dump file is
154 \fI/var/run/xinetd.dump\fP;
155 to change the filename, edit \fIconfig.h\fP and recompile).
157 .B SIGIOT
158 causes an internal consistency check to verify that the data structures
159 used by the program have not been corrupted.
160 When the check is completed
161 .B xinetd
162 will generate a message that says if the check was successful or not.
164 On reconfiguration the log files are closed and reopened. This allows
165 removal of old log files.
166 .\" *********************** FILES ****************************
167 .SH FILES
169 .PD .1v
170 .TP 20
171 .B /etc/xinetd.conf
172 default configuration file
174 .B /var/run/xinetd.dump
175 default dump file
177 .\" *********************** SEE ALSO ****************************
178 .SH "SEE ALSO"
179 .I "inetd(8),"
181 .I "xinetd.conf(5),"
183 .I "xinetd.log(5)"
185 .I "http://cr.yp.to/daemontools.html"
186 .\" *********************** AUTHOR ****************************
187 .SH AUTHOR
188 Panos Tsirigotis, CS Dept, University of Colorado, Boulder
189 Rob Braun
190 .\" *********************** PRONUNCIATION ****************************
191 .SH PRONUNCIATION
192 zy-net-d