|
|
1.1 root 1: .RP
2: .TL
3: Using the 2780/3780 Utilities
4: .AU
5: Risa Galant
6: .AI
7: D. L. Buck and Associates, Inc.
8: .LP
9: The
10: .I BSC
11: utilities are a collection of programs, library-files, and drivers which
12: are used to perform batch communications with remote computers, and which
13: make non-IBM terminals look like IBM 2780 or 3780 communications terminals.
14: .LP
15: This tutorial describes some basic terminology, how files are sent and
16: received, how each utility works, and
17: how to use each invocation. The utilities are presented in two parts:
18: those used daily by everyone interested in communicating with remote
19: computers, and those the system administrator will use for maintenance and
20: administration.
21: .LP
22: The utilities are presented in probable order of use:
23: .ID
24: I. Daily use
25: 1. Queuing files for batch transmission
26: 2. Searching host spool directories for files received
27: 3. Formatting files received
28:
29: II. Administration and Maintenance
30: 1. Checking the communications log (if one is kept)
31: 2. Clearing old received files from the host spool directories
32: 3. Purging the communications log
33: 4. Using /usr/lib/crontab to make BSC run automatically
34: .DE
35: .SH
36: Terminology
37: .LP
38: The following terms will be used throughout this tutorial:
39: .RS
40: .IP \(bu
41: Remote host, or host
42: .IP
43: The remote host is any remote computer with which communications are to take
44: place. There may be more than one. Your system administrator should know with
45: what hosts you may communicate.
46: .IP \(bu
47: Spool directory
48: .IP
49: This refers to a special directory on the computer into which transmission
50: control files for files to be transmitted to a particular host are
51: placed, and into which files received from
52: that host are placed. Each host to be communicated with must have a
53: corresponding spool directory, otherwise, files intended for a particular
54: host could go to a different one, and it would be unclear from which host a
55: particular received file came.
56: .IP \(bu
57: Default host
58: .IP
59: Several of the utilities have a default name for the host (and thus for the
60: spool directory); that name is
61: .I default.
62: The default host is the spool directory files to be sent are queued for,
63: searched for, and formatted from if no other host name is specified.
64: Host names should be specified if there are several hosts which
65: may be communicated with, but if there is only one, your system
66: administrator has probably assigned the name "default" to it. This
67: makes invoking the utilities
68: much simpler, because the need to specify a host name is eliminated.
69: .IP \(bu
70: .I
71: BSC (Bisync)
72: .R
73: Daemon
74: .IP
75: This utility is usually invoked by an entry the system administrator made in
76: .I /usr/lib/crontab.
77: It controls the communications activity between your computer and the remote
78: host computer, and does the actual file transfers.
79: .IP
80: If your computer does not have auto-dial or auto-answer facilities for
81: connection to the remote computer, you may have to manually invoke the
82: daemon. Your system administrator should be able to give you procedures
83: for doing so.
84: .RE
85: .SH
86: How Files Are Sent and/or Received
87: .LP
88: The daemon needs three things to perform its communications duties:
89: .IP 1.
90: A remote host configuration file for each host with which communications
91: take place.
92: .IP 2.
93: A remote host spool directory (one per host), the name of which matches the
94: name of the configuration file.
95: .IP 3.
96: At least one transmission control file in the remote host spool directory
97: (i.e., at least one file to send, or an empty ("dummy") control file).
98: .IP \(bu
99: Remote Host Configuration Files
100: .IP
101: Configuration files are created for each remote host by the system
102: administrator in a directory called
103: .I /usr/lib/bscbatch.
104: They serve two purposes: 1, to identify a remote host
105: spool directory to the daemon, and 2, to tell the daemon how to communicate
106: with the host. They contain parameters such as in which character code data
107: will be transferred (ASCII or EBCDIC), how long to put up with a specified
108: (unusual) line condition before terminating a communications session, and
109: how many times to try to get the communications line to the remote host
110: before giving up. If the configuration file doesn't exist, there's no
111: host spool directory as far as the daemon is concerned.
112: .IP \(bu
113: Remote Host Spool Directory
114: .IP
115: As previously explained in the terminology section, this directory's
116: function is to contain files received from the host, and transmission
117: control files created when files are queued for transmission. It must
118: have the same name as the host configuration file or the daemon won't
119: know it exists.
120: .IP \(bu
121: Transmission Control Files
122: .IP
123: Transmission control files are created by
124: .I bscbatch
125: for every file which is queued for transmission. They're placed in the
126: remote host spool directory,
127: .I /usr/spool/bscbatch/<hostname>,
128: where <hostname> is the name of a real host spool directory on your computer.
129: They tell the daemon what file(s) to transmit, how to transmit them, whether
130: special mail should be sent when they've been successfully transmitted, and
131: whether to send only a copy of the file.
132: .IP
133: Your system administrator will already have set up all the configuration files
134: and spool directories you need you need them.
135: All you really need to know is the name assigned to the remote host
136: on your computer; the
137: .I BSC
138: daemon and the utilities will do the rest.
139: .IP \(bu
140: How It Works
141: .IP
142: Once invoked, the daemon searches the
143: .I /usr/lib/bscbatch
144: directory for a host configuration file. When it finds one, it searches
145: .I /usr/spool/bscbatch/<hostname>
146: for transmission control files. If it finds one, it pulls the information
147: from the configuration file and tells its driver how it intends to
148: communicate with the remote host. It then opens the file to be transmitted
149: and attempts to send it. If transmission is successful, it looks for another
150: one to send, repeating the process until there are no more transmission
151: control files in the spool directory. At that time, it waits,
152: ready to receive files. If the host has anything to transmit,
153: it does so.
154: .IP
155: If, when communications first start, the host is more persistant than the
156: daemon and
157: wants to transmit first, the daemon will give up and decide to receive
158: instead. It attempts to send again when the host is finished, and when it is
159: done transmitting, it informs the host it is ready to receive again.
160: .IP
161: When no further activity is detected with the remote host for a period of
162: time specified by the system administrator, the daemon
163: "times out", i.e. it decides to end the session with that host. It
164: continues to search through
165: .I /usr/lib/bscbatch
166: for host spool directories, repeating the communications process for each
167: one it finds. When it doesn't find any more hosts, the daemon ceases
168: to exist.
169: .IP
170: Received files are placed in
171: .I /usr/spool/bscbatch/<hostname>
172: with names which are useful only to differentiate one file from another;
173: they're meaningless for anything else. The standard form is:
174: .RS
175: .IP
176: PR<4-digit index #><daemon's process id #>
177: for print files, and
178:
179: PU<4-digit index #><daemon's process id #>
180: for punch files.
181: .RE
182: .IP
183: For example, if the daemon's process id is 89 and it receives two
184: print files, it will place the print files in the host spool directory
185: and name the first one PR000089 and the second one PR000189.
186: .SH
187: Command Syntax Conventions
188: .LP
189: Command syntax of the utilities is shown as follows:
190: .DS
191: utility param [option=<name>] [option] [option] ...
192: .DE
193: .LP
194: Words without brackets are mandatory parameters \(em they must be typed in if
195: the utility is to perform the function desired. All the words within square
196: brackets ("[]") are optional parameters \(em they need not be specified unless
197: values other than their default values are desired. All the words within
198: angular brackets ("<>") will be replaced by actual names, e.g. the names
199: of real files to be transmitted to a remote host, or the name of a remote
200: host to be communicated with.
201: .NH 1
202: Daily BSC Utilities
203: .LP
204: Daily use of
205: .I BSC
206: consists of queuing files for transmission, checking for files received from
207: a remote host, and processing files received. The utilities which perform
208: these functions are
209: .I bscbatch,
210: which batches (queues) files for transmission and searches directories for
211: received files, and
212: .I bscpr,
213: which formats received files.
214: .NH 2
215: Queuing Files for Batch Transmission
216: .LP
217: Files must be queued before they can be transmitted to a remote host.
218: .I bscbatch
219: does this by creating special files called transmission control files, one
220: for each file to be sent. Each contains the name of the file and
221: information about the options with which it was queued, e.g., whether it is
222: just a copy and should be deleted after it has been sent, or whether or not
223: to send mail if it was transmitted successfully. Transmission control files
224: exist in the spool directory for a host, and start with the letter "C".
225: .LP
226: The
227: .I BSC
228: daemon attempts to contact a particular host only if it finds at least
229: one transmission control file in its spool directory, so that's where
230: .I bscbatch
231: puts them.
232: .LP
233: It is invoked as follows:
234: .DS
235: bscbatch [\(emto=<hostname>] [\(emcopy] [\(emmail] [\(emtransp] [<file> ...]
236: .DE
237: .NH 3
238: The Options
239: .IP \(bu
240: .I \(emto=<hostname>
241: .IP
242: The
243: .I \(emto
244: option is used to specify a destination host. If
245: .I \(emto
246: isn't used, files will be queued in the
247: .I default
248: host spool directory automatically.
249: .IP
250: Note: only one destination host can be specified per invocation of
251: .I bscbatch.
252: .IP \(bu
253: .I \(emcopy
254: .IP
255: The
256: .I Bisync
257: daemon depends on the transmission control file for information about what
258: file is to be sent. If the
259: .I \(emcopy
260: option is specified, a copy of the file to be transmitted is created
261: in the host's spool directory, and
262: the name of that copy is put into the control file. The daemon transmits
263: the copy, rather than the file itself, when
264: communication with the remote host is begun.
265: .IP
266: The
267: .I \(emcopy
268: option is especially useful if a file is going to be changed, but
269: its current version must be transmitted to the remote host. A copy can be
270: made of the file in its current state and added to the spool directory, and
271: work can continue on the original.
272: .IP
273: Once the copy has been successfully transmitted, it is removed from the
274: spool directory.
275: .IP
276: Note: the daemon removes only
277: .I copy
278: files from the spool directory; originals are not removed from their
279: directories.
280: .IP \(bu
281: .I \(emmail
282: .IP
283: Mail is usually sent to the system administrator only if there were
284: problems during the transmission or reception of files. If
285: .I \(emmail
286: is specified, mail will be sent to the user id queuing the file
287: if it was transmitted successfully.
288: .IP \(bu
289: .I \(emtransp
290: .IP
291: The
292: .I Bisync
293: daemon checks whether special control characters exist in the
294: file being transmitted. If there are any, it changes its transmission
295: mode so that those characters are transmitted safely, i.e. not considered
296: to be
297: .I BSC
298: control characters, but actual data. This mode is known as the
299: .I transparent
300: mode. It enables special characters which are part of a
301: file's text to be treated as data, rather than as characters with
302: special meaning for the daemon.
303: .IP
304: If
305: .I \(emtransp
306: is specified, the file will be sent in transparent mode with no
307: special character checking done by the daemon.
308: .I \(emtransp
309: is generally used
310: only if the file to be sent
311: .I has
312: to be sent in transparent mode for remote host compatability reasons.
313: That sort of situation is unusual, and
314: .I \(emtransp
315: really isn't needed for normal communications activity.
316: .IP
317: Note: this form is usually slower than non-transparent mode.
318: .IP \(bu
319: Additional notes
320: .IP
321: All files queued during a single session of
322: .I bscbatch
323: will be queued with the same options. If, for example, it is desired that a
324: .I copy
325: of only one file of, say, 20 to be queued be transmitted, it is
326: better if that file is queued via a separate command to avoid needless
327: use of space.
328: .IP
329: .I bscbatch
330: does its work quietly \(em no prompts are displayed, no input is needed beyond
331: invoking it with appropriate parameters and/or options. It's easy to know
332: when it is finished \(em the system prompt will appear.
333: .IP \(bu
334: [<file>]
335: .IP
336: Substitute the names of files to be queued for transmission for the [<file>]
337: option, separated by spaces. Several files can be queued at once, or separate
338: invocations of
339: .I bscbatch
340: can be made as files are ready for transmission.
341: .IP
342: If no file names are specified,
343: .I bscbatch
344: creates a "copy" file from text entered on the terminal ("standard input")
345: as it is running, placing it in the host's spool directory. The transmission
346: control file created contains the same kind of information as those which are
347: created for files queued with the
348: .I \(emcopy
349: option.
350: .IP
351: Text is entered at the terminal as if the terminal is a typewriter. When
352: all text has been entered, type control-d on a line by itself.
353: This signals
354: .I bscbatch
355: that the file is complete. It creates the "copy" file, and returns to the
356: system prompt. Only one file can be queued this way.
357: .NH 3
358: Sample Queuing Invocations
359: .LP
360: Suppose you want to send three files, stuff, more_stuff, and further_stuff,
361: to a host named "2780" by the system administrator. Further, suppose you
362: want mail to be sent to you when sending is completed. The following
363: command will do this for you:
364: .DS
365: bscbatch \(emto=2780 \(emmail stuff more_stuff further_stuff
366: .DE
367: .LP
368: Or, suppose that you want to send a binary file called obj_file to the
369: .I default
370: host, but you're still working on it and want to be sure that the current
371: version gets sent. Use the following:
372: .DS
373: bscbatch \(emcopy \(emtransp obj_file
374: .DE
375: .NH 2
376: Searching Host Spool Directories
377: .LP
378: .I Bscbatch
379: is also used to search the host spool directories for files received from
380: the hosts. This is usually done after communications have been completed.
381: .LP
382: It is invoked as follows:
383: .DS
384: bscbatch \(emq[=<host name>] [\(emt=hh[mm]] [\(eml=lines]
385: .DE
386: .NH 3
387: The Options
388: .IP \(bu
389: .I \(emq[=<hostname>]
390: .IP
391: .I \(emq
392: is
393: .I not
394: an optional parameter. If the search function of
395: .I bscbatch
396: is desired,
397: .I \(emq
398: has to be specified. Otherwise,
399: .I bscbatch
400: assumes that you want to queue a file for transmission.
401: .IP
402: If a host name isn't specified,
403: .I bscbatch
404: will do the search on the
405: .I default
406: host spool directory. Otherwise, it will search the spool directory of the
407: specified host for files received.
408: .IP \(bu
409: .I \(emt=<hh[<mm>]>
410: .IP
411: .I \(emt
412: is used to limit the search for received files to those received within
413: the last
414: .I hh
415: hours and, optionally,
416: .I mm
417: minutes. If
418: .I \(emt
419: isn't specified, all the files received from the host and currently in the
420: spool queue are displayed.
421: .IP
422: .I Warning:
423: your system administrator will probably cause old received files
424: to be discarded every once in a while. Don't go off on vacation and expect
425: your received files to be waiting for you! As soon as you identify them,
426: move them
427: to a safe place in your directory. You can give
428: them meaningful names this way, too, since the names the daemon assigns are
429: not very meaningful (it uses
430: its process id and an index number to tell files apart). "mv"ing your files
431: will also help keep the size of the spool directories to reasonable limits.
432: .IP \(bu
433: .I \(eml=<lines>
434: .IP
435: .I <lines>
436: must be a number greater than 0 (zero).
437: .I bscbatch
438: displays the first 20 lines of each file received. If some other
439: number of lines is desired, use the
440: .I \(eml
441: option to specify how many.
442: .NH 3
443: Sample Search Invocations
444: .LP
445: Let's say that your system administrator set up the
446: .I bsc
447: daemon to run overnight, and when you start work in the morning, you
448: want to see if you received anything from your favorite host, 2780.
449: You know that you can identify any file that's yours in the first 10
450: lines, so you enter:
451: .DS
452: bscbatch \(emq=2780 \(emt=8 \(eml=10
453: .DE
454: .LP
455: This causes
456: .I bscbatch
457: to search 2780's spool directory for any files received within the last eight
458: hours and to display the first 10 lines of each one found.
459: .LP
460: On the other hand, you can poke around the entire queue of received files in
461: the
462: .I default
463: host spool directory and display 20 lines of each one by typing:
464: .DS
465: bscbatch \(emq
466: .DE
467: .LP
468: Note: If it is possible to identify which files are yours versus which files
469: are someone else's merely by looking at them, your system administrator may
470: have modified the
471: .I bsc
472: daemon to have it place your files in your directory and send you some mail
473: when they
474: arrive. In that case, you won't need to use the search option at all.
475: .NH 2
476: Formatting Files Received
477: .LP
478: .I bscpr
479: is used to format files received from the remote host which contain
480: IBM 3780 or 2780 terminal control characters and escape sequences.
481: It is invoked as follows:
482: .DS
483: bscpr [\(emascii] [\(empage=<pp>] [<chan>=<lineno> ...] [<file>]
484: .DE
485: .NH 3
486: The Options
487: .IP \(bu
488: .I \(emascii
489: .IP
490: .I Bscpr
491: assumes that all the control characters and escape sequences used for
492: printer positioning are EBCDIC style unless this parameter is specified.
493: EBCDIC and ASCII use different letters to identify vertical positioning,
494: so this parameter is important.
495: .IP \(bu
496: .I \(empage=<pp>
497: .IP
498: Page length is assumed to be 66 lines unless this parameter is specified.
499: .IP \(bu
500: <chan>=<lineno>
501: .IP
502: This parameter allows the user to tell
503: .I bscpr
504: the line numbers to which channel numbers specified in the file's escape
505: sequences correspond.
506: .I <chan>
507: may be a number from 1 to 12.
508: .I <lineno>
509: may be a number from 1 to whatever the page length is: 66 if the default page
510: length is being used, or the length set in the
511: .I \(empage
512: option.
513: .IP
514: Usually, channel 1 is top-of-form, channel 12 is bottom-of-form, and the
515: rest correspond to line numbers in between.
516: .NH 3
517: Sample Invocation
518: .LP
519: Suppose you received a file and "mv"ed it to your directory, calling it
520: received_file.
521: If you'd like to see what received_file looks like when it is formatted on your
522: terminal, using line 22 of your terminal as bottom of form, type:
523: .DS
524: bscpr \(empage=22 12=22 received_file
525: .DE
526: .LP
527: .I Bscpr
528: will format
529: .I received_file
530: with 22 lines per page, and any escape sequence specifying channel 12
531: will cause bscpr to go to line 22, the bottom of the page.
532: .SH
533: See Also:
534: .LP
535: .ID
536: BSCBATCH(8)
537: BSCPR(1C)
538: .DE
539: .LP
540: For information on escape sequences for forms control:
541: .LP
542: .I
543: Component Description: IBM 2780 Data Transmission Terminal,
544: .R
545: IBM document GA27-3005.
546: .br
547: .I
548: Component Description: IBM 3780 Data Communication Terminal,
549: .R
550: IBM document GA27-3063.
551: .NH 1
552: Administration and Maintenance
553: .LP
554: Administration and maintenance of
555: .I bsc
556: consists of checking the communications log regularly,
557: doing periodic clean-ups of old received files in the
558: host spool directories, and periodically purging the log of old entries.
559: The utilities which perform these functions are
560: .I bsclog,
561: which puts log entries into report format and displays them and purges
562: the log, and
563: .I bsclean,
564: which cleans out the host spool directories.
565: .NH 2
566: Checking the Communications Log
567: .LP
568: A log of all communications activity with a remote host is kept if a file named
569: .I AUDIT
570: has been created in the host's spool directory. Information in the log
571: includes communications session statistics, files sent and received,
572: their sizes in bytes and number of blocks they were transmitted in,
573: when files were queued for transmission, problems encountered, reasons
574: for disconnection, and so on. Each entry includes the date and time that
575: the event for which it was made occurred, the class of the event, and
576: the user id on which the event took place.
577: .LP
578: .I bsclog
579: is used to put the information in the communications log into a
580: readable report format. It displays all entries in the communications log
581: for the
582: .I default
583: host, unless one or more of its options are used to limit the display.
584: It is invoked as follows:
585: .DS
586: .ta 0.6i
587: bsclog [<hostname>] [\(emfrom=[<yymmdd>]<hhmm>]
588: [\(emto=[<yymmdd]<hhmm>] [\(emclass=<class(es)>]
589: [\(emuser=<user id>]
590: .DE
591: .NH 3
592: The Options
593: .IP \(bu
594: .I <hostname>
595: .IP
596: If you're checking the log for any host besides the
597: .I default
598: host, specify it here.
599: .IP \(bu
600: .I \(emfrom=[<yymmdd>]<hhmm>
601: .IP
602: .I bsclog
603: will display the entire communications log unless you give it some limits. Use
604: .I \(emfrom
605: to tell it from which point you'd like to check the log.
606: If only hours and minutes are specified,
607: .I bsclog
608: will assume that today's entries are to be displayed, starting at
609: the time hh:mm. If a specific date is desired, enter the date
610: .I and
611: the time from which to start checking, in year-month-day-hours-minutes
612: format, e.g. 8305261000 for May 26, 1983 at 10:00 a.m.
613: .IP
614: Four-digit times must be specified, e.g. 8 a.m. is specified as 0800,
615: 3 p.m. as 1500, etc.
616: .IP
617: Note: hours and minutes
618: .I must
619: be specified if
620: .I \(emfrom
621: is used. Year, month, and day are optional.
622: .IP \(bu
623: .I
624: \(emto=[<yymmdd>]<hhmm>
625: .IP
626: If
627: .I \(emfrom
628: can be thought of as a starting point for checking the communications log,
629: .I \(emto
630: can be thought of as an ending point. If only
631: .I \(emfrom
632: is specified,
633: .I bsclog
634: will display everything from the starting time until it reaches the end of
635: the log. If you really don't want to display that much information, use
636: .I \(emto
637: to specify the ending point you want.
638: .IP
639: As with
640: .I \(emfrom,
641: if only hours and minutes are specified,
642: .I bsclog
643: assumes that the ending date for checking the log is today, at the time
644: specified. If a different date is desired, it must be specified in the
645: year-month-day-hours-minutes format.
646: .IP
647: Note: as in
648: .I \(emfrom,
649: hours and minutes
650: .I must
651: be specified if
652: .I \(emto
653: is used. Year, month, and day are optional.
654: .IP \(bu
655: .I \(emclass=<class(es)>
656: .IP
657: Communications log entries come in 6 classes:
658: .I
659: C, D, Q, R, S,
660: .R
661: and
662: .I T,
663: for connect, disconnect, queue, receive, send, and statistics log
664: entries, respectively.
665: .I bsclog
666: will display all classes of log entries unless you say otherwise.
667: If you wish to look at entries for a particular class
668: or group of classes, rather than all of them, use
669: .I \(emclass
670: to do so.
671: .IP
672: See
673: .I BSCLOG(8)
674: for descriptions of messages and their classes.
675: .IP
676: Note: one or more classes may be specified, either in upper or lower case.
677: Classes may be specified in any order.
678: .IP \(bu
679: .I \(emuser=<user id>
680: .IP
681: The
682: .I \(emuser
683: option is used to look at the log entries for a particular user id. This
684: is useful for such things as checking who's queuing files for
685: transmission, or who's trying to invoke the
686: .I bsc
687: daemon.
688: .IP
689: Note: any valid user id may be entered for this option, but only one may
690: be specified per invocation.
691: .NH 3
692: Sample Log Checking Invocations
693: .LP
694: Suppose that you'd like to check 2780's communications log for all activity
695: between 10:00 and 11:00 on June 21, 1983. This command may be used:
696: .ID
697: bsclog 3780 \(emfrom=8306211000 \(emto=8306211100
698: .DE
699: .LP
700: Or, you've been curious as to how successful the connections have been
701: since you started keeping the log (or at least since the last time you
702: purged it) for
703: .I default.
704: Type the following:
705: .ID
706: bsclog \(emclass=C
707: .DE
708: .LP
709: Okay, suppose that it is June 15, 1983, and
710: you want to check all the send, receive, and statistics for
711: user id root between June 10, 1983 at 3 p.m. and June 12, 1983 at 3 p.m.
712: for remote host 3780. Try this:
713: .ID
714: bsclog 3780 \(emfrom=8306101500 \(emto=8306121500 \(emuser=root \(emclass=SRT
715: .DE
716: .LP
717: As a last example, say that you want to look at everything which happened
718: with
719: .I default
720: after 8 a.m. today. Type:
721: .ID
722: bsclog \(emfrom=0800
723: .DE
724: .NH 2
725: Clearing Out Old Received Files
726: .LP
727: Files received from remote hosts are placed in the local spool directory
728: for the appropriate host. They remain in the spool directories until
729: they are either claimed and "mv"ed to a user directory, or until they
730: are cleared out by the system administrator.
731: .LP
732: .I Bsclean
733: is used to clear out old received files from host spool directories.
734: It removes any file which begins with PU (indicating a received punch
735: file) or PR (indicating a received print file) which is more than
736: 72 hours old from the
737: .I default
738: spool directory unless its options are used to specify otherwise.
739: .LP
740: It is invoked as follows:
741: .ID
742: bsclean [\(emt=<hh>] [<hostname>]
743: .DE
744: .NH 3
745: The Options
746: .IP \(bu
747: .I \(emt=<hh>
748: .IP
749: If a cutoff age of other than 72 hours is used to select files for removal, use
750: .I \(emt
751: to specify the age.
752: .IP
753: Note:
754: .I <hh>
755: indicates age in hours.
756: .IP \(bu
757: .I <hostname>
758: .IP
759: To clean out the spool directory of any host other than
760: .I default,
761: specify this option.
762: .IP
763: Note:
764: .I bsclean
765: does its work quietly. You'll know it is done when the system prompt
766: reappears.
767: .NH 3
768: Sample
769: Invocations
770: .LP
771: Suppose that you've warned all your users that you're going to clean
772: out all received files in 3780's spool directory which are more than
773: five days old. When you set out to do so, you'll type:
774: .ID
775: bsclean \(emt=120 3780
776: .DE
777: .LP
778: If you'd rather just let
779: .I bsclean
780: do as it will (or you'd like all received files in
781: .I default's
782: spool directory removed which are older than 72 hours), you'll type:
783: .ID
784: bsclean
785: .DE
786: .NH 2
787: Purging the Communications Log
788: .LP
789: As time goes by, more and more communications sessions occur, and the
790: communications log gets larger and larger.
791: .I bsclog's
792: purge function is used to reduce the size of the log.
793: .LP
794: It is invoked as follows:
795: .ID
796: bsclog \(empurge=<dd> [<hostname>]
797: .DE
798: .NH 3
799: The Options
800: .IP \(bu
801: .I <hostname>
802: .IP
803: This option is specified if a spool directory other than
804: .I default's
805: is to be purged.
806: .IP \(bu
807: .I \(empurge=<dd>
808: .IP
809: .I \(empurge
810: is
811: .I not
812: an optional parameter. If it isn't specified,
813: .I bsclog
814: will assume that you wish to display the log, not purge it.
815: .IP
816: .I <dd>
817: signifies the age of entries to be purged, in days. It must be greater than
818: or equal to 1.
819: .IP
820: Note: there is no default age for purging entries.
821: .IP
822: Also,
823: .I bsclog
824: converts the number of days specified to the number of hours in that many
825: days, and compares that to an entry's age
826: before it decides whether or not to purge the entry. This may result in
827: some confusion when you try to purge all entries which were made
828: yesterday, display the log to be sure they're gone, and find that
829: some are still there. That's probably because exactly
830: 24 hours haven't elapsed between the time the entries were made and the
831: time you decided to purge them. Don't worry \(em you'll get them next time.
832: .NH 3
833: Sample Purging Invocation
834: .LP
835: Let's say that you really do want to purge all communications log entries
836: which were made yesterday for the remote host 3780. Here's how:
837: .ID
838: bsclog 3780 \(empurge=1
839: .DE
840: .LP
841: Or, perhaps you're clearing out the
842: .I default
843: communications log so that there are only two days' worth of entries in the
844: log at any time.
845: The following command will rid the log of any entry
846: which is at least three days old:
847: .ID
848: bsclog \(empurge=3
849: .DE
850: .NH
851: How To Use Cron To Make BSC Run Automatically
852: .LP
853: You may wish to have the spool directories and log files cleared automatically
854: on a regular basis. There is a resident clock daemon,
855: .I /etc/cron,
856: which executes commands at specified dates and times if those commands are
857: in a file called
858: .I
859: /usr/lib/crontab. /etc/cron
860: .R
861: is usually started by the initialization process at boot time.
862: See
863: .I CRON(1M)
864: for more information about this facility.
865: .NH 2
866: Crontab Entries
867: .LP
868: Entries in
869: .I /usr/lib/crontab
870: consist of lines which each contain six fields separated by spaces or tabs.
871: The first five fields are numeric values specifying dates and times to execute
872: the command, which is specified in the sixth field. The date and time
873: fields may have the following values:
874: .DS
875: .ta 2i
876: Minute 0-59
877: Hour 0-23
878: Day of Month 1-31
879: Month of Year 1-12
880: Day of Week 0-6 (0 = Sunday)
881: .DE
882: .LP
883: They are specified in the same order as they're listed above. Entries are
884: made using the text editor.
885: .NH 2
886: Sample Entries
887: .LP
888: Suppose that you wanted to have bsclog purge all communications log entries
889: for 3780 once a month. Further, you've decided that the 15th of each month
890: at 1 a.m. would be a good time to have this done. The following entry
891: will do this for you:
892: .ID
893: 0 1 15 * * bsclog 3780 \(empurge=1
894: .DE
895: .LP
896: Or, suppose that you want to purge the log entries for
897: .I default
898: every week, after working hours on Fridays, leaving two days' worth of entries
899: untouched. Try the following
900: .I /usr/lib/crontab
901: entry:
902: .ID
903: 30 18 * * 5 bsclog \(empurge=2
904: .DE
905: .LP
906: This will purge all log entries older than two days at 6:30 p.m. every
907: Friday.
908: .LP
909: As a last example, suppose that all received files older than 72 hours in the
910: .I default
911: spool directory are to be removed daily, at 1 a.m. Use the following
912: .I /usr/lib/crontab
913: entry:
914: .ID
915: 0 1 * * * bsclean
916: .DE
917: .SH
918: See Also:
919: .LP
920: .ID
921: BSCLOG(8)
922: BSCLEAN(8)
923: CRONTAB(8)
924: .DE
925: .FS
926: DLBA Version 1.2
927: .FE
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.