Tellnews - Controlling the DNews Server
Syntax: tellnews cached group_wildcard n_days
Description: Causes the group or groups listed to be cached on the server for the number of days specified.
Example: tellnews cached rec.bicycles.* 3
This will cause DNews to update the rec.bicycles hierarchy every day for 3 days even if no one reads any of those groups.
Syntax: tellnews check_buckets
Description: Scans all spool directories for db*.itm and corrects DNEWS's internal indexes and usage figures. Should be used if you move buckets between spools.
Example: tellnews check_buckets
Syntax: tellnews check_index
Description: Takes a few seconds, checks the index and corrects the group ranges to match the index.
Syntax: tellnews checkgroups check_news_item.txt
Description: Processes the given file as if it had been received as a checkgroups message. A checkgroups message is a list of 'real' news groups in a given news hierarchy, for example all the rec.* news groups. Any news group that is not in the check groups messages is deleted, any news group which is missing is added. The file must be complete with some headers followed by a blank line and then the list of groups.
Example: tellnews checkgroups message.txt
Syntax: tellnews clear_cache
Description: Clears some of the internal caches used for reading item files
Syntax: tellnews copy_group group.name.from group.name.to
Description: This allows you to copy the contents of a group to another group, this is also the way to rename a group, you create a new one, copy the contents, them remove the old one, always examine the new group before deleting the old one!!. Items that have already been coppied will not be coppied again so you can also use this command to archive a group
Example: tellnews copy_group local.chat local.chat.archive
Syntax: tellnews copy_item group.name item.number new.group.name
Description: Used to copy an item from one group to another.
Example: tellnews copy_item local.test 79 local.chat
Syntax: tellnews copy_subject group.name.from group.name.to "text from subject"
Description: copies items with the given subject from one group to another.
Example: tellnews copy_subject local.test local.chat "Amazons"
Syntax: tellnews copy_thread group.name.from group.name.to "<Message@id>"
Description: Intended for moving threads between local newsgroups.
Example: tellnews copy_thread local.test local.chat "<"Message@id>"
Syntax: tellnews crash_now
Description: very dodgy command used to simulate the behavior of certain other companies news servers.
Example: tellnews delete_subject group.name "Text from subject"
Syntax: tellnews delete_subject group.name "text from subject"
Description: Used to delete all the messages in a particular news group which have the given subject.
Example: tellnews delete_subject local.chat "naughty subject"
Syntax: tellnews debug [chan_read:chan_write: ]
Description: Used with loglvl debug or flush, to control which debugging messages are sent to the log file. The list of options must not contain spaces. The default list is:
Example: tellnews debug chan_read:chan_write:
Syntax: tellnews disconnect n (where n is the number of the channel to disconnect)
Description: Used by the DNews admin to disconnect a single channel, select the number 'n' by doing a tellnews status command
Syntax: tellnews "diskuse comp.os.*"
Description: Gives the disk usage of all the groups in that directory tree. This total counts each cross post so the total can be larger than your entire system. Where "comp.os.*" is any group/subgroup/wildcard that you wish to specify.
Syntax: tellnews dns_clear
Description: Used by the DNews admin to clear DNEWS's cache of ip numbers and names. Very rarely necessary. If you change the names or numbers of local machines then this command should be used.
Syntax: tellnews dns_show
Description: Used by the DNews admin to inspect DNEWS's internal cache of ip numbers and names. Very rarely useful for normal operation unless you are having trouble granting access to a particular ip name and you need to see what name DNews is finding for that computer in the DNS.
Syntax: tellnews exit
Description: Shuts down the DNews server cleanly. This command will often finish with a socket error, this is normal as the connection is aborted as DNews shuts down.
Syntax: tellnews expire
Description: Used by the DNews admin to force an expire run during the day. This is occasionally necessary if something has prevented normal expire runs to work and after fixing the problem you wish to start an expire run immediately to free up disk space. The expire run will begin as soon as the current entry in the sucking queue has completed.
You can use the command 'tellnews status' to see the expire command in the update queue.
Syntax: tellnews expire_xover
Description: Runs the nightly expire job and trims the xover index files.
Example: tellnews expire_xover
Syntax: tellnews fileonly
Description: Used by NetWin support staff to test DNews performance. NEVER use this command :-).
Syntax: tellnews fixnames
Description: Used by DNews admin to fix the active.names file. This command will check the file is internally consistent and it will remove any duplicate entries. This command should be used every few months to keep the system clean.
Syntax: tellnews fixtimes days_old
Description: Tells DNews to re-write the active.times file and pretend that all groups were created 'days_old' ago. This command should be used once every 6 months to clean out old groups from the active.times file.
Syntax: tellnews getgroups [n] | [site.name]
Description: Used with a sucking feed to get the list of groups from the provider. If there are more than 300 groups cached DNews will do this automatically every update_at period. If there are less than 300 groups cached it will do this command automatically once per day. It can also be used to get the groups lists from additional feeds by specifying 2, 3, or 4 as n. This has to be used to add an additional feed to DNews.
When you first start up DNews it will also try and get the full list of groups, but if it fails on the first attempt (due to some temporary problem, e.g. you forgot to plug in the ethernet cable) then use this command to force it to fetch the list again.
With Version 4.7 of DNews you can also use the command:
tellnews getgroups upstream.site.name
This will work for sucking or IHAVE feeds in most situations, for an IHAVE feed give the site name that you use to send your local posts upstream. (e.g. the entry you placed in newsfeeds.conf)
Example 1: tellnews getgroups 2
Example 2: tellnews getgroups news3.sprint.net
Syntax: tellnews getnames
Description: Gets the list of news group names from the news server you are sucking from and stores them in the active.names file.
Very few news readers display these full names so it is not critical to get this.
Example: tellnews getnames
Syntax: tellnews getold <group wildcard> n
Description: DNews keeps track of the latest item number for every group on the site it is sucking from. This command lets you adjust this counter downward by 'n' for every matching group. This can be useful as a way to 'refetch' items that were somehow missed previously.
This command will not result in duplicate articles, because of the history file DNews will not refetch an article if its message id is stored in the history file.
Example: tellnews getold rec.bicycles.tech 100
Syntax: tellnews group_age
Description: Age all groups, this command emulates the passing of a day. Each cached group has a counter of how many days it should remain cached for and this command will reduce every counter by one, and will then 'un-cache' any groups who's counter has reached 0.
Example: tellnews group_age
Syntax: tellnews group_merge
Description: Merge a file called active.add (in the workarea directory) with the existing active.dat file. This is the correct way to update your active list to include groups from a new site that is now sending you items via IHAVE. Don't edit the active.dat file by hand :-)
The workarea directory can be found by searching dnews.conf for 'workarea'.
Syntax: tellnews group_nodup
Description: Checks the active file and removes any duplicates. This command should never be necessary, it was added during an early version of DNews which had a bug which could allow duplicate groups to get into the active file.
In DNews 4.3 this command is not needed as the file is checked on startup.
Syntax: tellnews histforget "<article id>"
Description: Allows you to make DNews temporarily forget an item, allowing you to suck it again.
Syntax: tellnews hist_test
Description: Shows in the log file every time an actual history file read is necessary. This was used to confirm that history lookups were as rare as possible while accepting an IHAVE feed.
Syntax: tellnews in_clear
Description: Clears the stats_in statistics.
See also: out_clear
Syntax: tellnews key
Description: Enter a license key to the server. If you have trouble entering your key please cut and paste the entire error and send it to NetWin support.
Example: tellnews key a6j5a0a2a4p6a9
Syntax: tellnews killgroup <group wildcard>
Description: Removes the specified group(s) from the active file. You must shut down and restart DNews after using this command. This command does not attempt to delete the items related to the group, this command is intended for use only when you know best.
To cleanly remove a news group use the rmgroup command (which is reversible)
Example: tellnews killgroup NetWin.chat.group
Syntax: tellnews killitem <group name item number | '<message id>'>
Description: Delete an item in a group. The item is defined either by its message id or by a combination of its number and the group it is in. This information can be found by using a news reader such as WinVN that shows the article numbers. Usually used for removing inappropriate postings from private local groups. When using tellnews on the command line the quotes around the messageid are required, when using tellnews in the web admin tool the quotes must NOT be entered :-)
This command will remove the item and all its cross posts. Use the command killone to delete a single crosspost.
Example 1: tellnews killitem '<email@example.com>'
Example 2: tellnews killtitem rec.bicycles.tech 57536
Syntax: tellnews killone group_name item_number
Description: This command deletes a single part of a cross post, as opposed to the killitem command that deletes all cross posts of a single item.
Example: tellnews killtitem rec.bicycles.tech 57536
Syntax: tellnews log
Description: Display the last 50 lines of the dnews.log file.
Syntax: tellnews logchan 3
Description: Creates a log file chan_3.log which is a summary of all the data sent and received on the specified channel (as shown in tellnews status). This is used to debug live feeds.
Syntax: tellnews loglvl <debug | flush | info | warn | error>
Description: Set the level of messages to be recorded in the dnews.log file, can be used in conjunction with the tellnews debug command. This command is very useful for enabling a higher level of debugging for a brief period while testing some problem system.
Example: tellnews loglvl debug
Example 2: Testing a problem with report messages not arriving:
tellnews loglvl debug
tellnews debug chan_read:chan_write:suck:
(wait 20 seconds)
tellnews loglvl info
(now examine the log file in detail)
Syntax: tellnews matchfeed
Description: Marks all groups that don't match the groups entry under site ME in the newsfeeds.conf file as deleted. This is typically used to change the me feed to allow groups that were previously blocked (in conjunction with tellnews undelete) or to set newly blocked groups to deleted.
tellnews undelete *
Syntax: tellnews matchgroups 2
Description: Compares the list of news groups from the upstream site nntp_suck2 and adds missing ones and removes extra ones. If the setting in dnews.conf limits the groups that can be sucked from this feed, then the same limit applies to groups deleted by this command.
Syntax: tellnews matchfile active.master
Description: Compares the list of news groups from the name file (in the workarea directory) and adds missing ones and removes extra ones.
Syntax: tellnews move_subject group.name.from group.name.to "text from subject"
Description: Moves items with the given subject from one group to another.
Example: tellnews move_subject loca.test local.chat "amazons".
Syntax: tellnews newgroup <groupname> [y |m][creator][description]
Description: Add a new group to the group list, this can be a local group or a new group from another feed site, or a group from the upstream feed. The optional y or m field is to set the group as normal (y) or moderated (m), the optional creator field is a one word name of the group's creator, the optional description field is a few words describing the group.
Example: tellnews newgroup local.bicycle.rides y eddym Info about bike rides in our vicinity
Syntax: tellnews out_clear
Description: Clears the stats_out statistics.
See also: in_clear
Syntax: tellnews purgegroups
Description: Actually remove and forget about groups that have been marked for delete. You must stop and start DNews after using this command. If you use this on a sucking feed and the deleted groups exist on the site you are sucking from, then the groups will re-appear.
Syntax: tellnews rebuild_gids
Description: This command should ONLY be used if you somehow stuff up your active.dat file by over writing it with a non DNews version. The active.dat file contains group id's that relate to database files. If you mess these up then rebuild_gids will untangle the mess (if you are lucky). ONLY use this command if you are certain it's the right thing to do.
Syntax: tellnews rebuild_hist
Description: Add any items to the history file that aren't already in it. (rebuild_hist should not generally be used alone as the history and index files are co-related - they should be rebuilt together with rebuild_index, see below)
Syntax: tellnews rebuild_index
Description: Rebuilds index and the history database from scratch, the items will disappear, then reappear during the rebuild. (rebuild_hist should not generally be used alone as the history and index files are co-related - they should be rebuilt together with rebuild_index)
Syntax: tellnews rebuild_piles
Description: Rebuilds the piles by re-processing all the news messages, this takes a fairly long while and can be dangerous, it's purpose is to allow messages to be moved to different piles based on new expire.conf rules.
Syntax: tellnews rebuild_rules
Description: Just like rebuild_piles, but even more dangerous, this re-applies the rule filter in the me feed, this can be useful for cleaning spam out of the spool. But if something goes wrong with your rules, you can loose all news group items very quickly.
Syntax: tellnews remove_lost
Description: Scans the database for items that are not in the history index, and flags them to be deleted during the next expire.
Syntax: tellnews refeed feed.name
Description: This command will re-send all current articles to a particular news feed. This command is fairly cpu intensive as the entire history file (maybe 80MB) must be parsed. Also, it does not apply all the rules associated with the feed you have specified, it only checks that the group name matches. This command is particularly useful when setting up the FTS (Full Text Searching) system on a running server. It allows you to 're-index' all existing items. It should not be used for other purposes.
Syntax: tellnews reject "<firstname.lastname@example.org>"
Description: Tells DNews to immediately reject the specified item if it is offered it by an IHAVE feed. This command is very rarely useful if a particular item is blocking an incoming feed for some unexplained reason.
Syntax: tellnews reload
Description: Reloads the .conf files, necessary to make any changes to the files take effect, if not done the changes will not take effect until you restart DNews. Currently connected channels are not rechecked against the reloaded access.conf rules until the channel disconnects and reconnects.
Syntax: tellnews reload_fts
Description: Tells DNews that the fts index has changed and should be reloaded from disk. This command is not usually needed, the index is normally re-read fairly often automatically.
Syntax: tellnews report
Description: Forces DNews to generate the expire report and mail it to the manager address set in dnews.conf. Very useful if you are not getting these reports, it allows you to check the log file and see why the report isn't successfully sent.
Syntax: tellnews reque
Description: Puts all outgoing feeds into the sucking queue and attempts to send them. Again this is useful if a builtin outgoing feed or smtp feed is not working, it allows you to trigger a retry and watch to see why it fails.
Syntax: tellnews resort_index
Description: Sorts the index so any group can be read with a single disk scan. This will also remove deleted entries from the index. This command is worthwhile after a disk crash, in most other circumstances it is not needed.
Syntax: tellnews rmgroup <group name>
Description: Flags the specified group(s) as deleted. This is the clean way to delete a group, and if you make a mistake you can undelete the groups.
Example: tellnews rmrgroup local.secret*
Syntax: tellnews rotate
Description: Manual command to rotate the log files and remove the oldest one. There is an automatic setting for doing this in the dnews.conf file (debug_rotate n). Moves dnews.log to dnews2.log, dnews2.log to dnews3.log, etc.
Syntax: tellnews setused
Description: Set DNEWS's internal count of diskuse based on a check of current disk use. This command should only be needed after a crash of some kind.
Example: tellnews setused
Syntax: tellnews showcached [wildcard]
Description: Displays a list of the groups that are cached on the system and the number of days that they will continue to be updated for. At the end of the update time no more new articles will be fetched for the group and the expire process will gradually remove the items from the group. The cached life of the group is reset to the value specified for the life parameter in dnews.conf each time an article from the group is read.
Syntax: tellnews showgroup group.name
Description: Lists the items in a group - subject,mid etc..
Example: tellnews showgroup local.test
Syntax: tellnews showgroup group.name.wildcard
Description: Lists details on all groups matching that wildcard
Example: tellnews showgroups "comp.lang.*"
Syntax: tellnews showmem
Description: Shows how much memory DNews is using in great detail, note: the value under strdup is not accurate. The output of this command is useful to NetWin support staff if you are having a problem with memory use. (see also the related command test_mem)
Syntax: tellnews showqueue
Description: Display a list of groups waiting in the queue to be updated.
Syntax: tellnews showusers
Description: Displays a list of ip addresses and user names who have connected since startup. The display includes a summary of bytes transferred etc. The data is only added when a connection is closed so current sessions are not included.
Syntax: tellnews speed
Description: Shows how fast articles are arriving. Use in conjunction with tellnews speed_reset for performance testing.
Syntax: tellnews speed_reset
Description: Resets the counters for testing how many articles are arriving per second.
Syntax: tellnews spool_convert /var/spool/news
Description: use this command to convert an existing INN or CNEWS spool area. As each file is processed it is deleted, you should comment out your feeds before doing this or you may end up re-feeding all this old stuff to your outgoing feeds. (Added at Version 3.) For reliability, we recommend sucking news from from the old server rather than using this feature.
See the alternative command spool_import which is non destructive (it does not delete the items after converting them)
Syntax: tellnews spool_import /var/spool/news
Description: same as spool_convert but the items are not deleted after being imported.
Syntax: tellnews stats
Description: Returns a listing of statistics showing which nntp commands have been used and how long DNews has taken to process each command.
CMD CPU ELAP CALLS CPUAVG ELAPAVG
CMD = All NNTP commands and internal functions, e.g. article, post, xover ...
CPU = Total CPU used processing above command
ELAP = Total elapsed time processing command
CALLS = Number of times command or function has been called
CPUAVG = Average cpu use per call
ELAPAVG = Average elapsed time per call
Xover (Total time)'s, file=(Xover index)s/Number=(time per item) db=(Raw file)s/Number=(time per item)
This shows how much time was spent reading xover information from
the xover index, and how much time was spent reading it from the
raw database files.
Busy 0.12% for the last 8981 seconds
This shows how busy DNews is, or conversely, how much time it
spent doing nothing just waiting for a command.
Syntax: tellnews stats_in
Description: Returns a report about what DNews has sucked/accepted since the last expire.
Syntax: tellnews stats_out
Description: Returns a report about what DNews has sent out on various feeds.
Syntax: tellnews stats_groups
Description: Shows the top 40 groups by the number of times they have been read by users, and by the volume of articles received into that group. This allows you to spot groups which are gobbling up disk space and bandwidth, but are not being read by significant numbers of users.
Syntax: tellnews status
Description: Returns a report about the status of the system, explanation and example output here.
200 18.104.22.168 DNews Version 3.0f, posting OK
#This line shows the name and version number of the server, it
#also tells you if posting from your ipaddress is possible.
Feed: me *,!to.*,!*.binaries.*
Feed: 22.214.171.124 Posting Builtin Posts=0 Rej=0 Req=0 Dup=0 file=100k Del=10MB *
# This is a list of the feeds in newsfeeds.conf, the first feed must be called 'me'
# it specifies what groups to accept locally, the other feeds specify where to
# send items and what items to send, (*=send all groups) The word 'posting' means
# feed is to send items upstream using the posting mechanism, and it is a builtin
# feed (e.g. doesn't need an external xmit process to send items)
# The number of Posts, Rejects, Reque'd and Duplicate messages sent out that
# feed since startup are shown. Also if there is a queue of waiting articles
# then the size of the queued file is also shown.
# The 'del' figure is how much queued articles have been deleted because they
# couldn't be sent (This is automatic if the queue grows past 10MB)
Chan[0:5] B o=130 in=1/s out=6/s 126.96.36.199 test.NetWin.co.nz C_CMD
Chan[1:5] o=0 in=13000/s out=600/s 188.8.131.52 test.NetWin.co.nz C_IHAVE
# This is the list of currently connected sessions, the ip number and name are shown
# but in this case reverse translation is disabled so it shows the number twice.
# B = Channel busy, as in it is still processing a command and producing output.
# o=130 Output buffer has 130 bytes.
# in=13000/s Input speed has been 13K /s for the last 30 seconds
# out=600/s Input speed has been 600 bytes/s for the last 30 seconds
# C_CMD = The channel is waiting for a normal NNTP command
# C_IHAVE = The channel is part way through an IHAVE transaction.
Expire started at Fri Feb 16 13:31:05 1996 Done, start 1% end 1%
Processed 920 removed 0 deleting 200/-1/150 speed 170.429
Expire finished at: Fri Feb 16 13:31:12 1996, Elapsed 0 hours, 0 minutes
# Shows the start and finish time and %'s of the last expire run.
# Processed = number of history lines in your history file.
# removed = number of history lines removed
# deleting shows the number of items being deleted, total and actual
# (of 200 items deleted 50 were cross posts so don't count as real deletes)
# The -'ve 1 is a progress counter which ticks over when the expire is running.
# Speed = history articles processed/second
Contents of DNews group fetching queue, 2 entries:
Group rec.humor.funny fetching, got 20 items
Group comp.os.vms pending (low priority)
Group comp.lang.java pending (low priority)
End of queue.
# This is the list of groups DNews is currently trying to fetch.
Reverse lookup took 80 seconds, disable lookups if possible (see nodns)
# This error means your name server is faulty (or not contactable), you
# should disable name translation, set NODNS TRUE in dnews.conf
History: disk 76k memory 7k/80k, Str 2k/5k/500k Malloc 1097k/1097k/2128k
# Current history file is 76K (40mb would be more normal) and the in memory
# amount for this file is 7k (5mb would be more normal)
# The Str and Malloc's are for debugging, they show the total memory allocated and
# also what is being used at present.
Used 1MB=1%, Free work 34Mb, hist 34Mb, spool 34Mb, log 34Mb
# Disk space used as a percent and how much is actually free.
Groups Cached 3 of 4624, Uptime 0 day(s) 0 hour(s)
# Shows how many groups are cached, and how long the system has been running.
Syntax: tellnews status_hcache
Description: Used with header sucking to let you know how well the cache is working.
Syntax: tellnews test_files
Description: Used on UNIX systems for checking on memory problems, checks to see how many file handles DNews can allocate.
Syntax: tellnews test_mem
Description: Used for checking on memory problems. Checks to see how much memory DNews can allocate. If it cannot allocate at least 20 or 30 MB then your page file is probably not big enough.
You MUST restart DNews after using this command to allow the memory to be freed.
Syntax: tellnews test_sleep n
Description: Locks up DNews for n seconds (only works on Windows NT). This is used to test behavior of DNews under certain load conditions.
Syntax: tellnews test_sockets
Description: Tests how many sockets DNews can open.
Syntax: tellnews trace_expire "message-id" (or "groupname")
Description: Logs at info level the reason for keeping or expiring any message that matches the message id or group name you have specified.
Syntax: tellnews uncached <group wild card>
Description: Sets the specified groups as not cached.
Syntax: tellnews undelete <group wildcard>
Description: Mark a previously deleted group as undeleted
update, update2, update3, update4
Syntax: tellnews update[n]
Description: Cause an update from the specified feed to be queued, only used for sucking feeds. New items in any cached groups will be fetched.
Syntax: tellnews update_clear
Description: Clear the update queue
Syntax: tellnews updateone <group wildcard> [n]
Description: Add the specified group or groups from the feed [n] in the update queue, n is an optional value from 1 to 4, it will default to the main feed if there is no n specified.
Example: tellnews updateone rec.bicycles.* 2, get the rec.bicycles hierarchy from the second feed.
Syntax: tellnews xcached <group wildcard>
Description: Tells DNews to build xover indexes for the specified groups. By default, DNews does this for any newsgroups read.
Example: tellnews xcached rec.humor.*
Syntax: tellnews xuncached <group wildcard>
Description: Tells DNews not to build xover indexes for the specified groups.
Example: tellnews xuncached rec.humor.*