1XINETD(8)                   System Manager's Manual                  XINETD(8)
2
3
4

NAME

6       xinetd - the extended Internet services daemon
7

SYNOPSIS

9       xinetd [options]
10

DESCRIPTION

12       xinetd  performs  the  same  function as inetd: it starts programs that
13       provide Internet services.  Instead of having such servers  started  at
14       system  initialization  time, and be dormant until a connection request
15       arrives, xinetd is the only daemon process started and  it  listens  on
16       all  service  ports  for the services listed in its configuration file.
17       When a request comes in, xinetd starts the appropriate server.  Because
18       of  the  way it operates, xinetd (as well as inetd) is also referred to
19       as a super-server.
20
21       The services listed in xinetd's configuration  file  can  be  separated
22       into two groups.  Services in the first group are called multi-threaded
23       and they require the forking of a new server process for each new  con‐
24       nection  request.   The  new  server then handles that connection.  For
25       such services, xinetd keeps listening for new requests so that  it  can
26       spawn  new  servers.  On the other hand, the second group includes ser‐
27       vices for which the service daemon is responsible for handling all  new
28       connection  requests.   Such  services  are  called single-threaded and
29       xinetd will stop handling new requests for them until the server  dies.
30       Services in this group are usually datagram-based.
31
32       So far, the only reason for the existence of a super-server was to con‐
33       serve system resources by avoiding to fork a  lot  of  processes  which
34       might  be  dormant  for  most of their lifetime.  While fulfilling this
35       function, xinetd takes advantage of the idea of a super-server to  pro‐
36       vide  features such as access control and logging.  Furthermore, xinetd
37       is not limited to services listed in /etc/services.  Therefore, anybody
38       can use xinetd to start special-purpose servers.
39
40       BEWARE of xinetd reload termination handling.  For services with type =
41       INTERNAL, SIGTERM signal will be sent.  For  services  without  type  =
42       INTERNAL, SIGKILL signall will be sent.  Take this into an account when
43       dealing with proper handling of the SIGTERM and SIGKILL.  It is  impor‐
44       tant  to  be  aware of this as your xinetd service could be killed on a
45       xinetd reload.
46

OPTIONS

48       -d     Enables debug mode. This produces a lot of debugging output, and
49              it makes it possible to use a debugger on xinetd.
50
51       -syslog syslog_facility
52              This  option  enables syslog logging of xinetd-produced messages
53              using the specified syslog  facility.   The  following  facility
54              names  are supported: daemon, auth, user, local[0-7] (check sys‐
55              log.conf(5) for their meanings).  This option is ineffective  in
56              debug mode since all relevant messages are sent to the terminal.
57
58       -filelog logfile
59              xinetd-produced  messages  will be placed in the specified file.
60              Messages are always appended to the file.  If the file does  not
61              exist,  it will be created.  This option is ineffective in debug
62              mode since all relevant messages are sent to the terminal.
63
64       -f config_file
65              Determines the file that  xinetd  uses  for  configuration.  The
66              default is /etc/xinetd.conf.
67
68       -pidfile pid_file
69              The  process  ID is written to the file. This option is ineffec‐
70              tive in debug mode.
71
72       -dontfork
73              Tells xinetd to stay in the  foreground  rather  than  detaching
74              itself,  to  support  being  run  from init or daemontools. This
75              option automatically sets -stayalive (see below).
76
77       -stayalive
78              Tells xinetd to stay running even if no services are specified.
79
80       -limit proc_limit
81              This option places a limit on the number of concurrently running
82              processes that can be started by xinetd.  Its purpose is to pre‐
83              vent process table overflows.
84
85       -logprocs limit
86              This option places a limit on the number of concurrently running
87              servers for remote userid acquisition.
88
89       -version
90              This option causes xinetd to print out its version information.
91
92       -inetd_compat
93              This option causes xinetd to read /etc/inetd.conf in addition to
94              the standard xinetd config files.  /etc/inetd.conf is read after
95              the standard xinetd config files.
96
97       -cc interval
98              This  option  instructs  xinetd  to perform periodic consistency
99              checks on its internal state every interval seconds.
100
101       The syslog and filelog options are  mutually  exclusive.   If  none  is
102       specified, the default is syslog using the daemon facility.  You should
103       not confuse xinetd messages with messages related to  service  logging.
104       The  latter  are logged only if this is specified via the configuration
105       file.
106

CONTROLLING XINETD

108       xinetd performs certain actions when it receives certain signals.   The
109       actions  associated with the specific signals can be redefined by edit‐
110       ing config.h and recompiling.
111
112       SIGHUP         causes a hard reconfiguration, which means  that  xinetd
113                      re-reads  the  configuration  file  and  terminates  the
114                      servers for  services  that  are  no  longer  available.
115                      Access  control is performed again on running servers by
116                      checking the remote location, access  times  and  server
117                      instances. If the number of server instances is lowered,
118                      some arbitrarily picked servers will be killed  to  sat‐
119                      isfy  the  limit; this will happen after any servers are
120                      terminated because of failing  the  remote  location  or
121                      access  time  checks.   Also,  if the INTERCEPT flag was
122                      clear and is set, any running servers for  that  service
123                      will  be  terminated;  the  purpose of this is to ensure
124                      that after a hard reconfiguration there will be no  run‐
125                      ning servers that can accept packets from addresses that
126                      do not meet the access control criteria.
127
128       SIGQUIT        causes program termination.
129
130       SIGTERM        terminates  all  running  servers   before   terminating
131                      xinetd.
132
133       SIGUSR1        causes  an internal state dump (the default dump file is
134                      /var/run/xinetd.dump; to change the filename, edit  con‐
135                      fig.h and recompile).
136
137       SIGIOT         causes  an internal consistency check to verify that the
138                      data structures used by the program have not  been  cor‐
139                      rupted.   When the check is completed xinetd will gener‐
140                      ate a message that says if the check was  successful  or
141                      not.
142
143       On  reconfiguration  the log files are closed and reopened. This allows
144       removal of old log files.
145

FILES

147       /etc/xinetd.conf    default configuration file
148       /var/run/xinetd.dump
149                           default dump file
150

SEE ALSO

152       inetd(8),
153
154       xinetd.conf(5),
155
156       xinetd.log(5)
157
158       http://cr.yp.to/daemontools.html
159

AUTHOR

161       Panos Tsirigotis, CS Dept, University of Colorado, Boulder Rob Braun
162

PRONUNCIATION

164       zy-net-d
165
166
167
168
169                                 14 June 2001                        XINETD(8)
Impressum