📄 ctlinnd.8
字号:
.\" $Revision: 1.30 $.TH CTLINND 8.SH NAMEctlinnd \- control the InterNetNews daemon.SH SYNOPSIS.B ctlinnd[.B \-h][.B \-s][.BI \-t " timeout"].I command[.I argument...].SH DESCRIPTION.I Ctlinndsends a message to the control channel of.IR innd (8),the InterNetNews server..PPIn the normal mode of behavior, the message is sent to the server, whichthen performs the requested action and sends back a reply with a textmessage and the exit code for.IR ctlinnd .If the server successfully performed the command,.I ctlinndwill exit with a status of zero and print the reply on standard output.If the server could not perform the command (for example, it was told toremove a newsgroup that does not exist), it will direct.I ctlinndto exit with a status of one.The ``shutdown,'' ``xabort,'' and ``xexec'' commands do not generate a reply;.I ctlinndwill always exit silently with a status of zero.If the ``\-s'' flag isused, then no message will be printed if the command was successful..PPThe ``\-t'' flag can be used to specify how long to wait for the replyfrom the server.The timeout value specifies the number of seconds to wait.A value of zero waits forever, and a value lessthan zero indicates that no reply is needed.When waiting for a reply,.I ctlinndwill try every two minutes to see if the server is still running, so itis unlikely that ``\-t0'' will hang..\" =()<The default is ``\-t@<CTLINND_TIMEOUT>@.''>()=The default is ``\-t0.''.PPTo see a command summary, use the ``\-h'' flag.If a command is included when.I ctlinndis invoked with the ``\-h'' flag, then only the usage for that commandwill be given..PPIf a large number of groups are going to be created or deleted at once,it may be more efficient to ``pause'' or ``throttle'' the serverand edit the.I activefile directly..PPThe complete list of commands follows.Note that all commands have a fixed number of arguments.If a parameter can be an empty string, then it is necessary tospecify it as two adjacent quotes, like ""..TP.BI addhist " <Message-ID> arr exp post paths"Add an entry to the history database.This directs the server to create a history line for.IR Message-ID .The angle brackets are optional..IR Arr ,.IR exp ,and.I postspecify when the article arrived, what its expiration date is, andwhen it was posted.All three values are a number indicating the number of seconds since theepoch.If the article does not have an Expires header, then.I expshould be zero..I Pathsis the pathname within the news spool directory where the article is filed.If the article is cross-posted, then the names should be separated bywhitespace and the.I pathsargument should be inside double quotes.If the server is paused or throttled, this command causes it to brieflyopen the history database..TP.BI allow " reason"Remote connections are allowed.The.I reasonmust be the same text given with an earlier ``reject'' command, or anempty string..TP.BI begin " site"Begin feeding.IR site .This will cause the server to rescan the.IR newsfeeds (5)file to find the specified site and set up a newsfeed for it.If the site already exists, a ``drop'' is done first.This command is forwarded; see below..TP.BI cancel " <Message-ID>"Remove the article with the specified Message-ID from the local system.This does.I notgenerate a cancel message.The angle brackets are optional.If the server is paused or throttled, this command causes it to brieflyopen the history database..TP.BI changegroup " group rest"The newsgroup.I groupis changed so that its fourth field in the.I activefile becomes the value specified by the.I restparameter.This may be used to make an existing group moderated or unmoderated,for example..TP.B checkfileCheck the syntax of the.I newsfeedsfile, and display a message if any errors are found.The details of the errors are reported to.IR syslog (3)..TP.BI drop " site"Flush and drop.I sitefrom the server's list of active feeds.This command is forwarded; see below..TP.BI flush " site"Flush the buffer for the specified site.The actions taken depend on the type of feed the site receives; see.IR newsfeeds (5).This is useful when the site is fed by a file and batching is going to start.If.I siteis an empty string, then all sites are flushed and the.I activefile and history databases are also written out.This command is forwarded; see below..TP.B flushlogsClose the log and error log files and rename them to have a.I \&.oldextension.The history database and.I activefile are also written out..TP.BI go " reason"Re-open the history database and start accepting articles after a ``pause''or ``throttle'' command.The.I reasonmust either be an empty string or match the text that was givenin the earlier ``pause'' or ``throttle'' command.If a ``reject'' command was done, this will also do an ``allow'' commandif the.I reasonmatches the text that was given in the ``reject.''If a ``reserve'' command was done, this will also clear the reservation ifthe.I reasonmatches the text that was given in the ``reserve.''Note that if only the history database has changed while the server ispaused or throttled, it is not necessary to send it a ``reload'' commandbefore sending it a ``go'' command.If the server throttled itself because it accumulated too many I/Oerrors, this command will reset the error count.If the server was not started with the ``\-ny'' flag, then this command alsodoes a ``readers'' command with ``yes'' as the flag and.I reasonas the text..TP.BI hangup " channel"Close the socket on the specified incoming channel.This is useful when an incoming connection appears to be hung..TP.BI help " [command]"Print a command summary for all commands, or just.I commandif specified..TP.BI modePrint the server's operating mode as a multi-line summary of the parametersand operating state..TP.BI name " nnn"Print the name of channel number.I nnnor of all channels if it is an empty string..TP.BI newgroup " group rest creator"Create the specified newsgroup.The.I restparameter should be the fourth field as described in.IR active (5);if it is not an equal sign, only the first letter is used.The.I creatorshould be the name of the person creating the group.If the newsgroup already exists, this is equivalent to the ``changegroup''command.This is the only command that has defaults.The.I creatorcan be omitted and will default to the empty string, and the.I restparameter can be omitted and will default to ``y''.This command can be done while the server is paused or throttled; it willupdate its internal state when a ``go'' command is sent.This command updates the.I active.times(see.IR active (5))file..TP.BI param " letter value"Change the command-line parameters of the server.The combination of defaults make it possible to use the text of the Controlheader directly..I Letteris the.I inndcommand-line option to set, and.I valueis the new value.For example, ``i 5'' directs the server to allow only five incomingconnections.To enable or disable the action of the ``\-n'' flag, use the letter ``y''or ``n'', respectively, for the.IR value..TP.BI pause " reason"Pause the server so that no incoming articles are accepted.No existing connections are closed, but the history database is closed.This command should be used for short-term locks, such as when replacingthe history files.If the server was not started with the ``\-ny'' flag, then this command alsodoes a ``readers'' command with ``no'' as the flag and.I reasonas the text..TP.BI readers " flag text"Allow or disallow newsreaders.If.I flagstarts with the letter ``n'' then newsreading is disallowed, bycausing the server to pass the.I textas the value of the.IR nnrpd (8)\&``\-r'' flag.If.I flagstarts with the letter ``y'' and.I textis either an empty string, or the same string that was used when newsreadingwas disallowed, then newsreading will be allowed..\".TP.\".BI refile " path group".\"The article specified by.\".I path.\"is refiled as if it were posted to the newsgroup.\".IR group ..TP.BI reject " reason"Remote connections (those that would not be handed off to.IR nnrpd )are rejected, with.I reasongiven as the explanation..TP.BI reload " what reason"The server updates its in-memory copies of various configuration files..I Whatidentifies what should be reloaded.If it is an empty string or the word ``all'' then everything is reloaded;if it is the word ``history'' then the history database is closed and opened,if it is the word ``hosts.nntp'' then the.IR hosts.nntp (5)file is reloaded; if it is the word ``active'' or ``newsfeeds'' then boththe.I activeand.I newsfeedsfiles are reloaded; if it is the word ``overview.fmt'' then the.IR overview.fmt (5)file is reloaded.The.I reasonis reported to.IR syslog .There is no way to reload the data.IR inn.conf (5)file; the server currently only uses the ``pathhost'' parameter, so thisrestriction should not be a problem..TP.BI renumber " group"Scan the spool directory for the specified newsgroup and update thelow-water mark in the.I activefile.If.I groupis an empty string then all newsgroups are scanned..TP.BI reserve " reason"The next ``pause'' or ``throttle'' command must use.I reasonas its text.This ``reservation'' is cleared by giving an empty string for the.IR reason .This command is used by programs like.IR expire (8)that want to avoid running into other instances of each other..TP.BI rmgroup " group"Remove the specified newsgroup.This is done by editing the.I activefile.The spool directory is not touched, and any articles in the group willbe expired using the default expiration parameters.Unlike the ``newgroup'' command, this command does not update the.I active.timesfile..TP.BI send " feed text..."The specified.I textis sent as a control line to the exploder.IR feed ..TP.BI shutdown " reason"The server is shut down, with the specified reason recorded in the logand sent to all open connections.It is a good idea to send a ``throttle'' command first..TP.BI signal " sig site"Signal.I sigis sent to the specified.IR site ,which must be a channel or exploder feed..I Sigcan be a numeric signal number or the word ``hup,'' ``int,'' or ``term'';case is not significant..TP.BI throttle " reason"Input is throttled so that all existing connections are closed and newconnections are rejected.The history database is closed.This should be used for long-term locks, such as when.I expireis being run.If the server was not started with the ``\-ny'' flag, then this command alsodoes a ``readers'' command with ``no'' as the flag and.I reasonas the text..TP.BI trace " item flag"Tracing is turned on or off for the specified.IR item ..I Flagshould start with the letter ``y'' or ``n'' to turn tracing on or off.If.I itemstarts is a number, then tracing is set for the specified.I inndchannel, which must be for an incoming NNTP feed.If it starts with the letter ``i'' then general.I inndtracing is turned on or off.If it starts with the letter ``n'' then future.IR nnrpd 'swill or will not have the ``\-t'' flag enabled, as appropriate..TP.BI xabort " reason"The server logs the specified.I reasonand then invokes the.IR abort (3)routine..TP.BI xexec " path"The server gets ready to shut itself down, but instead of exiting itexecs the specified.I pathwith all of its original arguments.If.I pathis ``innd'' then.\" =()<.I @<_PATH_INND>@>()=.I /usr/contrib/news/inndis invoked; if it is ``inndstart'' then.\" =()<.I @<_PATH_INNDSTART>@>()=.I /usr/contrib/news/inndstartis invoked; if it is an empty string, it will invoke the appropriate programdepending on whether or not it was started with the ``\-p'' flag;any other value is an error..PPIn addition to being acted upon within the server, certain commands canbe forwarded to the appropriate child process.If the site receiving the command is an exploder (such as.IR buffchan (8))or it is a funnel that feeds into an exploder, then thecommand can be forwarded.In this case, the server will send a command line to the exploder thatconsists of the.I ctlinndcommand name.If the site funnels into an exploder that has an asterisk (``*'') in its ``W''flag (see.IR newsfweed (5)),then the site name will be appended to the command; otherwise no argumentis appended..SH BUGS.I Ctlinnduses the.IR inndcomm (3)library, and is therefore limited to server replies no larger than 4k..SH HISTORYWritten by Rich $alz <rsalz@uunet.uu.net> for InterNetNews..de R$This is revision \\$3, dated \\$4....R$ $Id: ctlinnd.8,v 1.30 1993/03/18 21:03:34 rsalz Exp $.SH "SEE ALSO"active(5),expire(8),innd(8),inndcomm(3),inn.conf(5),newsfeeds(5),overview.fmt(5).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -