xinetd 中文man页面

系统
xinetd 执行与 inetd 相同的任务:它启动提供互联网服务的程序。与在系统初始化时启动这些服务器,让它们保持休眠,直到有连接请求到达才提供服务这种做法不同, fBxinetd 是唯一的被启动的守护进程,它侦听各种服务在它们各自的配置文件中列出的所有端口。当一个请求到达,xinetd 启动合适的服务器。因为它以这种方式操作,xinetd (还有 inetd) 常被称作超级服务器。

NAME

xinetd - 扩展的互联网服务守护进程  

总览 SYNOPSIS

xinetd [options]  

描述 DESCRIPTION

xinetd 执行与 inetd 相同的任务:它启动提供互联网服务的程序。与在系统初始化时启动这些服务器,让它们保持休眠,直到有连接请求到达才提供服务这种做法不同, fBxinetd 是唯一的被启动的守护进程,它侦听各种服务在它们各自的配置文件中列出的所有端口。当一个请求到达,xinetd 启动合适的服务器。因为它以这种方式操作,xinetd (还有 inetd) 常被称作超级服务器。

列在 xinetd 的配置文件中的服务可以分为两组。第一组的服务称为 多线程的 (multi-threaded) 并且它们需要为每个新的连接请求产生 (fork) 一个新的服务器进程。接下来新的服务器将处理那个连接。对于这些服务,xinetd 保持侦听新的请求从而可以孵化 (spawn) 新的服务器。另一方面,第二组包含着需要由服务器守护进程处理所有新的连接请求的服务。这些服务称为 单线程的 (single-threaded) 并且 xinetd 将停止为它们处理新的请求,直到这个服务器退出。这个组中的服务一般都是基于数据报的。

至今,超级服务器存在的唯一理由是通过避免大量产生生命周期中大部分时间可能都是空闲着的进程,从而节省系统资源。当实现这种功能时, fBxinetd 从超级服务器这种思想中获得了好处,可以提供访问控制和日志等特性。更进一步,xinetd 不仅限于侦听 /etc/services 中列出的服务。因此,任何人都可以使用 xinetd 来启动特殊用途的服务器。  

选项 OPTIONS

-d
启用调试模式。这样将产生大量调试输出,并且使得在 xinetd 上使用一个调试器成为可能。
-syslog syslog_facility
这个选项使得 syslog 使用指定的日志功能来记录 xinetd 产生的消息。可以使用下列功能: daemon, auth, user, local[0-7] (参见 syslog.conf(5) 来查看它们的意义)。这个选项在 debug 模式是无效的,因为所有的相关信息都将送到终端上。
-filelog logfile
xinetd 产生的信息将放到指定文件中。信息总是添加到文件之后。如果文件不存在,将会被创建。这个选项在 debug 模式无效,因为所有的相关信息都将送到终端上。
-f config_file
决定xinetd 用来配置的文件。默认设置是 /etc/xinetd.conf
-pidfile pid_file

进程 ID 被写入的文件。这个选项在 debug 模式无效。
-dontfork
指定xinetd 在前台运行,而不是分离自身以支持由 init 或 daemontools 运行。这个选项自动设置了 -stayalive (参见下面)。
-stayalive
指定xinetd 保持运行,即使没有指定服务。
-limit proc_limit
这个选项为 xinetd 可以启动的并行运行的进程数设置了一个上限。目的是防止进程表溢出。
-logprocs limit
这个选项为服务远程用户的并行运行的进程数设置了一个上限。
-version
这个选项使得 xinetd 打印出它的版本信息。
-inetd_compat
这个选项使得 xinetd 在标准的配置文件之外,附加地读取/etc/inetd.conf/etc/inetd.conf 的读取是在读取标准的配置文件之后。
-cc interval
这个选项指定 xinetdinterval 秒对内部状态进行一次定时的一致性检查。

syslogfilelog 选项是互相独立的。如果没有指定任何一个,默认将使用 syslog 的 daemon 功能。你不应将 xinetd 信息与和服务日志相关的信息相混淆。后者只有在配置文件中指定之后才会记录。  

控制 xinetd CONTROLLING XINETD

xinetd 收到一定的信号时会执行一定的动作。与特定信号相关联的特定动作可以通过修改 config.h 并且重新编译来重新定义。

SIGHUP
导致一个强制的重新配置,意味着 xinetd 重新读取配置文件,停止不再有效的服务的服务器。在正在运行的服务器上将刷新访问控制,检查远程位置,访问时间和服务器实例。如果允许的服务器实例数减少了,一些随机选取的服务器将会被杀掉来满足限制; 这将在任何服务器停止之后发生,因为不能通过远程位置或访问时间的检查(this will happen after any servers are terminated because of failing the remote location or access time checks)。还有,如果 INTERCEPT 标志被清除后又重新设置,此服务的任何运行中的服务器将被停止。这样做的目的是保证在强制的重新配置之后,没有那种接受从不遵循访问控制标准的地址发来的包的服务器在运行。 SIGQUIT
导致程序退出。
SIGTERM
xinetd 退出之前,停止所有运行中的服务器。
SIGUSR1
导致内部状态转储 (默认的转储文件是 /var/run/xinetd.dump;要改变文件名,修改 config.h 然后重新编译。)
SIGIOT
导致一个内部一致性检查来核对程序使用的数据结构没有崩溃。当检查结束时, xinetd 将产生一个消息,报告测试是成功了还是失败了。

重新配置的时候,日志文件被关闭又重新打开。这样做允许移除旧的日志文件。  

文件 FILES

/etc/xinetd.conf
默认的配置文件
/var/run/xinetd.dump
默认的转储文件

参见 SEE ALSO

inetd(8),

xinetd.conf(5),

xinetd.log(5)

http://cr.yp.to/daemontools.html  

#p#

NAME

xinetd - the extended Internet services daemon  

SYNOPSIS

xinetd [options]  

DESCRIPTION

xinetd performs the same function as inetd: it starts programs that provide Internet services. Instead of having such servers started at system initialization time, and be dormant until a connection request arrives, xinetd is the only daemon process started and it listens on all service ports for the services listed in its configuration file. When a request comes in, xinetd starts the appropriate server. Because of the way it operates, xinetd (as well as inetd) is also referred to as a super-server.

The services listed in xinetd's configuration file can be separated into two groups. Services in the first group are called multi-threaded and they require the forking of a new server process for each new connection request. The new server then handles that connection. For such services, xinetd keeps listening for new requests so that it can spawn new servers. On the other hand, the second group includes services for which the service daemon is responsible for handling all new connection requests. Such services 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 far, the only reason for the existence of a super-server was to conserve system resources by avoiding to fork a lot of processes which might be dormant for most of their lifetime. While fulfilling this function, xinetd takes advantage of the idea of a super-server to provide features such as access control and logging. Furthermore, xinetd is not limited to services listed in /etc/services. Therefore, anybody can use xinetd to start special-purpose servers.  

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 option enables syslog logging of xinetd-produced messages using the specified syslog facility. The following facility names are supported: daemon, auth, user, local[0-7] (check syslog.conf(5) for their meanings). This option is ineffective in debug mode since all relevant messages are sent to the terminal.
-filelog logfile
xinetd-produced messages will be placed in the specified file. Messages are always appended to the file. If the file does not exist, it will be created. This option is ineffective in debug mode since all relevant messages are sent to the terminal.
-f config_file
Determines the file that xinetd uses for configuration. The default is /etc/xinetd.conf.
-pidfile pid_file

The process ID is written to the file. This option is ineffective in debug mode.
-dontfork
Tells xinetd to stay in the foreground rather than detaching itself, to 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
This option places a limit on the number of concurrently running processes that can be started by xinetd. Its purpose is to prevent process table overflows.
-logprocs limit
This option places a limit on the number of concurrently running servers for remote userid acquisition.
-version
This option causes xinetd to print out its version information.
-inetd_compat
This option 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
This option instructs xinetd to perform periodic consistency checks on its internal state every interval seconds.

The syslog and filelog options are mutually exclusive. If none is specified, the default is syslog using the daemon facility. You should not confuse xinetd messages with messages related to service logging. The latter are logged only if this is specified via the configuration file.  

CONTROLLING XINETD

xinetd performs certain actions when it receives certain signals. The actions associated with the specific signals can be redefined by editing config.h and recompiling.

SIGHUP
causes a hard reconfiguration, which means that 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 will happen after any servers are terminated because of failing the remote location or access time checks. Also, if the INTERCEPT flag was clear and is 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 do not 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).
SIGIOT
causes an internal consistency check to verify that the data structures used by the program have not been corrupted. When the check is completed xinetd will generate a message that says if the check was successful or not.

On reconfiguration the log files are closed and reopened. This allows removal of old log files.  

FILES

/etc/xinetd.conf
default configuration file
/var/run/xinetd.dump
default dump file

SEE ALSO

inetd(8),

xinetd.conf(5),

xinetd.log(5)

http://cr.yp.to/daemontools.html  

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-15 10:21:09

man中文man

2011-08-24 16:48:36

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-11 15:03:21

ACCESS中文man

2011-08-16 10:59:16

pwconv中文man

2011-08-18 19:02:43

environ中文man

2011-08-25 17:43:07

snprintf中文man

2011-08-19 18:30:52

ipc中文man

2011-08-24 15:35:52

hier中文man

2011-08-25 17:18:07

putc中文man

2011-08-15 13:53:19

stat中文man

2011-08-16 10:10:58

setup中文man

2011-08-25 15:24:31

execlp中文man

2011-08-25 18:24:12

termios中文man

2011-08-15 18:06:07

restore中文man

2011-08-24 17:26:35

reindex中文man

2011-08-25 16:55:26

gets中文man

2011-08-15 15:45:04

xpdf中文man

2011-08-24 17:06:42

NOTIFY中文man
点赞
收藏

51CTO技术栈公众号