From: utzoo!decvax!harpo!floyd!cmcl2!philabs!sdcsvax!sdccsu3!sdcrdcf!trw-unix!trwspp!zemon Newsgroups: net.unix-wizards Title: UUCP analysis Article-I.D.: trwspp.16 Posted: Wed Apr 20 11:52:32 1983 Received: Wed Apr 27 05:25:51 1983 What with all the discussion about UUCP lately, I humbly submit the following two awk scripts. They will produce some simple analyses of your UUCP traffic. The first examines LOGFILE and produces a report by system indicating the number of attempted calls that succeeded, the number that failed, and the number that were "locked". The locked calls were attempted when a conversation was already in progress with the call-ed machine. It also reports on every attempt to call a system when the phone line was not available (perhaps tied up by CU or another incarnation of UUCP). The second examines SYSLOG and produces a report of the volume of UUCP traffic by both system and by user. The report consists of a number of sections. The first gives the total number of bytes received and sent. Second gives the number of bytes received by system. Third gives the number of bytes sent to each system. Fourth gives what I call the "balance of bytes" for each system. This is simply bytes received - bytes sent and gives some indication of which way the bulk of the messages are flowing. Finally, a count of the number of messages (not bytes) for each user is given. This can be somewhat misleading 'cuz uucico does funny things with the user name column in SYSLOG. Well, enough intro. Here they are (each followed by an example of its output): ============================================================ LOGFILE analyzer: BEGIN { no_dev = 0; } $4 ~ /NO/ { if ( $6 == "DEVICE)" ) { temp = sprintf("%s\t%s", $2, $3); if ( nose[no_dev - 1] != temp ) nose[no_dev++] = temp; } } $5 ~ /\(call/ { if ( $4 == "SUCCEEDED" ) ++succeed[$7]; else if ( $4 == "FAILED" ) ++fail[$7]; else if ( $4 == "LOCKED" ) ++locked[$7]; else print $0 } END { printf("UUCP success/failure summary\n\n"); for ( i in succeed ) { printf("%s\t%d successes\n\t%d failures\n", i, succeed[i], fail[i]); if ( locked[i] > 0 ) printf("\t%d locked\n", locked[i]); printf("\n"); } printf("\nNO AVAILABLE DEVICE\n"); for(i=0; i