home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1993-05-07 | 51.4 KB | 1,653 lines
Newsgroups: comp.sources.unix From: decvax!concert.net!woods%robohack (Greg A. Woods) Subject: v26i236: uutraf - UUCP Traffic Analysis and Reporting, Part01/04 Sender: unix-sources-moderator@efficacy.home.vix.com Approved: vixie@efficacy.home.vix.com Submitted-By: decvax!concert.net!woods%robohack (Greg A. Woods) Posting-Number: Volume 26, Issue 236 Archive-Name: uutraf/part01 UUTRAF - UUCP Traffic Analysis and Reporting decvax!concert.net!woods%robohack (Greg A. Woods) OVERVIEW Uutraf is a program that analyzes the output of uucico log files, and produces a summary of activity. It works with both old style UUCP and AT&T's BNU or HoneyDanBer UUCP. It requires no special privileges to execute. It makes no shell calls. ( The old-style SYSLOG parsing code for systems other than ULTRIX 4.2 may not work so well just now.... --woods ) Uutraf is similar to, but more extensive than, the "uusub" utility that was supplied with AT&T UNIX System V's running the old-style UUCP. Note that while HDB-UUCP does record a user-name for each transfer, this user name may be either a local name, or a remote name, and it is impossible to tell which without knowing which system the request was originally submitted from (which is only possible by matching up the PID to the uucico logs, and then tracing back through the uucp and uux logs for the given system in an attempt to match the job to a request). As a result, uutraf does not attempt to report statistics by user. Greg Hackney Southwestern Bell Telephone Co. hack@texbell.swbt.com # no longer valid.... Dallas, Texas Greg A. Woods Elegant Communications Inc. woods@Elegant.COM, woods@robohack.UUCP Toronto, Ontario #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 1 (of 4)." # Contents: CHANGES CREDITS Letter Letter-1.2 MANIFEST README RELEASES # defs.h-dist externsrc.shar patchlevel.h pdstrtok.c uutraf.1 # uutraf.h version.c version.h # Wrapped by woods@robohack on Sun Nov 8 16:38:09 1992 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'CHANGES' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'CHANGES'\" else echo shar: Extracting \"'CHANGES'\" \(9628 characters\) sed "s/^X//" >'CHANGES' <<'END_OF_FILE' XChanges for Release dated: 92/11/08-16:36:33 X------------------------------------------------------------------------------- X@(#)uutraf:CREDITS D 1.1.1.4 92/10/12 14:58:38 woods 5 4 (woods) X add a version id, fix Georg's name, etc. X X@(#)uutraf:CREDITS D 1.1.1.3 92/08/27 02:16:44 woods 4 3 (woods) X added beta-testers, + Robert X X@(#)uutraf:CREDITS D 1.1.1.2 92/07/12 15:20:22 woods 3 2 (woods) X cleanup, added my bit... X X@(#)uutraf:CREDITS D 1.1.1.1 90/07/15 19:41:07 woods 2 1 (woods) X final cleanups for new functionality and list library. X X@(#)uutraf:CREDITS D 1.1 90/07/15 19:33:23 woods 1 0 (woods) X date and time created 90/07/15 19:33:23 by woods X X@(#)uutraf:Makefile D 1.2.2.9 92/11/08 16:35:41 woods 15 14 (woods) X few more fixes for "make dist" to work X X@(#)uutraf:Makefile D 1.2.2.8 92/10/23 10:19:38 woods 14 13 (woods) X cleanup of dist/shar stuff, added version id files X X@(#)uutraf:Makefile D 1.2.2.7 92/10/12 15:00:07 woods 13 12 (woods) X add new comments from smail-2's Makeguts, Xadd new dist stuff from smail too! X X@(#)uutraf:Makefile D 1.2.2.6 92/08/09 16:26:07 woods 12 11 (woods) X bug in sed line X X@(#)uutraf:Makefile D 1.2.2.5 92/08/09 13:03:55 woods 11 10 (woods) X more hints, better dist & shar stuff X X@(#)uutraf:Makefile D 1.2.2.4 92/07/12 15:30:34 woods 10 9 (woods) X and we're ready for the next release? X X@(#)uutraf:Makefile D 1.2.2.3 92/07/06 00:04:14 woods 9 8 (woods) X fixes and updates in prep. for new release X X@(#)uutraf:Makefile D 1.2.2.2 92/02/16 22:18:46 woods 8 7 (woods) X oops, forgot sccsid.h X X@(#)uutraf:Makefile D 1.2.2.1 92/02/16 22:07:49 woods 7 6 (woods) X added '# Con' field and '-M' option X X@(#)uutraf:Makefile D 1.2.1.4 91/04/26 00:09:25 woods 6 5 (woods) X adjust to use installed libdlst.a and list.h X X@(#)uutraf:Makefile D 1.2.1.3 90/07/15 19:40:50 woods 5 4 (woods) X final cleanups for new functionality and list library. X X@(#)uutraf:Makefile D 1.2.1.2 90/07/15 13:52:48 woods 4 3 (woods) X integraged new list library X X@(#)uutraf:Makefile D 1.2.1.1 90/07/14 14:16:54 woods 3 2 (woods) X retrofit good stuff from 1.2 update to 1.1.1.2 X X@(#)uutraf:Makefile D 1.2 90/07/14 14:15:21 woods 2 1 (woods) X 1.2 update X X@(#)uutraf:uutraf.1 D 1.1.2.7 92/10/23 10:21:28 woods 10 9 (woods) X minor grammatical fixes, Xadded -V option description X X@(#)uutraf:uutraf.1 D 1.1.2.6 92/10/12 15:03:20 woods 9 8 (woods) X clean up CREDITS, fix Georg's name. X X@(#)uutraf:uutraf.1 D 1.1.2.5 92/08/27 02:21:44 woods 8 7 (woods) X more notes, more ack's. X X@(#)uutraf:uutraf.1 D 1.1.2.4 92/08/26 00:01:13 woods 7 6 (woods) X one more wee bug listed, Xadded e-mail for bug reports X X@(#)uutraf:uutraf.1 D 1.1.2.3 92/08/09 13:08:57 woods 6 5 (woods) X moved #ident to top, added L.Wall's handy strings X X@(#)uutraf:uutraf.1 D 1.1.2.2 92/07/12 15:40:15 woods 5 4 (woods) X standard prologue... X X@(#)uutraf:uutraf.1 D 1.1.2.1 92/02/16 22:07:54 woods 4 3 (woods) X added '# Con' field and '-M' option X X@(#)uutraf:uutraf.1 D 1.1.1.2 91/04/26 07:42:15 woods 3 2 (woods) X fixed sorting, cleaned up boundary condidions X X@(#)uutraf:uutraf.1 D 1.1.1.1 90/07/15 19:40:55 woods 2 1 (woods) X final cleanups for new functionality and list library. X X@(#)uutraf:uutraf.1 D 1.1 90/07/15 18:00:57 woods 1 0 (woods) X date and time created 90/07/15 18:00:57 by woods X X@(#)uutraf:uutraf.c D 1.2.2.8 92/10/23 10:23:03 woods 16 15 (woods) X fixed bug where node/device counts not being done if showing only summary X*** CHANGED *** 92/10/23 10:24:53 woods Xadded version ID option (-V), Xadded usage error messages for options X X@(#)uutraf:uutraf.c D 1.2.2.7 92/10/12 15:06:08 woods 15 14 (woods) X add Robert Story's time-range code for the report header X X@(#)uutraf:uutraf.c D 1.2.2.6 92/08/27 02:26:49 woods 14 13 (woods) X support for type changes of "bytes" to long, and "time" to float, Xfixes for ULTRIX 4.2 SYSLOG format X X@(#)uutraf:uutraf.c D 1.2.2.5 92/08/26 00:04:24 woods 13 12 (woods) X made CPS fields 1 wider, hours 1 narrower, summary total time in HH:MM:SS X X@(#)uutraf:uutraf.c D 1.2.2.4 92/08/09 14:54:16 woods 12 11 (woods) X clarified BSD vs. HDB-UUCP confusion, and pyr vs. pyramid X X@(#)uutraf:uutraf.c D 1.2.2.3 92/07/12 15:27:13 woods 11 10 (woods) X portability for fun and profit! Xbug fix in sscanf() spec. X X@(#)uutraf:uutraf.c D 1.2.2.2 92/07/05 23:56:41 woods 10 9 (woods) X bug fixes (missing 0 for some printf()s), portability fixes X X@(#)uutraf:uutraf.c D 1.2.2.1 92/02/16 22:07:59 woods 9 8 (woods) X added '# Con' field and '-M' option X X@(#)uutraf:uutraf.c D 1.2.1.4 91/04/26 07:42:20 woods 8 7 (woods) X fixed sorting, cleaned up boundary condidions X X@(#)uutraf:uutraf.c D 1.2.1.3 90/07/15 19:40:27 woods 7 6 (woods) X final cleanups for new functionality and list library. X X@(#)uutraf:uutraf.c D 1.2.1.2 90/07/15 13:52:24 woods 6 5 (woods) X integraged new list library X X@(#)uutraf:uutraf.c D 1.2.1.1 90/07/14 14:16:30 woods 5 2 (woods) X retrofit good stuff from 1.2 update to 1.1.1.2 X X@(#)uutraf:uutraf.c D 1.1.1.2 90/07/14 13:10:20 woods 4 3 (woods) X added device reporting, removed broken sorting stuff X X@(#)uutraf:uutraf.c D 1.1.1.1 90/07/14 13:09:12 woods 3 1 (woods) X initial cleanup and enhancements X X@(#)uutraf:uutraf.c D 1.2 90/07/14 13:07:02 woods 2 1 (woods) X 1.2 update X X@(#)uutraf:uutraf.c D 1.1 90/07/14 13:05:44 woods 1 0 (woods) X date and time created 90/07/14 13:05:44 by woods X X@(#)uutraf:README D 1.1.2.7 92/11/08 16:26:00 woods 9 8 (woods) X fixed order of compile instructions, Xfixed spelling/grammar, Xadded instructions for Pyramid OSx & DC/OSx. X X@(#)uutraf:README D 1.1.2.6 92/10/23 10:25:50 woods 8 7 (woods) X updated comments on AIX v3 X X@(#)uutraf:README D 1.1.2.5 92/10/12 15:01:45 woods 7 6 (woods) X fix instructions re extern*.shar, Xnew hints, Xminor twiddles. X X@(#)uutraf:README D 1.1.2.4 92/08/27 02:18:17 woods 6 5 (woods) X ULTRIX 4.2 SYSLOG works again, notes about pyr, ultrix X X@(#)uutraf:README D 1.1.2.3 92/08/26 00:06:28 woods 5 4 (woods) X notes about SCO crud, hack' address going bad, NEC EWS/UX 4.0 X X@(#)uutraf:README D 1.1.2.2 92/08/09 13:10:58 woods 4 3 (woods) X more hints, etc. & cleanup for submission X X@(#)uutraf:README D 1.1.2.1 92/07/06 00:04:24 woods 3 2 (woods) X fixes and updates in prep. for new release X X@(#)uutraf:README D 1.1.1.1 90/07/15 19:41:04 woods 2 1 (woods) X final cleanups for new functionality and list library. X X@(#)uutraf:README D 1.1 90/07/15 19:31:34 woods 1 0 (woods) X date and time created 90/07/15 19:31:34 by woods X X@(#)uutraf:uutraf.h D 1.2.2.7 92/10/23 10:26:35 woods 14 13 (woods) X added strings for -V and -h options to usage message X X@(#)uutraf:uutraf.h D 1.2.2.6 92/10/12 15:04:19 woods 13 12 (woods) X add first_rec and last_rec elements for timestamps in summary struct X X@(#)uutraf:uutraf.h D 1.2.2.5 92/08/27 02:19:37 woods 12 11 (woods) X rstory's patch to switch time units to float, Xswitch bytes back to longs too X X@(#)uutraf:uutraf.h D 1.2.2.4 92/08/26 00:02:03 woods 11 10 (woods) X converted counts of seconds from time_t to long X X@(#)uutraf:uutraf.h D 1.2.2.3 92/08/09 13:05:02 woods 10 9 (woods) X cleanup for BSD vs. HAVE_HDBUUCP and pyr vs. pyramid X X@(#)uutraf:uutraf.h D 1.2.2.2 92/07/06 00:01:48 woods 9 8 (woods) X portability stuff moved to common headers X X@(#)uutraf:uutraf.h D 1.2.2.1 92/02/16 22:08:20 woods 8 7 (woods) X added '# Con' field and '-M' option X X@(#)uutraf:uutraf.h D 1.2.1.3 90/07/15 19:40:45 woods 7 6 (woods) X final cleanups for new functionality and list library. X X@(#)uutraf:uutraf.h D 1.2.1.2 90/07/15 13:52:40 woods 6 5 (woods) X integraged new list library X X@(#)uutraf:uutraf.h D 1.2.1.1 90/07/14 14:16:45 woods 5 2 (woods) X retrofit good stuff from 1.2 update to 1.1.1.2 X X@(#)uutraf:uutraf.h D 1.1.1.2 90/07/14 13:10:34 woods 4 3 (woods) X added device reporting, removed broken sorting stuff X X@(#)uutraf:uutraf.h D 1.1.1.1 90/07/14 13:09:22 woods 3 1 (woods) X initial cleanup and enhancements X X@(#)uutraf:uutraf.h D 1.2 90/07/14 13:07:10 woods 2 1 (woods) X 1.2 update X X@(#)uutraf:uutraf.h D 1.1 90/07/14 13:05:47 woods 1 0 (woods) X date and time created 90/07/14 13:05:47 by woods X X@(#)uutraf:defs.h-dist D 1.2.2.5 92/10/23 10:27:14 woods 11 10 (woods) X fixed default STATFILE location for AIX X X@(#)uutraf:defs.h-dist D 1.2.2.4 92/08/27 02:23:35 woods 10 9 (woods) X support for ULTRIX 4.2? X X@(#)uutraf:defs.h-dist D 1.2.2.3 92/08/09 13:09:48 woods 9 8 (woods) X fixes to clear up BSD vs. HDBUUCP confusion X X@(#)uutraf:defs.h-dist D 1.2.2.2 92/07/06 00:03:40 woods 8 7 (woods) X fixes for AIX X X@(#)uutraf:defs.h-dist D 1.2.2.1 92/02/16 22:08:27 woods 7 6 (woods) X added '# Con' field and '-M' option X X@(#)uutraf:defs.h-dist D 1.2.1.3 90/07/15 19:40:59 woods 6 5 (woods) X final cleanups for new functionality and list library. X X@(#)uutraf:defs.h-dist D 1.2.1.2 90/07/15 13:52:45 woods 5 4 (woods) X integraged new list library X X@(#)uutraf:defs.h-dist D 1.2.1.1 90/07/14 14:16:49 woods 4 2 (woods) X retrofit good stuff from 1.2 update to 1.1.1.2 X X@(#)uutraf:defs.h-dist D 1.1.1.1 90/07/14 13:13:46 woods 3 1 (woods) X cleanup and enhancements, including device reporting X X@(#)uutraf:defs.h-dist D 1.2 90/07/14 13:07:43 woods 2 1 (woods) X 1.2 update X X@(#)uutraf:defs.h-dist D 1.1 90/07/14 13:07:19 woods 1 0 (woods) X date and time created 90/07/14 13:07:19 by woods X X@(#)uutraf:version.c D 1.1 92/10/12 15:09:06 woods 1 0 (woods) X date and time created 92/10/12 15:09:06 by woods X X@(#)uutraf:version.h D 1.2 92/10/12 16:06:30 woods 2 1 (woods) X version_id didn't work anyway.... X X@(#)uutraf:version.h D 1.1 92/10/12 15:09:08 woods 1 0 (woods) X date and time created 92/10/12 15:09:08 by woods X X@(#)uutraf:patchlevel.h D 1.1 92/10/12 15:09:12 woods 1 0 (woods) X date and time created 92/10/12 15:09:12 by woods X X---- X END_OF_FILE if test 9628 -ne `wc -c <'CHANGES'`; then echo shar: \"'CHANGES'\" unpacked with wrong size! fi # end of 'CHANGES' fi if test -f 'CREDITS' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'CREDITS'\" else echo shar: Extracting \"'CREDITS'\" \(1295 characters\) sed "s/^X//" >'CREDITS' <<'END_OF_FILE' X#ident "@(#)uutraf:CREDITS 1.1.1.4 92/10/12 14:58:38 (woods)" X XOriginal Author: X X Greg Hackney X Southwestern Bell Telephone Co. X hack@texbell.swbt.com X Dallas, Texas X XAcknowledgements: X XDoug Davis, doug@letni.uucp XDavid Butler, gdb@ninja.uucp X - Added the sorting routines, plus other major work X XBud Hovell, bhh@whizz.uucp X - Reworked the printout for readability and precision X XDavid Kaelbing, drk@igor.uu.net X - Made it work with Sun's version of UUCP X XJoe Garvey, garvey%cmic@mips.com X - Fixed core dumps on empty files X XGreg A. Woods, woods@robohack.uucp woods@elegant.com X - Re-wrote the internals using a new linked-list library. X The library is a re-write of an idea presented in "Object X Oriented Programming in C", David Brumbaugh; The C Users X Journal; July 1990, Vol. 8, No. 7. Use as you see fit. X - added '# of connections with work' tally X - cleaned up output format X - added per-ports report(s) X XD'Arcy Cain, darcy@druid.com X - avid beta tester [ESIX V.3 and V.4] X XGeorg S. Nikodym, georgn@noweh.com X - avid beta tester [SCO XENIX, SunOS 4.1.2, Solaris 2.0(sparc)] X XBill Duncan, bduncan@ve3ied.uucp X - avid beta tester [SCO XENIX] X XRobert Story, rstory@elegant.com X - fixed precision problems with high-speed (TCP/IP) links X - tested on SCO UNIX X - added report period summary X END_OF_FILE if test 1295 -ne `wc -c <'CREDITS'`; then echo shar: \"'CREDITS'\" unpacked with wrong size! fi # end of 'CREDITS' fi if test -f 'Letter' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Letter'\" else echo shar: Extracting \"'Letter'\" \(946 characters\) sed "s/^X//" >'Letter' <<'END_OF_FILE' XFrom ecicrl!lsuc!attcan!uunet!samsung!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!rutgers!texbell!news1 Mon Nov 6 10:32:42 EST 1989 XFrom: news1@texbell.swbt.com (Greg Hackney) XNewsgroups: alt.sources XSubject: uutraf - UUCP statistics for HoneyDanBer XMessage-ID: <621@texbell.swbt.com> XDate: 5 Nov 89 21:26:57 GMT XLines: 899 X X Xuutraf - Produces UUCP transfer statistics - HoneyDanBer (BNU) UUCP only X XThe program summarizes the output of the UUCP 'xferstats' program, Xand gives the transfer statistics by system, giving such things as Xthe average transmission speed, connect time, and the volume of traffic. X XCommand line options can be specified for sorting the output by volume, Xconnect time, xfer rates, etc. For speed and security, the program is XC (no shell calls), and requires no special privileges to run. X XThanks to Doug Davis and David Butler for the sorting functions and Xother stuff they did. X-- XGreg Hackney Xhack@texbell.swbt.com X END_OF_FILE if test 946 -ne `wc -c <'Letter'`; then echo shar: \"'Letter'\" unpacked with wrong size! fi # end of 'Letter' fi if test -f 'Letter-1.2' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Letter-1.2'\" else echo shar: Extracting \"'Letter-1.2'\" \(908 characters\) sed "s/^X//" >'Letter-1.2' <<'END_OF_FILE' XFrom nebulus!telly!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!apple!sun-barr!newstop!texsun!texbell!news1 Sun Feb 4 10:42:49 EST 1990 XFrom: news1@texbell.swbt.com (Greg Hackney) XNewsgroups: alt.sources XSubject: uutraf 1.2 (for BSD and BNU UUCP) XMessage-ID: <7@texbell.swbt.com> XDate: 3 Feb 90 02:36:33 GMT XReply-To: hack@texbell.swbt.com (Greg Hackney) XDistribution: alt XOrganization: texbell gateway, dallas XLines: 1077 X X Xuutraf analyzes uucico log files, and produces a summarized report. XIt helps in keeping track of UUCP volume and transfer rates. X XIt now includes support for BSD UUCP systems as well as XHoneyDanBer/BNU UUCP. Plus, the report format has been improved. X Xuutraf is know to work on a Pyramid, NCR Tower, Sequent Balance, Sun 3/50, XCompaq running SCO Xenix, and AT&T 3B2. X-- XGreg Hackney XSouthwestern Bell Telephone Co. XDallas, Texas Xhack@texbell.swbt.com X X END_OF_FILE if test 908 -ne `wc -c <'Letter-1.2'`; then echo shar: \"'Letter-1.2'\" unpacked with wrong size! fi # end of 'Letter-1.2' fi if test -f 'MANIFEST' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'MANIFEST'\" else echo shar: Extracting \"'MANIFEST'\" \(703 characters\) sed "s/^X//" >'MANIFEST' <<'END_OF_FILE' X File Name Archive # Description X----------------------------------------------------------- X dlst.shar 4 X CHANGES 1 X CREDITS 1 X Letter 1 X Letter-1.2 1 X MANIFEST 1 This shipping list X Makefile-dist 2 X README 1 X RELEASES 1 X defs.h-dist 1 X externhdr.shar 2 X externsrc.shar 1 X patchlevel.h 1 X pdstrtok.c 1 X uutraf.1 1 X uutraf.c 3 X uutraf.h 1 X version.c 1 X version.h 1 END_OF_FILE if test 703 -ne `wc -c <'MANIFEST'`; then echo shar: \"'MANIFEST'\" unpacked with wrong size! fi # end of 'MANIFEST' fi if test -f 'README' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'README'\" else echo shar: Extracting \"'README'\" \(6725 characters\) sed "s/^X//" >'README' <<'END_OF_FILE' XArchive-Name: uutraf XSubmitted-By: (Greg A. Woods) woods@robohack.UUCP XEnvironment: UUCP on any UNIX X X X UUTRAF - UUCP Traffic Analysis and Reporting X XOVERVIEW X XUutraf is a program that analyzes the output of uucico log files, and Xproduces a summary of activity. It works with both old style UUCP and XAT&T's BNU or HoneyDanBer UUCP. It requires no special privileges to Xexecute. It makes no shell calls. X X[ The old-style SYSLOG parsing code for systems other than ULTRIX 4.2 Xmay not work so well just now.... --woods ] X XUutraf is similar to, but more extensive than, the "uusub" utility Xthat was supplied with AT&T UNIX System V's running the old-style UUCP. X XNote that while HDB-UUCP does record a user-name for each transfer, Xthis user name may be either a local name, or a remote name, and it is Ximpossible to tell which without knowing which system the request was Xoriginally submitted from (which is only possible by matching up the XPID to the uucico logs, and then tracing back through the uucp and uux Xlogs for the given system in an attempt to match the job to a request). XAs a result, uutraf does not attempt to report statistics by user. X X XTO COMPILE X X XCopy the file "externhdr.shar" into the directory where you keep Xsource for local header files (eg.: ../head), and unshar it. Then Xcopy the enclosed header files into your local include directory. X XSysdefs.h in particularly, and libc.h to a lesser extent, may require Xmodification to suit your local system's compiler environment. X(Please send any changes to the authors, thanks!) X X[These header files are used for several projects and are maintained Xseparately on one of the author's machines. He recommends you should Xupdate your local include directory should you run across any newer Xversion(s). Future patches will also be kept separate for these Xfiles, and may even appear separately from packages that use them.] X X[[Also note that if you do not install these header files, along with Xdlst.h, in a local include directory, and if you have a non-standard Xpre-processor (cpp), you'll likely have to set INCDIR to '.' in the XMakefile and copy dlst.h into the uutraf source directory.]] X XGo back to where you unpacked the uutraf shar file. X XCopy the file "dlst.shar" into a new sub-directory wherever you keep Xthe sources for your local libraries (eg.: ../lib/dlst), unshar it and Xread the enclosed file "README", then build and install as per the Xinstructions in the README. You'll need libdlst.a and dlst.h in Xappropriate local places to compile and link uutraf itself. X XGo back to where you unpacked the uutraf shar file. X XIf your system needs strtok(3c) and/or getopt(3c), unshar the file X"externsrc.shar" in the current directory. [You may wish to use Xeither the strtok.c from this shar, or the pdstrtok.c included in the Xmaster shar. Make your decision and rename as appropriate.] X XCopy "Makefile-dist" to "Makefile" and edit: SYSTYPE, OPTIM, CFLAGS, XLDFLAGS, LIBS, BIN, and MAN. X X XNOTES & HINTS: X X - AT&T 3b1 (or UNIX PC, or 7300) are truly just SYSVR2. X X - Some SysVr4's may need both SYSVR4 & _POSIX_SOURCE, though X Solaris 2.0 seems to need only SYSVR4 in pure ANSI mode. X X - Beta SysVr4's may need USE_STDLIB too (non-ANSI C compiler, X eg. NEC EWS/UP 4800's running UX 4.0 at least up to release X 5.1, which also needs DUMB_VOID). X X - AIX v3.x users should use _POSIX_SOURCE, and must compile X *outside* of the BSD compatibility environment, as that X defines _BSD, and makes a real mess of the system include X files. X X - SunOS 4.1.2 with acc doesn't like _POSIX_SOURCE either, and X also seems to have trouble with __STDC__. Solaris 2.0 X [sparc] is happy with just -DSYSVR4. X X - If you're not SYSVR3, you'll need to remove the "-lc_s" (and X probably the "-lmalloc" too) from the definition of LIBS, and X may want to add in your own systems shared library option, X if necessary. X X - SCO UNIX needs SYSVR3 & _POSIX_SOURCE, even though I don't X see how it can claim 1003.1 conformance.... X X - Modern version of Pyramid OSx (i.e. the old Dual Universe X OS) works best if compiled in the "att" universe with X -D_POSIX_SOURCE -ZPOSIX -Xt (POSIX & ANSI-C with X compatibility). You'll also have to change the X '-L$(LIBDIR)' option in $(LDFLAGS) to '-Wl,-L$(LIBDIR)' to X find the right local libraries (i.e. path to libdlst.a). X Also check code surrounded by "#ifdef pyr", especially if X you run UUCP over TCP/IP. X X - Older versions of Pyramid OSx may work in the "ucb" universe X if compiled with -DBSD, though there may be problems with X the typedefs in <sysdefs.h>. Also check code surrounded by X "#ifdef pyr", especially if you run UUCP over TCP/IP. X X - Older systems may need BSDOBJS uncommented. X X - Most versions of the UNIX PCC compiler will need DUMB_VOID. X X - DEBUG, OPTIM, & SDB should be set for defaults, and then X modified on the command line for debugging, etc. X XFinally, copy "defs.h-dist" to "defs.h" and edit to suit. X XWe assume "pyr" will be defined on Pyramid OSx machines (you may need Xto fix this for DC/OSx, as that one has HDB-UUCP, as it may cause Xclashes, since the ifdef'ed code was meant to support Pyramid's weird Xidea of identifying TCP transfers in the SYSLOG file). This code Xcompiles on both OSx and DC/OSx, but has only been run on a valid data Xfile on DC/OSx. X XWe assume either "ultrix" or "__ultrix__" will be defined on ULTRIX Xmachines. This code has not actually been compiled on ULTRIX, but the XSYSLOG parsing does work for ULTRIX 4.2 UUCP logs. X XIf you don't have HoneyDanBer-UUCP, and you're not running ULTRIX 4.2, Xyou may have to fix some of the parsing in uutraf.c:procfile() to Xhandle your system's /{usr,var}/spool/uucp/SYSLOG format. (Please Xsend changes back to the authors.) X XNote: It seems Taylor-UUCP doesn't have any useful statistics Xavailable yet. X XOnce you've tailored Makefile and defs.h, just type "make", and it Xshould produce an executable called 'uutraf'. X XTest! (Just running it should display current summary.) If you have Xtrouble try 'make DEBUG=-DDEBUG SDB=-g OPTIM=' and experiment with Xyour debugger. X XIf it runs okay, type "make install clobber". X X XMANUALS & DOCUMENTATION X XThe file "uutraf.1" contains the [nt]roff source for a manual page. X XIf you do not have nroff, I would suggest you track down Henry XSpencer's "awf" from an archive near you. (It is a minimal nroff Xclone written in awk.) On the other hand, you can easily read the Xmanual source too! X X X#ident "@(#)uutraf:README 1.1.2.7 92/11/08 16:26:00 (woods)" X-- XGreg Hackney XSouthwestern Bell Telephone Co. Xhack@texbell.swbt.com # no longer valid.... XDallas, Texas X XGreg A. Woods XElegant Communications Inc. Xwoods@Elegant.COM, woods@robohack.UUCP XToronto, Ontario X END_OF_FILE if test 6725 -ne `wc -c <'README'`; then echo shar: \"'README'\" unpacked with wrong size! fi # end of 'README' fi if test -f 'RELEASES' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'RELEASES'\" else echo shar: Extracting \"'RELEASES'\" \(36 characters\) sed "s/^X//" >'RELEASES' <<'END_OF_FILE' X90/02/02-00:00:00 X92/11/08-16:36:33 END_OF_FILE if test 36 -ne `wc -c <'RELEASES'`; then echo shar: \"'RELEASES'\" unpacked with wrong size! fi # end of 'RELEASES' fi if test -f 'defs.h-dist' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'defs.h-dist'\" else echo shar: Extracting \"'defs.h-dist'\" \(2439 characters\) sed "s/^X//" >'defs.h-dist' <<'END_OF_FILE' X/* X * defs.h - configuration for uutraf X */ X X#define SID_H "@(#)uutraf:defs.h-dist 1.2.2.5 92/10/23 10:27:14 (woods)" X#define SID_NM defs_sccsid X#include <sccsid.h> X X/* X * This file contains user defined parameters X */ X X#define HAVE_HDBUUCP 1 /* HoneyDanBer-UUCP xferstats? */ X X#ifdef HAVE_HDBUUCP X# if defined(sun4) || defined(SYSVR4) X# define STATFILE "/var/uucp/.Admin/xferstats" X# else X# if defined(_AIX) && defined(_IBMR2) /* really should be AIX 3.2.x */ X# define STATFILE "/var/spool/uucp/.Admin/xferstats" X# else X# define STATFILE "/usr/spool/uucp/.Admin/xferstats" X# endif X# endif X#else X# if defined(ultrix) || defined(__ultrix__) || defined(BSD4_3) X# define STATFILE "/var/spool/uucp/SYSLOG" /* all the same? */ X# else X# define STATFILE "/usr/spool/uucp/SYSLOG" /* all the same? */ X# endif X#endif X X#if defined(_AIX) && !defined(_IBMR2) /* really should be AIX 3.1.x ??? */ X# define NAME_MAX PATH_MAX /* they say you should use pathconf() */ X#endif X X/* X * default report to print (you might want to add in SYSBYPORT_OPT (with X * SYS_RPT)) X */ X#define DEFAULT_RPT (HEADERS | SYS_RPT | PORT_RPT | SUMM_RPT) X X/* X * default way to sort (both node and port sections) X */ X#define DEFAULT_SORT (RECEIVED | XMIT) /* Total number of bytes */ X X/* you can instead pick from one of these for the default sorting method. X * X * Sort by number of bytes X * #define DEFAULT_SORT (RECEIVED) X * #define DEFAULT_SORT (XMIT) X * #define DEFAULT_SORT (RECEIVED | XMIT) X * #define DEFAULT_SORT (RECEIVED | REVERSE) X * #define DEFAULT_SORT (XMIT | REVERSE) X * #define DEFAULT_SORT (RECEIVED | XMIT | REVERSE) X * X * Sort by transfer rate X * #define DEFAULT_SORT (R_CPS) X * #define DEFAULT_SORT (X_CPS) X * #define DEFAULT_SORT (R_CPS | X_CPS) X * #define DEFAULT_SORT (R_CPS | REVERSE) X * #define DEFAULT_SORT (X_CPS | REVERSE) X * #define DEFAULT_SORT (R_CPS | X_CPS | REVERSE) X * X * Sort by number of file transactions X * #define DEFAULT_SORT (R_NUMB) X * #define DEFAULT_SORT (X_NUMB) X * #define DEFAULT_SORT (R_NUMB | X_NUMB) X * #define DEFAULT_SORT (R_NUMB | REVERSE) X * #define DEFAULT_SORT (X_NUMB | REVERSE) X * #define DEFAULT_SORT (R_NUMB | X_NUMB | REVERSE) X * X * Sort by modem clock time X * #define DEFAULT_SORT (R_TIME) X * #define DEFAULT_SORT (X_TIME) X * #define DEFAULT_SORT (X_TIME | R_TIME) X * #define DEFAULT_SORT (R_TIME | REVERSE) X * #define DEFAULT_SORT (X_TIME | REVERSE) X * #define DEFAULT_SORT (X_TIME | R_TIME | REVERSE) X */ X END_OF_FILE if test 2439 -ne `wc -c <'defs.h-dist'`; then echo shar: \"'defs.h-dist'\" unpacked with wrong size! fi # end of 'defs.h-dist' fi if test -f 'externsrc.shar' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'externsrc.shar'\" else echo shar: Extracting \"'externsrc.shar'\" \(8380 characters\) sed "s/^X//" >'externsrc.shar' <<'END_OF_FILE' X#! /bin/sh X# This is a shell archive. Remove anything before this line, then unpack X# it by saving it into a file and typing "sh file". To overwrite existing X# files, type "sh file -c". You can also feed this as standard input via X# unshar, or by typing "sh <file", e.g.. If this archive is complete, you X# will see the following message at the end: X# "End of shell archive." X# Contents: getopt.c strtok.c X# Wrapped by woods@robohack on Sun Nov 8 16:36:48 1992 XPATH=/bin:/usr/bin:/usr/ucb ; export PATH Xif test -f 'getopt.c' -a "${1}" != "-c" ; then X echo shar: Will not clobber existing file \"'getopt.c'\" Xelse Xecho shar: Extracting \"'getopt.c'\" \(4803 characters\) Xsed "s/^X//" >'getopt.c' <<'END_OF_FILE' XX/* XX * getopt.c - the real thing! XX */ XX/* XX * Here's something you've all been waiting for: the AT&T public domain XX * source for getopt(3c). It is the code which was given out at the 1985 XX * UNIFORUM conference in Dallas. I [?who? -gaw] obtained it by XX * electronic mail directly from AT&T. The people there assure me that XX * it is indeed in the public domain. XX */ XX/* XX * The manual page supplied with this version (i.e. smail-2.7) is from C XX * News, and was originally written by Henry Spencer for his Public XX * Domain version of getopt(). XX */ XX/* XX * Several features have been added to the original version. XX * XX * One minor feature has been added that allows the possibility of XX * detecting some missing option arguments by looking for a leading XX * minus sign on the option argument. This feature is enabled by XX * defining NO_MINUS at compile time. XX * XX * Normally stdio(3s) is avoided, since it can significantly increase the XX * size of a programme. If stdio is being used anyway, getopt(3c) can be XX * compiled with USE_STDIO. XX * XX * To prevent getopt() from emitting any error messages, define a nil XX * manifest ERR; eg. "cc -DSYSVR3 -DERR -c getopt.c". XX * XX * In addition, an implementation of the getopt(1) command can be built XX * by defining GETOPT at compile time. XX */ XX XX#define SID "@(#)smail-2:getopt.c 1.1 92/04/20 00:28:11 (woods)" XX#include "sccsid.h" XX XX#ifndef lint /* supposedly from this version: */ XXstatic char *orig_sccsid = "@(#)libc-port:gen/getopt.c\t1.9\t(AT&T)"; XX#endif XX XX#if defined(SYSVR2) || defined(SYSVR3) || defined(SYSVR4) XX# ifndef SYSV XX# define SYSV XX# endif XX#endif XX XX#if !defined(SYSV) && !defined(__STDC__) && !defined(_POSIX_SOURCE) XX# define strchr index XX# define strrchr rindex XX#endif XX XX#ifndef NULL XX# define NULL 0 XX#endif XX#ifndef EOF XX# define EOF (-1) XX#endif XX#ifndef STDERR XX# define STDERR 2 XX#endif XX XX#ifdef GETOPT XX# ifndef USE_STDIO XX# define USE_STDIO 1 XX# endif XX#endif XX XX#ifndef ERR XX# ifndef USE_STDIO XX# define ERR(msg, ch) if (opterr) { \ XX static char errbuf[3] = "?\n"; \ XX errbuf[0] = ch; \ XX (void) write(STDERR, argv[0], strlen(argv[0])); \ XX (void) write(STDERR, msg, strlen(msg)); \ XX (void) write(STDERR, errbuf, 2); \ XX } XX# else XX# include <stdio.h> XX# define ERR(msg, ch) if (opterr) { \ XX (void) fputs(argv[0], stderr); \ XX (void) fputs(msg, stderr); \ XX (void) fputc(ch, stderr); \ XX (void) fputc('\n', stderr); \ XX } XX# endif XX#else XX# undef ERR XX# define ERR(msg, ch) {;} /* we must be VERY careful with ERR() */ XX#endif XX XX/* these should be safe, even on broken ANSI-C like compilers... */ XXextern int strcmp(); XXextern char *strchr(); XXextern char *strrchr(); XX XX/*LINTLIBRARY*/ XX XXint opterr = 1; XXint optind = 1; XXint optopt = 0; XXchar *optarg = 0; XX XXint XXgetopt(argc, argv, opts) XX int argc; XX char *argv[]; XX char *opts; XX{ XX static int sp = 1; XX register int c; XX register char *cp; XX XX if (sp == 1) { XX if (optind >= argc || argv[optind][0] != '-' || argv[optind][1] == '\0') XX return(EOF); XX else if (strcmp(argv[optind], "--") == NULL) { XX optind++; XX return(EOF); XX } XX } XX optopt = c = argv[optind][sp]; XX if (c == ':' || (cp = strchr(opts, c)) == NULL) { XX ERR(": illegal option -- ", c); XX if (argv[optind][++sp] == '\0') { XX optind++; XX sp = 1; XX } XX return('?'); XX } XX if (*++cp == ':') { XX if (argv[optind][sp+1] != '\0') XX optarg = &argv[optind++][sp+1]; XX else if (++optind >= argc) { XX ERR(": option requires an argument -- ", c); XX sp = 1; XX return('?'); XX#ifndef NO_MINUS XX } else XX optarg = argv[optind++]; XX#else /* NO_MINUS */ XX } else { XX optarg = argv[optind++]; XX if (*optarg == '-') { XX ERR(": option requires an argument -- ", c); XX sp = 1; XX return('?'); XX } XX } XX#endif /* NO_MINUS */ XX sp = 1; XX } else { XX if (argv[optind][++sp] == '\0') { XX sp = 1; XX optind++; XX } XX optarg = NULL; XX } XX return(c); XX} XX XX XX XX#ifdef GETOPT XX XX/* XX * borrowed from TransFig's fig2dev XX */ XX#ifndef lint XXstatic char sccspid[] = "@(#) getopt.c 5.1 (WangInst) 6/15/85"; XX#endif XX XX#define ARGCH (int)':' XX#define BADCH (int)'?' XX#define ENDARGS "--" XX XXint XXmain(argc, argv) XX int argc XX char *argv[]; XX{ XX char *optstring = argv[1]; XX char *argv0; XX int opterr = 0; XX int C; XX char *opi; XX XX extern int optind; XX extern char *optarg; XX extern char *strrchr(); XX extern char *strchr(); XX XX argv0 = (argv0 = strrchr(argv[0], '/')) ? argv0 + 1 : &argv[0]; XX if (argc == 1) { XX (void) fprintf(stderr, "Usage: %s optstring args ...\n", argv0); XX exit(2); XX } XX argv++; XX argc--; XX argv[0] = argv0; XX while ((C = getopt(argc, argv, optstring)) != EOF) { XX if (C == BADCH) XX opterr++; XX (void) printf("-%c ", C); XX opi = strchr(optstring, C); XX if (opi && opi[1] == ARGCH) XX if (optarg) XX (void) printf("\"%s\" ", optarg); XX else XX opterr++; XX } XX (void) printf("%s", ENDARGS); XX while (optind < argc) XX printf(" \"%s\"", argv[optind++]); XX putchar('\n'); XX exit(opterr); XX} XX XX#endif /* GETOPT */ XEND_OF_FILE Xif test 4803 -ne `wc -c <'getopt.c'`; then X echo shar: \"'getopt.c'\" unpacked with wrong size! Xfi X# end of 'getopt.c' Xfi Xif test -f 'strtok.c' -a "${1}" != "-c" ; then X echo shar: Will not clobber existing file \"'strtok.c'\" Xelse Xecho shar: Extracting \"'strtok.c'\" \(2009 characters\) Xsed "s/^X//" >'strtok.c' <<'END_OF_FILE' XX/* XX * Copyright (c) 1988 Regents of the University of California. XX * All rights reserved. XX * XX * Redistribution and use in source and binary forms are permitted XX * provided that: (1) source distributions retain this entire copyright XX * notice and comment, and (2) distributions including binaries display XX * the following acknowledgement: ``This product includes software XX * developed by the University of California, Berkeley and its contributors'' XX * in the documentation or other materials provided with the distribution XX * and in all advertising materials mentioning features or use of this XX * software. Neither the name of the University nor the names of its XX * contributors may be used to endorse or promote products derived XX * from this software without specific prior written permission. XX * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR XX * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED XX * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. XX */ XX XX#if defined(LIBC_SCCS) && !defined(lint) XXstatic char sccsid[] = "@(#)strtok.c 5.7 (Berkeley) 6/1/90"; XX#endif /* LIBC_SCCS and not lint */ XX XX#include <stddef.h> XX#include <string.h> XX XXchar * XXstrtok(s, delim) XX register char *s, *delim; XX{ XX register char *spanp; XX register int c, sc; XX char *tok; XX static char *last; XX XX XX if (s == NULL && (s = last) == NULL) XX return (NULL); XX XX /* XX * Skip (span) leading delimiters (s += strspn(s, delim), sort of). XX */ XXcont: XX c = *s++; XX for (spanp = delim; (sc = *spanp++) != 0;) { XX if (c == sc) XX goto cont; XX } XX XX if (c == 0) { /* no non-delimiter characters */ XX last = NULL; XX return (NULL); XX } XX tok = s - 1; XX XX /* XX * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). XX * Note that delim must have one NUL; we stop if we see that, too. XX */ XX for (;;) { XX c = *s++; XX spanp = delim; XX do { XX if ((sc = *spanp++) == c) { XX if (c == 0) XX s = NULL; XX else XX s[-1] = 0; XX last = s; XX return (tok); XX } XX } while (sc != 0); XX } XX /* NOTREACHED */ XX} XEND_OF_FILE Xif test 2009 -ne `wc -c <'strtok.c'`; then X echo shar: \"'strtok.c'\" unpacked with wrong size! Xfi X# end of 'strtok.c' Xfi Xecho shar: End of shell archive. Xecho "Modules for libfake..." Xexit 0 END_OF_FILE if test 8380 -ne `wc -c <'externsrc.shar'`; then echo shar: \"'externsrc.shar'\" unpacked with wrong size! fi # end of 'externsrc.shar' fi if test -f 'patchlevel.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'patchlevel.h'\" else echo shar: Extracting \"'patchlevel.h'\" \(141 characters\) sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE' X/* X * patchlevel.h X */ X X/* Patch #: 00 */ X/* Version #: 02 */ X/* Sub-Ver #: 00 */ X X#define VER_ID 2 X#define VER_SUB 0 X#define PATCHLEVEL 0 END_OF_FILE if test 141 -ne `wc -c <'patchlevel.h'`; then echo shar: \"'patchlevel.h'\" unpacked with wrong size! fi # end of 'patchlevel.h' fi if test -f 'pdstrtok.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'pdstrtok.c'\" else echo shar: Extracting \"'pdstrtok.c'\" \(912 characters\) sed "s/^X//" >'pdstrtok.c' <<'END_OF_FILE' X/* File : strtok.c X Original Author : Richard A. O'Keefe. X Dated: 11 April 1984 X Public domain X X @(#) FILE: strtok.c X @(#) Release: 1.1 X @(#) Rel. Date: 2/2/90 X @(#) By: Greg Hackney (hack@texbell.swbt.com) X X*/ X X#ifdef SCCSID Xstatic char sccsid[] = "@(#) file strtok.c : rel 1.1 : mod 2/2/90"; X#endif X X Xstatic char *oldSrc = ""; Xint _set_ctr = 127; Xchar _set_vec[128]; X X#ifdef BSD Xchar *strtok(src, set) X register char *src; X char *set; X { X char *save; X X _str2set(set); X if (src == (char *)0) src = oldSrc; X while (_set_vec[*src] == _set_ctr) src++; X if (!*src) return (char *)0; X save = src; X while (_set_vec[*++src] != _set_ctr) ; X *src++ = 0; X oldSrc = src; X return save; X } X X_str2set(set) X register char *set; X { X if (set == (char *)0) return; X if (++_set_ctr == 128) { X _set_ctr = 1; X } X while (*set) _set_vec[*set++] = _set_ctr; X } X#endif X END_OF_FILE if test 912 -ne `wc -c <'pdstrtok.c'`; then echo shar: \"'pdstrtok.c'\" unpacked with wrong size! fi # end of 'pdstrtok.c' fi if test -f 'uutraf.1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'uutraf.1'\" else echo shar: Extracting \"'uutraf.1'\" \(6276 characters\) sed "s/^X//" >'uutraf.1' <<'END_OF_FILE' X'\" X'\" uutraf.1 - uutraf manual page X'\" X.ds iD "#ident ``@(#)uutraf:uutraf.1 1.1.2.7 92/10/23 10:21:28 (woods)'' X'\" X'\" command-line control (-rXn) for the .TH arguments: X.nr X X.if \nX=0 .ds x} UUTRAF 1 "Local UUCP Utilities" "\&" X.if \nX=1 .ds x} UUTRAF 1 "Local UUCP Utilities" X.if \nX=2 .ds x} UUTRAF 1 "" "\&" X.if \nX=3 .ds x} UUTRAF "" "" "\&" X.\" X.\" Fixed-width "code" font. (`.ds C CW') X.\" X.if t .ds C CW X.if n .ds C B X.\".fp 7 \*C \" you may need to load this font too X.\" X.\" Use this as .ft \*C (remember the .ft P) X.\" X.\" In-line select a font for programme text appearing `inline' in X.\" the text. Use the same selection choices as for code blocks. X.\" Prepend `\&' in case the trailing arg starts w/ a period. X.\" X.\" Usage: X.\" .eP foo (`foo' in code font) X.\" .eP foo mp (`foomp', `foo' in code font, `mp' not) X.\" .eP foo mp ka (`kafoomp', `foo' in code font, rest not) X.\" X.\" Sorry it's not too intuitive, but that's troff for ya! Anything X.\" better would be many lines of if's checking no. of args. X.\" X.de eP X. nh X\&\\$3\c X. ft \\*C X\\$1\fP\\$2\" fixed-width font (not broke...) X. hy X.. X.\" A wee bit of neat stuff to get tabs to work with .ft \*C X.\" X.ft \*C X.nr x \w' '\" find width of 8 spaces. X.ft P X.rm DT X.de DT\"default tabs X.\" set tabs using width calculated above X.ta \nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu X.. X.\" X'\" [borrowed from Larry Wall's rn] X.\" Set up \*(-- to give an unbreakable dash; X.\" string Tr holds user defined translation string. X.\" Bell System Logo is used as a dummy character. X.\" X.tr \(bs-|\(bv\*(Tr X.ie n \{\ X. ds -- \(bs- X. if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch X. if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch X. ds L" "" X. ds R" "" X. ds L' ' X. ds R' ' X' br\} X.el\{\ X. ds -- \(em\| X. tr \*(Tr X. ds L" `` X. ds R" '' X. ds L' ` X. ds R' ' X' br\} X.\" X.TH \*(x} X.SH NAME Xuutraf \- UUCP file transfer statistics report generator X.SH SYNOPSIS X.B uutraf X[ X.I options X] [ X.I xferstat_file X| X.B - X] X.br X.SH DESCRIPTION X.I uutraf Xanalyses X.I UUCP Xlog files, and provides a report on transfer statistics, using a Xdefault sorting format, or an optional user specified sorting format. X.SH OPTIONS X.TP 0.5i X.B \-H Xinclude the header lines for restricted report forms. X.TP X.B \-N Xrestrict the report to the nodes (sites) summary. X.TP X.B \-P Xrestrict the report to the ports summary. (Not available on some Xsystems, such as ULTRIX 4.2.) X.TP X.B \-S Xrestrict the report to totals summary. X.TP X.B \-M Xmerge per-port sub-totals for each node. This option implies the Xsetting of X.BR \-N . X(Not available on some systems, such as ULTRIX 4.2.) X.TP X.B \-s Xtake the input from stdin rather than a file. X.TP X.B \-V Xdisplay version identification information X.TP X.B \-h X.TP 1i X.B \-a Xsort in ascending order, rather than descending. X.TP X.B \-n Xsort by name (over-rides following options). X.TP X.BR \-b [ r|x|b ] Xsort by number of bytes \fBR\fPeceived, transmitted(\fBX\fP), or \fBB\fPoth. X.TP X.BR \-c [ r|x|b ] Xsort by transfer rate \fBR\fPeceived, transmitted(\fBX\fP), or \fBB\fPoth. X.TP X.BR \-f [ r|x|b ] Xsort by number of files \fBR\fPeceived, transmitted(\fBX\fP), or \fBB\fPoth. X.TP X.BR \-t [ r|x|b ] Xsort by connect time in \fBR\fPeceived, transmitted(\fBX\fP), or \fBB\fPoth. Xdisplay a more verbose help message X.SH EXAMPLES X.eP "uutraf \-bb" Xwill display the total bytes transferred, in descending order. (This is Xthe default.) X.PP X.eP "uutraf \-cx" Xwill display the connections with the fastest transfer rates, in Xdescending order. X.PP X.eP "uutraf \-tba" Xwill display the connections by total amount of transfer time, in Xascending sort order. X.\" X.SH BUGS XMultiple sorting options may not work as you would hope, and the Xsorting option syntax goes against de-facto rules for option syntax. X.PP XThe X.B \-s Xoption is redundant. ('-' is also valid) XThe X.B \-H Xoption alone does nothing with the standard defaults (it is default!). XThe X.B \-M Xoption alone does imply X.B \-N Xbut does not automatically supplement the standard defaults. X.PP XThere is no header part in the totals summary, and no way to get the Xdescriptive text to go away leaving only the numbers. X.PP XThe field widths and formats are all fixed. X.\" X.SH NOTES XULTRIX (and presumably other 4BSD) UUCP's don't report fractions of a Xsecond, and thus high-speed links may report incorrect average X.PP XULTRIX (and presumably other 4BSD) UUCP's don't report the device Xname, and thus all options and reports referring to ports are not Xavailable. Connection counts are not available either, as the Xprocess-ID's are not reported. X.PP XTransfer times alone do not necessarily reflect true port utilisation. XWith HDB-UUCP's log it is likely possible to deduce the amount of time Xspent between jobs, but not the amount of dial and/or disconnect time. X.PP XSome X.IR uucico 's Xskew transfer times and transfer rates by not resetting their timers Xat the appropriate point. In this case, and in the case where the Xsender must wait for a slow receiver to checksum the data before Xcompleting the job, the transfer rates will not be representative of Xthe low-level throughput on the port. Modems that spoof UUCP's Xprotocol, and/or contain large buffers will also skew these figures. X.PP XAlthough HDB-UUCP's log files format transfer times in milli-seconds, Xmost UNIX systems do not have timer resolutions better than one Xhundredth's of a second. Small jobs, or high transfer rates, will Xthen have in-accurate transfer times, and thus incorrect average Xtransfer rates. X.PP XComments and bug reports are welcomed. Please send them to X.eP <woods@robohack.uucp> Xor X.eP <woods@Elegant.COM> . X.\" X.SH AUTHORS XGreg Hackney X.eP <hack@texbell.swbt.com> X\- wrote the original. X.br XGreg A. Woods X.eP <woods@robohack.uucp> X\- wrote the X.B dlst Xlibrary, added new features. X.\" X.SH CONTRIBUTORS XDoug Davis X.eP <doug@letni.uucp> , XDavid Butler X.eP <gdb@ninja.uucp> , XBud Hovell X.eP <bhh@whizz.uucp> , XDavid Kaelbing X.eP <drk@igor.uu.net> , XJoe Garvey X.eP <garvey%cmic@mips.com> , XD'Arcy Cain X.eP <darcy@druid.com> , XGeorg S. Nikodym X.eP <georgn@noweh.com> , XBill Duncan X.eP <bduncan@ve3ied.uucp> , XRobert Story X.eP <rstory@elegant.com> X.\" X.SH VERSION X.eP "\\*(iD X END_OF_FILE if test 6276 -ne `wc -c <'uutraf.1'`; then echo shar: \"'uutraf.1'\" unpacked with wrong size! fi # end of 'uutraf.1' fi if test -f 'uutraf.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'uutraf.h'\" else echo shar: Extracting \"'uutraf.h'\" \(4183 characters\) sed "s/^X//" >'uutraf.h' <<'END_OF_FILE' X/* X * uutraf.h - common header for uutraf X */ X X#define SID_H "@(#)uutraf:uutraf.h 1.2.2.7 92/10/23 10:26:35 (woods)" X#define SID_NM uutraf_sccsid X#include <sccsid.h> X X/* X * these defines are part of the sort routine to figure out how to sort the X * linked list X */ X#define REVERSE 00001 /* reverse the order, least to most */ X#define RECEIVED 00002 /* sort by received */ X#define XMIT 00004 /* sort by xmit */ X#define R_TIME 00010 /* sort by received time */ X#define X_TIME 00020 /* sort by xmit time */ X#define R_CPS 00100 /* sort by characters RECEIVED per second */ X#define X_CPS 00200 /* sort by characters TRANSMITTED per second */ X#define R_NUMB 01000 /* sort by number of RECEIVED transactions */ X#define X_NUMB 02000 /* sort by number of TRANSMITTED transactions */ X X/* X * print options X */ X#define HEADERS 001 X#define SYS_RPT 002 X#define PORT_RPT 004 X#define SUMM_RPT 010 X#define SYSBYPORT_OPT 020 X X/* X * other various things X */ X#ifdef HAVE_HDBUUCP /* Most BNU (aka. HDB) systems */ X# define OUT "->" /*uucp flow direction indicator*/ X# define IN "<-" /*uucp flow direction indicator*/ X#else /* Most "old" UUCP's (i.e. with SYSLOG) */ X# define OUT "sent" X# define IN "received" X#endif X X#ifdef pyr /* UUCP via TCP/IP on an ATT Pyramid */ X#define T_OUT "t->" /* t protocol outgoing */ X#define T_IN "t<-" /* t protocol incoming */ X#define F_OUT "f->" /* f protocol outgoing */ X#define F_IN "f<-" /* f protocol incoming */ X#endif X X/* X * structures for storing totals and summary results X */ Xtypedef struct port { X long p_xmit; /* # of bytes sent on this device */ X float p_xmit_time; /* total seconds xmit'ing on this device */ X long p_xmit_cnt; /* total number of files sent */ X long p_recv; /* # of bytes rec'd on this device */ X float p_recv_time; /* total seconds rec'ing on this device */ X long p_recv_cnt; /* total number of files received */ X int p_in_conn; /* total number of slave connections */ X int p_out_conn; /* total number of master connections */ X int p_lastpid; /* pid found in previous data line */ X llst_t *p_syslst; /* per-system summary */ X char p_dname[NAME_MAX + 1]; /* device name (not path) */ X} PORT; X Xtypedef struct link { X long l_xmit; /* # of bytes sent to remote system */ X float l_xmit_time; /* total seconds spent in transmit */ X long l_xmit_cnt; /* total number of files sent */ X long l_recv; /* # of bytes rec'd from remote system */ X float l_recv_time; /* total seconds spent in receive */ X long l_recv_cnt; /* total number of files received */ X int l_in_conn; /* total number of slave connections */ X int l_out_conn; /* total number of master connections */ X int l_lastpid; /* pid found in previous data line */ X llst_t *l_portlst; /* per-port summary */ X char l_sysname[1]; /* name of remote system */ X} LINK; X Xtypedef struct summ { X int syscnt; /* total active sites */ X int devcnt; /* total active ports */ X long bytes_recv; /* total bytes received */ X long bytes_xmit; /* total bytes transmitted */ X float sec_recv; /* total seconds spent in receive */ X float sec_xmit; /* total seconds spent in transmit */ X long num_recv; /* total number of files received */ X long num_xmit; /* total number of files transmitted */ X long num_in_conn; /* total number of slave connections */ X long num_out_conn; /* total number of master connections */ X struct tm first_rec; /* timestamp in first record seen */ X struct tm last_rec; /* timestamp in last record seen */ X} SUMM; X Xstatic Xchar usage[]="\n\ X\t-H\tinclude headers in non-default report\n\ X\t-M\tprint merged port summary by system (implies -N)\n\ X\t-N\tprint nodes summary\n\ X\t-P\tprint ports summary\n\ X\t-S\tprint total summary\n\ X\t-V\tprint version identification\n\ X\t-a\tsort in ascending vs. descending order\n\ X\t-b[rxb]\tsort by total bytes rec'd, xmit'ed, or both\n\ X\t-c[rxb]\tsort by chars per second rec'd, xmit'ed, or both\n\ X\t-f[rxb]\tsort by # of files rec'd, xmit'ed, or both\n\ X\t-h\tprint this help message\n\ X\t-n\tsort by {system,port} name (must be used alone)\n\ X\t-s\tuse standard input instead of default xferstats file\n\ X\t-t[rxb]\tsort by total clock time in rec, xmit, or both\n"; END_OF_FILE if test 4183 -ne `wc -c <'uutraf.h'`; then echo shar: \"'uutraf.h'\" unpacked with wrong size! fi # end of 'uutraf.h' fi if test -f 'version.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'version.c'\" else echo shar: Extracting \"'version.c'\" \(172 characters\) sed "s/^X//" >'version.c' <<'END_OF_FILE' X/* X * version.c X */ X X#define SID "@(#)uutraf:version.c 1.1 92/10/12 15:09:06 (woods)" X#include <sccsid.h> X X#include "patchlevel.h" X#include <intern.h> X#include "version.h" END_OF_FILE if test 172 -ne `wc -c <'version.c'`; then echo shar: \"'version.c'\" unpacked with wrong size! fi # end of 'version.c' fi if test -f 'version.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'version.h'\" else echo shar: Extracting \"'version.h'\" \(454 characters\) sed "s/^X//" >'version.h' <<'END_OF_FILE' X/* X * version.h X */ X X#define SID_H "@(#)uutraf:version.h 1.2 92/10/12 16:06:30 (woods)" X#define SID_NM version_sccsid X#include <sccsid.h> X X/* X * const: readonly type qualifier (use may break some pre-ANSI compilers!) X */ X#if (__STDC__ - 0) == 0 && !defined(const) X# define const /* Only in ANSI C. Pity */ X#endif /* !__STDC__ */ X XEXT const short version INIT(VER_ID); XEXT const short subver INIT(VER_SUB); XEXT const short patchlevel INIT(PATCHLEVEL); END_OF_FILE if test 454 -ne `wc -c <'version.h'`; then echo shar: \"'version.h'\" unpacked with wrong size! fi # end of 'version.h' fi echo shar: End of archive 1 \(of 4\). cp /dev/null ark1isdone MISSING="" for I in 1 2 3 4 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 4 archives. echo "Please read the file README first" rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0