XINETD(8)

๐Ÿ’– XINETD(8) ๐Ÿ’–

okay bestie, gather round, because today we're talking about xinetd โ€” the extended Internet services daemon โ€” and she's from the System Manager's Manual, so you know she's got lore. ๐ŸŽ€


โœจ NAME โœจ

xinetd โ€” the extended Internet services daemon ๐Ÿฆ‹


โœจ SYNOPSIS โœจ

xinetd [options]

โœจ DESCRIPTION โœจ

okay so first things first: xinetd does the exact same job as inetd โ€” it starts up programs that provide Internet services. ๐ŸŒธ

but here's the glow-up. instead of having all those servers started at system initialization time and just sitting there dormant like ๐Ÿ’€ until a connection request rolls in, xinetd is the only daemon process started, and she listens on all the service ports for the services listed in her configuration file. the second a request comes in, she starts the appropriate server. and because of the way she operates, xinetd (and inetd too, fr) also gets called a super-server. ๐Ÿ‘‘

now, the services in xinetd's config file split into two groups, and this part is important so pay attention:

  • the first group โ€” these are called multi-threaded services, and they require forking a brand new server process for every single new connection request. that new server then handles that connection. for these services, xinetd keeps on listening for new requests so she can spawn more servers. ๐Ÿงš
  • the second group โ€” these are services where the service daemon itself is responsible for handling all the new connection requests. these are called single-threaded, and xinetd will stop handling new requests for them until the server dies. services in this group are usually datagram-based.

so like, up until now the only reason a super-server even existed was to conserve system resources by not forking a whole bunch of processes that might be dormant for basically their entire lifetime. ๐Ÿ˜ด and while xinetd is fulfilling that function, she's also taking advantage of the whole super-server concept to give you features like access control and logging. plus โ€” and this is the iconic part โ€” xinetd is not limited to services listed in /etc/services. so literally anybody can use xinetd to start special-purpose servers. periodt. ๐Ÿ’…


โœจ OPTIONS โœจ

  • -d โ€” enables debug mode. this produces a lot of debugging output, and it makes it possible to use a debugger on xinetd. ๐Ÿ›
  • -syslog syslog_facility โ€” this one turns on syslog logging of xinetd-produced messages using the syslog facility you specify. these facility names are supported: daemon, auth, user, local[0-7] (go check syslog.conf(5) for what they mean). this option is ineffective in debug mode since all the relevant messages get sent to the terminal instead.
  • -filelog logfile โ€” xinetd-produced messages go into the file you specify. messages are always appended to the file, and if the file doesn't exist yet, it gets created. this option is ineffective in debug mode since all the relevant messages get sent to the terminal instead.
  • -f config_file โ€” determines the file xinetd uses for configuration. the default is /etc/xinetd.conf. ๐Ÿ—‚๏ธ
  • -pidfile pid_file โ€” the process ID gets written to the file. this option is ineffective in debug mode.
  • -dontfork โ€” tells xinetd to stay in the foreground rather than detaching herself, so she can support being run from init or daemontools. this option automatically sets -stayalive (see below).
  • -stayalive โ€” tells xinetd to stay running even if no services are specified.
  • -limit proc_limit โ€” places a limit on the number of concurrently running processes that xinetd can start. her whole purpose here is to prevent process table overflows. ๐Ÿ›‘
  • -logprocs limit โ€” places a limit on the number of concurrently running servers for remote userid acquisition.
  • -version โ€” causes xinetd to print out her version information. ๐Ÿ“ข
  • -inetd_compat โ€” causes xinetd to read /etc/inetd.conf in addition to the standard xinetd config files. /etc/inetd.conf is read after the standard xinetd config files. ๐Ÿซถ
  • -cc interval โ€” instructs xinetd to perform periodic consistency checks on her internal state every interval seconds. โฐ
k so heads up: the syslog and filelog options are mutually exclusive. if you don't specify either one, the default is syslog using the daemon facility. and pls don't confuse xinetd messages with messages related to service logging โ€” those latter ones only get logged if it's specified via the configuration file. ๐Ÿ’€

โœจ CONTROLLING XINETD โœจ

xinetd performs certain actions when she receives certain signals. the actions tied to specific signals can be redefined by editing config.h and recompiling. ๐Ÿ”ง

  • SIGHUP โ€” causes a hard reconfiguration, which means xinetd re-reads the configuration file and terminates the servers for services that are no longer available. access control is performed again on running servers by checking the remote location, access times and server instances. if the number of server instances is lowered, some arbitrarily picked servers will be killed to satisfy the limit; this happens after any servers are terminated because of failing the remote location or access time checks. also, if the INTERCEPT flag was clear and is now set, any running servers for that service will be terminated; the purpose of this is to ensure that after a hard reconfiguration there will be no running servers that can accept packets from addresses that don't meet the access control criteria. ๐Ÿ˜ค
  • SIGQUIT โ€” causes program termination.
  • SIGTERM โ€” terminates all running servers before terminating xinetd.
  • SIGUSR1 โ€” causes an internal state dump (the default dump file is /var/run/xinetd.dump; to change the filename, edit config.h and recompile). ๐Ÿ—‘๏ธ
  • SIGABRT โ€” causes an internal consistency check to verify that the data structures the program uses haven't been corrupted. when the check is done, xinetd generates a message saying whether the check was successful or not. โœ…

on reconfiguration the log files are closed and reopened. this lets you remove old log files. ๐ŸŽ€


โœจ FILES โœจ

  • /etc/xinetd.conf โ€” default configuration file
  • /var/run/xinetd.dump โ€” default dump file

โœจ ENVIRONMENT โœจ

  • REMOTE_HOST โ€” contains the IP address of the client. ๐ŸŒ

โœจ SEE ALSO โœจ


โœจ AUTHOR โœจ

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


โœจ PRONUNCIATION โœจ

zy-net-d ๐Ÿ—ฃ๏ธ (yes bestie, that's how you say it, no cap)


and that's the whole page!! this one came from the System Manager's Manual, dated 14 June 2001 โ€” so she's a lil vintage icon and we love her for it. ๐Ÿ’–โœจ bye bestie, go configure something iconic ๐Ÿฆ‹