home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume6 / newbatcha / nbatcher.doc < prev    next >
Encoding:
Text File  |  1986-11-30  |  3.8 KB  |  82 lines

  1.  
  2. DETAILED DESCRIPTION OF "NBATCHER.CTL" FILE
  3. -------------------------------------------
  4.  
  5. As distributed, nbatcher.ctl contains just a terse summary of its
  6. format.  For each site you feed news to, providing that site uses the
  7. ":F:BATCHDIR/site" batching syntax in the sys file, a corresponding
  8. entry should exist in nbatcher.ctl  Each line is a five-field,
  9. colon-separated entry indicating what to do for that site.  The default
  10. for BATCHDIR is /usr/spool/batchnews.
  11.  
  12. The format is:
  13.     site:hour:bits:queue_size:command
  14. The site field is the name of the UUCP site that will get the batched
  15. news.  There MUST be a file in the BATCHDIR directory with the
  16. sitename.  Nbatcher will complain about mismatches.  This file contains
  17. a full-path listing of the files to batch.
  18.  
  19. Next is the hour field.  The syntax directly imitates the crontab entry
  20. for hour.  If hour = "*", than assume a match for every hour.  If hour
  21. = "off", then no work is ever spooled for this site.  (This is the only
  22. difference from crontab).  You can specify a specific hour, like 8 or
  23. 09 or 22.  Or a range of hours, like 10-15, meaning check for work from
  24. 10am thru 3pm.  You can also cycle thru a 24-hour period by saying
  25. 22-4, which matches for 10pm thru 4am.  Also, hours comma separated
  26. like 7,14,21, says check for work at 7 AM, 4PM and 9PM only.  This
  27. gives lots of flexibility for sites that feed multiple remotes.
  28.  
  29. Next is the bits field, which has a value of 9-16, or may be left blank.
  30. If non-null, this field is directly passed on to compress with the -b
  31. flag.  If it is null, then no compression is done for this site.
  32.  
  33. The queue_size field is the maximum number of bytes allowed on the UUCP
  34. queue at any time.  It defaults to 100K bytes, and if it's greater than
  35. 1MB (see parse.c about MAX_BYTES), than it uses 1MB as the default
  36. number of bytes.
  37.  
  38. What nbatcher does is first check the UUCPDIR for that site and sums up
  39. the number of bytes already on-queue.  The size of each news article is
  40. accumulated prior to batching to the tempfile, and this accumulation +
  41. the UUCP on-queue bytes are checked to see if they surpass the queue_size
  42. value.  If not, things proceed normally.  But if it would exceed the
  43. max value, then spool what's already been batched, and save the
  44. remainder of the articles for the next scheduled batch.
  45.  
  46. This is so noted in the nbatcher.log file, showing the UUCP bytes that
  47. were on-queue (if any), and the number of bytes that were spooled.
  48. Also, if nbatcher is run from a terminal instead of from cron, a copy
  49. of what gets logged is sent to the terminal.
  50.  
  51. The last field is the command field.  This optional field is used for
  52. specific UUCP command execution.  As written, it defaults to "uux - -r
  53. site!rnews".  Since my uux doesn't require the -z option for rnews, I
  54. left it out of the UUX define in nbatcher.h  This can easily be changed
  55. for your own taste, or just use the command field.
  56.  
  57. Example:
  58.     site-A:3,10:16:450000:
  59. Check for work for site-A at 3AM and 10AM.  Use compress with
  60. 16 bits and only spool up to 450K bytes, using "uux - -r site-A!rnews".
  61.  
  62. Another example:
  63.     foo:23-4::300000:uux - -r -z foo!rnews
  64. Check for work for foo between 11PM and 4AM.  No compression is used
  65. and spool up to 300K bytes using the command field.
  66.  
  67. This format should help ease UUCP congestion on the local site for
  68. news.  I currently feed 5 remote sites, compressed and non-compressed
  69. formats, and have noticed a vast improvement in disk space as well as
  70. out port availability for UUCP.  It has allowed me to check for work
  71. for all sites every hour, since there's a limit on how much gets
  72. queued.  And if the remote doesn't answer on the hourly UUCP poll, so
  73. what!  Nbatcher just won't spool any more until the queue_size limit
  74. on-queue is reduced.
  75.  
  76. Nbatcher was designed to weed out any illegal syntax in the control
  77. file, but it's not bug-proof, so use some discretion.
  78.  
  79. Bob Esposito
  80. Bell of Penna.
  81. June 1986
  82.