Changi NNTP Server 1.0

[ Bottom of Page | Previous Page | Next Page | Table of Contents ]

CHANCO.EXE
Command Line Options

Calling the program without parameters will display a usage help:
usage: chanco [options] <command>

commands:
  addhist id arr exp post path...  Add history line
  allow reason...                  Allow remote connections
  cancel id                        Cancel message locally
  changegroup group rest           Change mode of group
  drop site                        Stop feeding site
  flush site                       Flush feed for site*
  flushlogs                        Flush log files
  flushserver reason...            Flush history and active
  go reason...                     Restart after pause/throttle
  mode                             Print operating mode
  newgroup group rest creator      Create new group
  param letter value               Change command-line params
  pause reason...                  Short-term pause
  reject reason...                 Reject remote connections
  rmgroup group                    Remove named group
  shutdown reason...               Shut down server
  throttle reason...               Stop accepting articles
  xabort text...                   Abort the server
  oversync speed                   Update overview slow/normal/fast/stop
  hostentry index                  Print host by index
  userentry index                  Print user by index
  resource type                    Query memory/news/overview/history/sysload
  disconnect client                Kick out a host/user@host
  groupentry index                 Print group by index
  rejecting                        Print reject reason

options:
  -h<hostname>    host to control   (127.0.0.1)
  -p<service>     udp service port  (119)
  -u<username>    user name
  -v              verbose
  -W<seconds>     timeout           (30)

Commands

Chanco will transmit the specified command to the control interface of the server, which in turn will respond with a digit followed by a space and a human readable text. If the digit is zero, the server accepted and processed the command. The digit 1 indicates an error.

addhist id arr exp post path...
This command instructs the server to create a history line and add it to the history file.
id
Message ID within angle brackets.
arr
Arrival date.
epx
Expiration date or zero, if the article doesn't contain an Expires: header.
post
Posting date.
path
Newsgroup followed by a colon followed by the article number within this group. With crossposts several of these items may be specified in a comma separated list.
All three dates must be given by the number of seconds since 01/01/1970.

Example:

Chanco addhist <32EE5.4A39@pind.de> 849475253 0 848920789 alt.2d:277,alt.3d:134
Note, that this command is processed, even if the server is flushed or paused, in which case the history file will be shortly opened for writing.

allow reason...
Allow clients to connect the server. The given reason must equal the reason given by a previous reject command.

cancel id
Removes the article specified by the given message-id. Replace id with the message-ID within angle brackets.

Note that this command will not create a cancel message, but simply remove the article from the local newsbase.

changegroup group rest
Changes the mode of an active newsgroup. Set group to the name of the newsgroup to be changed and rest to any of the following group attributes:
y for groups with local posting permission
n for groups without local posting permission
m for moderated groups
In case the attribute didn't change, the server responds with 0 Group status unchanged.

disconnect client
Kick out a specified host or user@host.

drop site
Flush the queue and stop feeding the specified site.

flush site
Flush queued articles of the specified site.

flushlogs
Flush the server internal buffers of the active, history and overview files. In addition all internally cached group directories will be discarded. It the server is flushed, paused or throttled, it will rejected this command and respond with 1 Already flushed.

flushserver reason...
The server will only accept this command if not already flushed, paused or throttled. After writing all internal buffers of the active and history file back to the disk, the server enters a flushed mode. Incoming articles are still accepted but will be written to a subdirectory named CHANGISPOOLDIR\incoming. The history file is kept open for reading.

go reason...
This command will be rejected unless the server had been previously flushed, paused or throttled with the given reason. After reading the active file back from disk, Changi will continue operation in normal (running) mode. Any pending article batches in CHANGISPOOLDIR\incoming will be automatically reprocessed.

groupentry index
Print newsgroup by index. To query all active groups, start with index 0 and increment it on each subsequent call until the server responds with 1 not available. If groups had been intermediately removed, the server may respond with 2 Go on, in which case you should continue your query with the next index.

hostentry index
Print host by index. To query all connected hosts, start with index 0 and increment it on each subsequent call until the server responds with 1 not available.

mode
Returns the server's current operation mode. Possible responses are
0 Server running
0 Server flushed
0 Server paused
0 Server throttled
newgroup group rest creator
Creates a new newsgroup. You must set group to the name of the newsgroup to be added and rest to
y for groups with local posting permission
n for groups without local posting permission
m for moderated groups
Set creator to the email address of the person responsible for adding the group.

Example:

chanco newgroup ping.test y harald@os2point.ping.de
Note, that this will not immediately update the active file, because the server keeps all active groups in an internal buffer. Use flushlogs to force an immediate update.

oversync speed
Starts a background task within the server to update the overview database. Set speed to
slow to run update during idle time only
normal to run update with normal priority
fast to run update with maximum priority
stop to stop a running update
By default Changi will dynamically update overview files when the group is accessed by a client.

param letter value
This command allows you to dynamically change some of Changi's command line options. Changeable options are D, d, F, l, O, Q, S, t, T, u and x. Simple switch options must be followed by 0 in order to switch them off or 1 to switch them on.

Example:

Chanco param d a0
will switch-off active file debugging.

pause reason...
Flushes the active file, closes the history files and puts Changi in paused mode. The server will keep all connected clients waiting and should not be left in this mode much longer than a few seconds.

This command will not be accepted in paused or throttled mode. If the server is running in flushed mode, make sure to use the same reason to put it in paused mode.

reject reason...
Changi will not accept any new connections. Already established connections are continued.

Note, that some newsreaders may dynamically open and close connections within a single session.

rejecting
Print reject reason. If the server is currently accepting connection, it will respond with 1 Connections allowed.

resource type
Query system resources. Valid resource types are
memory Available core memory.
news Available space for article storage.
overview Available space for overview files.
history Available space for history entries.
sysload Current CPU load.

rmgroup group
Removes the specified newsgroup from the active file.

Note, that this will not immediately update the active file, because the server keeps the list of active groups in an internal buffer. Use flushlogs to force an immediate update.

shutdown reason...
All connections are closed, active and history files will be flushed and the server terminates.

This command will not generate a respond and Chanco will return immediately. One way to verify the success of this command is to check changi.pid.

throttle reason...
All connections are closed, active and history files will be flushed. Changi will not accept any clients.

This command will be rejected if the server is already throttled. If the server is running in flushed or paused mode, make sure to use the same reason to put it into throttled mode.

userentry index
Print user by index. To query all logged in users, start with index 0 and increment it on each subsequent call until the server responds with 1 not available.

xabort text...
Unconditionally aborts the server. Note that history and active files are not updated. You should run expire -rv before starting the server again. The server will not respond to this command and Chanco will return immediately.

Options

-do
By default you need any syslog daemon to view and/or store logged messages. This option will output them on the console using the standard error channel.

-dp
Adds the current process id to logged messages.

-hhostname
Use this option to control a server on a remote host. By default Chanco tries to connect a server running on a local machine. This option will override CHANGILOCALHOST

-pservice
Chanco expects the server to listen for control messages on udp port 119. Use this option for servers configured on a different port. This option will override CHANGICONTROLPORT

-uuser-id
You must use this option unless you set either the USER or CHANGILOGNAME environment variable.

-v
It's highly recommended that you use this option if you run Chanco manually. Otherwise you won't get a response to determine whether your command had been successful or not.

-Wseconds
On most commands Chanco will wait for a response from the server for up to 30 seconds. This option may be used to set a different timeout. Note that the server won't send a response on shutdown and xabort commands.

[ Top of Page | Previous Page | Next Page | Table of Contents ]


URL: changi/manual/chancoopt.html
Created: 27 August 1996
Revised: 8 December 1996
Author: harald@os2point.ping.de