From: edwin@cs.ruu.nl (Edwin Kremer)
Newsgroups: news.software.nntp,comp.sources.bugs
Subject: nestor patch #05 (low priority) Part 01/01
Summary: nestor 1.0PL5 released via anonymous ftp from ftp.cs.ruu.nl
Date: 11 Jan 93 14:15:12 GMT
Organization: Utrecht University, Dept. of Computer Science
X-Comp-Archives-Magic-Cookie: ftp.cs.ruu.nl:/pub/UNIX/nestor.tar.Z


Here is a SHARred low-priority patch for  the  ``nestor''  program.   It
fixes some bugs and includes a first attempt to support "nntpxfer".
  If  you  are  currently using nestor 1.0PL4 please apply this patch to
upgrade to 1.0PL5.  If  you're  unfamiliar  with  nestor  or  running  a
pre-1.0PL4  version  of nestor, I encourage you to pickup a complete new
release from our archive -- see details below.

------------------------------------------------------------------------
***************************  INTRODUCTION  *****************************
------------------------------------------------------------------------
  This is  ``nestor'',  a  program  to  summarize  the  copious  logging
information  from the NNTP Usenet News transport agent (for the curious:
"Nestor" is  short  for  "NEws  STatistics  ORganizer").  ``nestor''  is
distributed under the terms of the GNU General Public License.


------------------------------------------------------------------------
***************************  HOW  TO  GET  *****************************
------------------------------------------------------------------------

  We, Computer Science department, Utrecht University,  are  running  an
anonymous  FTP  server  on  one  of  our systems. In addition to the FTP
service we're also running a mail  server,  for  those  of  you  without
direct Internet access.


--> How to get 'nestor' via anonymous FTP:

    Site:     ftp.cs.ruu.nl  [131.211.80.17]
    Login:    "anonymous" or "ftp"
    Password: your own email address (you@your_domain)
    file:
      /pub/UNIX/nestor.tar.Z


--> How to get 'nestor' via e-mail from our mail-server:

    NOTE: In the following I have assumed that your mail address is
	  "fred_flintstone@stone.age.edu"; of course you must substitute
	  your own address for this.

	  | Please use a VALID DOMAIN ADDRESS.
	  | Use 'hip!hop!user' if you must.
	  | Never use an address which has both '!' and '@' in it.
	  | Bitnetters use user@host.bitnet


    Send the following message to
		mail-server@cs.ruu.nl
    or the old-fashioned path alternative
		uunet!mcsun!sun4nl!ruuinf!mail-server


    begin
    path fred_flintstone@stone.age.edu (SUBSTITUTE _YOUR_ ADDRESS)
    send UNIX/nestor.tar.Z
    end


The path command can be deleted if we receive a valid from address in your
message. If this is the first time you use our mail server, we suggest you
first issue the request:

      send HELP


  A complete "ls-lR" listing of the archive is  kept  in  the  top-level
directory, it will be updated every night. To get it, issue the command:

     send ls-lR.Z


  That's all for now. If you encounter problems using  the  FTP  service
and/or the mail-server, feel free to drop me a line (by e-mail, please).


------------------------------------------------------------------------
********************  HOW  TO  APPLY  THIS  PATCH  *********************
------------------------------------------------------------------------
1. Go to where-ever you keep the nestor sources
2. Save this message into a file
3. Find the '===CUT===HERE===' line and follow the instructions in the
   shell-archive (shar) file direct below it; then return here.
4. Patch nestor using the command:	patch < Patch05
5. Rebuild nestor by doing a:		make
6. Reinstall nestor by doing a:		make install


=================================CUT===HERE===================================

#! /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 shell archive."
# Contents:  Patch05
# Wrapped by edwin@cs.ruu.nl on Mon Jan 11 11:26:25 1993
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Patch05' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Patch05'\"
else
echo shar: Extracting \"'Patch05'\" \(16523 characters\)
sed "s/^X//" >'Patch05' <<'END_OF_FILE'
XIndex: patchlevel.h
X*** ../1.0PL4/patchlevel.h	Sat Jan  4 21:37:53 1992
X--- patchlevel.h	Fri Jan  8 20:04:04 1993
X***************
X*** 16,23 ****
X   *	11-Jun-91 EHK	Safer mem alloc; real-logging period 	1.0 PL2
X   *	08-Jul-91 EHK	Nicer report; longer hostnames allowed	1.0 PL3
X   *	04-Jan-92 EHK	Added nntpxfer; some fixes/enhancements	1.0 PL4
X   *
X   *---------------------------------------------------------------------------
X   */
X  
X! #define PATCHLEVEL	4
X--- 16,24 ----
X   *	11-Jun-91 EHK	Safer mem alloc; real-logging period 	1.0 PL2
X   *	08-Jul-91 EHK	Nicer report; longer hostnames allowed	1.0 PL3
X   *	04-Jan-92 EHK	Added nntpxfer; some fixes/enhancements	1.0 PL4
X+  *	08-Jan-93 EHK	added totals; some fixes as well	1.0 PL5
X   *
X   *---------------------------------------------------------------------------
X   */
X  
X! #define PATCHLEVEL	"5"
XIndex: Changes
X*** ../1.0PL4/Changes	Sun Jan  5 22:12:10 1992
X--- Changes	Sat Jan  9 15:04:27 1993
X***************
X*** 164,166 ****
X--- 164,209 ----
X  	used at all)  caused a "header-only" report to be printed.  Fixed
X  	this by first checking if there's any work to do at all.
X  
X+ Nestor -- 1.0 PL5
X+ =================
X+ Patch #5 was posted in "news.software.nntp" and  "comp.sources.bugs"  on
X+ January 11, 1993
X+ 
X+ Topic:	if all offered articles were rejected, the connection was not shown
X+ From:	Ian Dickinson <vato@csv.warwick.ac.uk>
X+ Added:	Patch #5 [report.c]
X+ 
X+ Topic:	The report now contains totals for each section
X+ From:	Ian Dickinson <vato@csv.warwick.ac.uk>
X+ Added:	Patch #5 [report.c]
X+ 
X+         Ian  really  wanted the totals,  so he sent me the code to handle
X+         this -- once again, thanks Ian.
X+ 
X+ Topic:	"msgid" syslog messages on slow feeds confuse nestor
X+ From:	Ian Dickinson <vato@csv.warwick.ac.uk>
X+ Added:	Patch #5 [scan.c]
X+ 
X+ Topic:	"inews" pathnames slip in occasionally; nestor thinks it's a hostname
X+ From:	EHK
X+ Added:	Patch #5 [scan.c]
X+ 
X+ Topic:	Add extra test to prevent useless work if no statistics found at all
X+ From:	EHK 
X+ Added:	Patch #5 [nestor.c report.c]
X+ 
X+ 	To be honest with you... "useless work" in the topic line  above
X+ 	may be read as "core dump" on some architectures :-)
X+ 
X+ Topic:	'make spotless' should also throw away the local "defs.h" file
X+ From:	EHK
X+ Added:	Patch #5 [Makefile]
X+ 
X+ Topic:	text following #endif violates ANSI standard
X+ From:	EHK
X+ Added:	Patch #5 [support.c]
X+ 
X+ Topic:	changed PATCHLEVEL into a string, to simplify users making local changes
X+ From:	EHK [on request by various people]
X+ Added:	Patch #5 [patchlevel.h nestor.c]
X+ 
XIndex: Makefile
X*** ../1.0PL4/Makefile	Mon Jul  8 16:38:41 1991
X--- Makefile	Fri Jan  8 19:43:07 1993
X***************
X*** 37,43 ****
X  		rm -f nestor $(OBJFILES) core tags
X  
X  spotless	: clean
X! 		rm -f nestor.arc nestor.shar nestor.tar nestor.tar.Z
X  
X  draft		:
X  		a2ps -nr $(SRCFILES) | laser -T
X--- 37,43 ----
X  		rm -f nestor $(OBJFILES) core tags
X  
X  spotless	: clean
X! 		rm -f nestor.arc nestor.shar nestor.tar nestor.tar.Z defs.h
X  
X  draft		:
X  		a2ps -nr $(SRCFILES) | laser -T
XIndex: README
X*** ../1.0PL4/README	Fri Jan  3 23:58:33 1992
X--- README	Tue Aug 18 22:41:28 1992
X***************
X*** 120,126 ****
X  mail-server  archive,  please  let me know so I can inform you of future
X  enhancements (often called 'bug fixes').
X    The latest version of nestor is always available by anonymous FTP from
X! "archive.cs.ruu.nl" [131.211.80.5]
X  
X  
X  NOTE THAT
X--- 120,126 ----
X  mail-server  archive,  please  let me know so I can inform you of future
X  enhancements (often called 'bug fixes').
X    The latest version of nestor is always available by anonymous FTP from
X! "ftp.cs.ruu.nl" [131.211.80.17]
X  
X  
X  NOTE THAT
XIndex: nestor.1
X*** ../1.0PL4/nestor.1	Sat Jan  4 21:34:46 1992
X--- nestor.1	Mon Jan  6 09:47:26 1992
X***************
X*** 1,4 ****
X! .TH NESTOR 1L "RUU-CS Version 1.0PL3"
X  .SH NAME
X  nestor \- NEws STatistics ORganizer
X  .SH SYNOPSIS
X--- 1,4 ----
X! .TH NESTOR 1L "RUU-CS Version 1.0PL5"
X  .SH NAME
X  nestor \- NEws STatistics ORganizer
X  .SH SYNOPSIS
XIndex: nestor.c
X*** ../1.0PL4/nestor.c	Fri Jan  3 22:30:28 1992
X--- nestor.c	Fri Jan  8 21:05:43 1993
X***************
X*** 23,29 ****
X   *---------------------------------------------------------------------------
X   */
X  
X! static	char	*Version = "1.0 PL%d\n";
X  
X  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
X  
X--- 23,29 ----
X   *---------------------------------------------------------------------------
X   */
X  
X! static	char	*Version = "1.0PL%s\n";
X  
X  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
X  
X***************
X*** 173,178 ****
X--- 173,185 ----
X  	SortNntps(nntps);
X  
X  	/* now its time to report to the user what we've found		*/
X+ 
X+ 	if ( num_nntp_hosts == 0 )		/* ... if anything	*/
X+ 	{
X+ 		printf("\nNo NNTP news statistics found in input file: %s\n\n",
X+ 								logfile);
X+ 		exit(0);
X+ 	}
X  
X  	if ( start_date )
X  	{
XIndex: report.c
X*** ../1.0PL4/report.c	Sat Jan  4 21:23:23 1992
X--- report.c	Fri Jan  8 20:55:53 1993
X***************
X*** 3,8 ****
X--- 3,9 ----
X   *	report.c	1.3	02-Apr-91	EHK	Now nice reports
X   *	report.c	1.4	03-Jan-92	EHK	NNTPXFER report added
X   *	report.c	1.4b	04-Jan-92	EHK	Assertions added (any?)
X+  *	report.c	1.5	08-Jan-93	EHK	TOTALS added (by Vato)
X   */
X  
X  #include "nestor.h"
X***************
X*** 19,29 ****
X  		if ( ptr->which )				\
X  			break;					\
X  		else						\
X! 			if ( ++ptr == nntps + num_nntp_hosts )	\
X  				return
X  
X  
X- 
X  /*
X   *---------------------------------------------------------------------------
X   *	Report_nntpd	- generate a nice report on incoming traffic
X--- 20,29 ----
X  		if ( ptr->which )				\
X  			break;					\
X  		else						\
X! 			if ( ++ptr >= nntps + num_nntp_hosts )	\
X  				return
X  
X  
X  /*
X   *---------------------------------------------------------------------------
X   *	Report_nntpd	- generate a nice report on incoming traffic
X***************
X*** 33,41 ****
X--- 33,44 ----
X  Report_nntpd()
X  {
X  	register nntp_t	*np;
X+ 	nntp_t		tot;
X  
X  	ANYTHING_AT_ALL(np,recv_a_acc);		/* any accepted?	*/
X  
X+ 	bzero((char *) &tot, sizeof(nntp_t));
X+ 
X  	printf("\n\n\
X                      *** Incoming Articles Via NntpDaemon ***\
X  	\n\n");
X***************
X*** 46,53 ****
X  
X  	for ( np = nntps ; np < nntps + num_nntp_hosts ; np++ )
X  	{
X! 		if ( np->recv_a_acc )		/* accept anything btw?	*/
X! 		{
X  			printf("%-24.24s %8d %7d %7d %9s %9s %9s\n",
X  				np->nntp_host,
X  				np->recv_a_acc,
X--- 49,56 ----
X  
X  	for ( np = nntps ; np < nntps + num_nntp_hosts ; np++ )
X  	{
X! 		if ( np->recv_a_acc || np->recv_a_rej || np->recv_a_fai )
X! 		{				/* accept anything btw?	*/
X  			printf("%-24.24s %8d %7d %7d %9s %9s %9s\n",
X  				np->nntp_host,
X  				np->recv_a_acc,
X***************
X*** 56,64 ****
X--- 59,82 ----
X  				HHMMSS(np->recv_u_cpu),
X  				HHMMSS(np->recv_s_cpu),
X  				HHMMSS(np->recv_r_cpu));
X+ 
X+ 			tot.recv_a_acc += np->recv_a_acc;
X+ 			tot.recv_a_rej += np->recv_a_rej;
X+ 			tot.recv_a_fai += np->recv_a_fai;
X+ 			tot.recv_u_cpu += np->recv_u_cpu;
X+ 			tot.recv_s_cpu += np->recv_s_cpu;
X+ 			tot.recv_r_cpu += np->recv_r_cpu;
X  		}
X  	}
X  
X+ 	printf("%-24.24s %8d %7d %7d %9s %9s %9s\n",
X+ 		"TOTAL",
X+ 		tot.recv_a_acc,
X+ 		tot.recv_a_rej,
X+ 		tot.recv_a_fai,
X+ 		HHMMSS(tot.recv_u_cpu),
X+ 		HHMMSS(tot.recv_s_cpu),
X+ 		HHMMSS(tot.recv_r_cpu));
X  }
X  
X  /*
X***************
X*** 70,78 ****
X--- 88,99 ----
X  Report_nntpxmit()
X  {
X  	register nntp_t	*np;
X+ 	nntp_t		tot;
X  
X  	ANYTHING_AT_ALL(np,xmit_a_off);		/* any XMIT offered?	*/
X  
X+ 	bzero((char *) &tot, sizeof(nntp_t));
X+ 
X  	printf("\n\n\
X                      *** Outgoing Articles Via NntpXmit ***\
X  	\n\n");
X***************
X*** 94,101 ****
X--- 115,140 ----
X  				HHMMSS(np->xmit_u_cpu),
X  				HHMMSS(np->xmit_s_cpu),
X  				HHMMSS(np->xmit_r_cpu));
X+ 
X+ 			tot.xmit_a_off += np->xmit_a_off;
X+ 			tot.xmit_a_acc += np->xmit_a_acc;
X+ 			tot.xmit_a_rej += np->xmit_a_rej;
X+ 			tot.xmit_a_fai += np->xmit_a_fai;
X+ 			tot.xmit_u_cpu += np->xmit_u_cpu;
X+ 			tot.xmit_s_cpu += np->xmit_s_cpu;
X+ 			tot.xmit_r_cpu += np->xmit_r_cpu;
X  		}
X  	}
X+ 
X+ 	printf("%-23.23s %6d %6d %6d %4d %9s %9s %9s\n",
X+ 		"TOTAL",
X+ 		tot.xmit_a_off,
X+ 		tot.xmit_a_acc,
X+ 		tot.xmit_a_rej,
X+ 		tot.xmit_a_fai,
X+ 		HHMMSS(tot.xmit_u_cpu),
X+ 		HHMMSS(tot.xmit_s_cpu),
X+ 		HHMMSS(tot.xmit_r_cpu));
X  }
X  
X  /*
X***************
X*** 107,115 ****
X--- 146,157 ----
X  Report_nntpxfer()
X  {
X  	register nntp_t	*np;
X+ 	nntp_t		tot;
X  
X  	ANYTHING_AT_ALL(np,xfer_a_off);		/* any XFER offered?	*/
X  
X+ 	bzero((char *) &tot, sizeof(nntp_t));
X+ 
X  	printf("\n\n\
X                      *** Outgoing Articles Via NntpXfer ***\
X  	\n\n");
X***************
X*** 125,132 ****
X--- 167,182 ----
X  				np->nntp_host,
X  				np->xfer_a_off,
X  				np->xfer_a_acc);
X+ 
X+ 			tot.xfer_a_off += np->xfer_a_off;
X+ 			tot.xfer_a_acc += np->xfer_a_acc;
X  		}
X  	}
X+ 
X+ 	printf("%-23.23s %6d %6d\n",
X+ 		"TOTAL",
X+ 		tot.xfer_a_off,
X+ 		tot.xfer_a_acc);
X  }
X  
X  /*
X***************
X*** 138,144 ****
X--- 188,197 ----
X  Report_network()
X  {
X  	register nntp_t	*np;
X+ 	nntp_t		tot;
X  
X+ 	bzero((char *) &tot, sizeof(nntp_t));
X+ 
X  	printf("\n\n\
X                      *** Overall Network Connections Report ***\
X  	\n\n");
X***************
X*** 160,166 ****
X--- 213,236 ----
X  			np->xmit_n_connect,
X  			np->xmit_n_hostfail, np->xmit_n_netfail,
X  			np->recv_n_connect && !np->recv_a_acc ? '*' : ' ');
X+ 
X+ 		tot.recv_n_connect  += np->recv_n_connect;
X+ 		tot.recv_n_hostfail += np->recv_n_hostfail;
X+ 		tot.recv_n_netfail  += np->recv_n_netfail;
X+ 		tot.xmit_n_connect  += np->xmit_n_connect;
X+ 		tot.xmit_n_hostfail += np->xmit_n_hostfail;
X+ 		tot.xmit_n_netfail  += np->xmit_n_netfail;
X  	}
X+ 
X+ 	printf("%-23.23s %7d %9d %9d %7d %9d %8d %c\n",
X+ 		"TOTAL",
X+ 		tot.recv_n_connect,
X+ 		tot.recv_n_hostfail,
X+ 	        tot.recv_n_netfail,
X+ 		tot.xmit_n_connect,
X+ 		tot.xmit_n_hostfail,
X+ 	        tot.xmit_n_netfail,
X+ 	        ' ');
X  }
X  
X  /*
X***************
X*** 172,178 ****
X--- 242,251 ----
X  Report_remote()
X  {
X  	register nntp_t	*np;
X+ 	nntp_t		tot;
X  
X+ 	bzero((char *) &tot, sizeof(nntp_t));
X+ 
X  	printf("\n\n\
X                      *** Remote Clients Usage Report ***\
X  	\n\n");
X***************
X*** 188,199 ****
X  	for ( np = nntps ; np < nntps + num_nntp_hosts ; np++ )
X  	{
X  		if ( np->recv_rr_grp || np->recv_rr_art ||
X! 		     np->recv_p_acc  || np->recv_p_rej  || np->recv_p_fai )
X  			printf("%-23.23s %8d %8d     %10d %10d %10d\n",
X  				np->nntp_host,
X  				np->recv_rr_grp, np->recv_rr_art,
X  				np->recv_p_acc, np->recv_p_rej, np->recv_p_fai);
X  	}
X  }
X  
X  /*
X--- 261,287 ----
X  	for ( np = nntps ; np < nntps + num_nntp_hosts ; np++ )
X  	{
X  		if ( np->recv_rr_grp || np->recv_rr_art ||
X! 		     np->recv_p_acc  || np->recv_p_rej  || np->recv_p_fai ) {
X  			printf("%-23.23s %8d %8d     %10d %10d %10d\n",
X  				np->nntp_host,
X  				np->recv_rr_grp, np->recv_rr_art,
X  				np->recv_p_acc, np->recv_p_rej, np->recv_p_fai);
X+ 
X+ 			tot.recv_rr_grp += np->recv_rr_grp;
X+ 			tot.recv_rr_art += np->recv_rr_art;
X+ 			tot.recv_p_acc  += np->recv_p_acc;
X+ 			tot.recv_p_rej  += np->recv_p_rej;
X+ 			tot.recv_p_fai  += np->recv_p_fai;
X+ 		}
X  	}
X+ 
X+ 	printf("%-23.23s %8d %8d     %10d %10d %10d\n",
X+ 	        "TOTAL",
X+ 		tot.recv_rr_grp,
X+ 	        tot.recv_rr_art,
X+ 		tot.recv_p_acc,
X+ 	        tot.recv_p_rej,
X+ 	        tot.recv_p_fai);
X  }
X  
X  /*
X***************
X*** 206,217 ****
X  Report_smart()
X  {
X  	register nntp_t	*np;
X! 	int	total_conn,
X! 		total_fail;
X! 	float	percent;
X! 	char	*class,
X! 		*not_avail = "n/a";
X  
X  	printf("\n\n\
X                      *** Overall Performance Averages ***\
X  	\n\n");
X--- 294,303 ----
X  Report_smart()
X  {
X  	register nntp_t	*np;
X! 	nntp_t		tot;
X  
X+ 	bzero((char *) &tot, sizeof(nntp_t));
X+ 
X  	printf("\n\n\
X                      *** Overall Performance Averages ***\
X  	\n\n");
X***************
X*** 226,273 ****
X  
X  	for ( np = nntps ; np < nntps + num_nntp_hosts ; np++ )
X  	{
X! 		total_conn = np->recv_n_connect + np->xmit_n_connect;
X! 		total_fail = np->recv_n_netfail + np->xmit_n_netfail;
X  
X! 		if ( total_conn == 0 )
X! 			percent = -1;		/* not available	*/
X! 		else
X! 		  if ( total_fail == 0 )	/* it's pretty good	*/
X  			percent = 0;
X! 		  else
X! 		    percent = ((float) total_fail /
X! 		   	      ((float) total_conn + (float) total_fail)) * 100;
X  
X! 		if ( percent > 25 )
X! 			class = "bad";
X  		else
X! 			if ( percent > 10 )
X! 				class = "moderate";
X  			else
X! 				if ( percent > 3 )
X! 					class = "good";
X  				else
X! 					if ( percent >= 0 )
X! 						class = "excellent";
X! 					else
X! 						class = not_avail;
X  
X! 		printf("%-23.23s ", np->nntp_host);
X! 		if ( np->recv_a_acc )
X! 			printf("%10.2f", np->recv_a_acc / np->recv_r_cpu);
X! 		else
X! 			printf("%10s", not_avail);
X  
X! 		if ( np->xmit_a_acc )
X! 			printf("%15.2f", np->xmit_a_acc / np->xmit_r_cpu);
X! 		else
X! 			printf("%15s", not_avail);
X  
X! 		if ( percent < 0 )
X! 			printf("%13s", not_avail);
X! 		else
X! 			printf("%12.2f%%", percent);
X  		
X! 		printf("%16s\n", class);
X! 	}
X  }
X--- 312,384 ----
X  
X  	for ( np = nntps ; np < nntps + num_nntp_hosts ; np++ )
X  	{
X! 		Report_smart_line(np);
X  
X! 		tot.recv_n_connect += np->recv_n_connect;
X! 		tot.recv_n_netfail += np->recv_n_netfail;
X! 		tot.recv_a_acc     += np->recv_a_acc;
X! 		tot.recv_r_cpu     += np->recv_r_cpu;
X! 		tot.xmit_n_connect += np->xmit_n_connect;
X! 		tot.xmit_n_connect += np->xmit_n_connect;
X! 		tot.xmit_a_acc     += np->xmit_a_acc;
X! 		tot.xmit_r_cpu     += np->xmit_r_cpu;
X! 	}
X! 
X! 	strcpy(tot.nntp_host, "TOTAL");
X! 	Report_smart_line(&tot);
X! }
X! 
X! int
X! Report_smart_line(tp)
X! register nntp_t *tp;
X! {	
X! 	int	total_conn,
X! 		total_fail;
X! 	float	percent;
X! 	char	*class,
X! 		*not_avail = "n/a";
X! 
X! 	total_conn = tp->recv_n_connect + tp->xmit_n_connect;
X! 	total_fail = tp->recv_n_netfail + tp->xmit_n_netfail;
X! 
X! 	if ( total_conn == 0 )
X! 		percent = -1;		/* not available	*/
X! 	else
X! 		if ( total_fail == 0 )	/* it's pretty good	*/
X  			percent = 0;
X! 		else
X! 			percent = ((float) total_fail /
X! 			((float) total_conn + (float) total_fail)) * 100;
X  
X! 	if ( percent > 25 )
X! 		class = "bad";
X! 	else
X! 		if ( percent > 10 )
X! 			class = "moderate";
X  		else
X! 			if ( percent > 3 )
X! 				class = "good";
X  			else
X! 				if ( percent >= 0 )
X! 					class = "excellent";
X  				else
X! 					class = not_avail;
X  
X! 	printf("%-23.23s ", tp->nntp_host);
X! 	if ( tp->recv_a_acc )
X! 		printf("%10.2f", tp->recv_a_acc / tp->recv_r_cpu);
X! 	else
X! 		printf("%10s", not_avail);
X  
X! 	if ( tp->xmit_a_acc )
X! 		printf("%15.2f", tp->xmit_a_acc / tp->xmit_r_cpu);
X! 	else
X! 		printf("%15s", not_avail);
X  
X! 	if ( percent < 0 )
X! 		printf("%13s", not_avail);
X! 	else
X! 		printf("%12.2f%%", percent);
X  		
X! 	printf("%16s\n", class);
X  }
XIndex: scan.c
X*** ../1.0PL4/scan.c	Sun Jan  5 22:08:17 1992
X--- scan.c	Fri Jan  8 19:53:46 1993
X***************
X*** 4,9 ****
X--- 4,11 ----
X   *	scan.c	1.02	03-Jun-91 EHK	mod. algorithm to filter garbage better
X   *	scan.c	1.03	10-Jun-91 EHK	memory faults; increase some buffers
X   *	scan.c	1.03	03-Jan-92 EHK	fixed a sanity check; added KEY_NEWNEWS
X+  *	scan.c	1.04	15-Apr-92 vato	:-( msgid patches syslog entry
X+  *	scan.c	1.05	08-Jan-92 EHK	:-( and inews pathname is not a host
X   */
X  
X  #include "nestor.h"
X***************
X*** 52,58 ****
X  	sscanf(cp, "%s %s", hostname, keyword);			/* -3-	*/
X  	cp += strlen(hostname) + strlen(keyword) + 2;
X  
X! 	if ( (key_lookup_result = FindKey(keyword)) == -1 )	/* -4-	*/
X  	{
X  		if ( verbose )
X  			fprintf(stderr, "Huh?!?!? --> %s", line);
X--- 54,68 ----
X  	sscanf(cp, "%s %s", hostname, keyword);			/* -3-	*/
X  	cp += strlen(hostname) + strlen(keyword) + 2;
X  
X! 	/* Before we do the usual keyword lookup, we look sharp for certain
X! 	 * garbage that is known to slip into occasionally...
X! 	 * `msgid' seems to confuse nestor; so does the `inews' pathname
X! 	 * every now and then. Fix to reject hostnames that match "msgid:"
X! 	 * or contain '/'-es. Logfiles really are a mess sometimes...
X! 	 */
X! 	if ( !strcmp(hostname, "msgid:") ||
X! 	     index(hostname, '/') ||
X! 	     (key_lookup_result = FindKey(keyword)) == -1 )	/* -4-	*/
X  	{
X  		if ( verbose )
X  			fprintf(stderr, "Huh?!?!? --> %s", line);
XIndex: support.c
X*** ../1.0PL4/support.c	Fri Jan  3 22:56:03 1992
X--- support.c	Sat Jan  9 14:50:57 1993
X***************
X*** 163,166 ****
X  	
X  	return( NIL_CHAR );
X  }
X! #endif HAVE_STRSTR
X--- 163,166 ----
X  	
X  	return( NIL_CHAR );
X  }
X! #endif /* HAVE_STRSTR */
END_OF_FILE
if test 16523 -ne `wc -c <'Patch05'`; then
    echo shar: \"'Patch05'\" unpacked with wrong size!
fi
# end of 'Patch05'
fi
echo shar: End of shell archive.
exit 0
-- 
Edwin H. Kremer, systems- and network manager.    [NIC-Whois handle: EHK3]
  Department of Computer Science,    Utrecht University,   The Netherlands
  Internet: Edwin.Kremer@cs.ruu.nl   NeXTmail: Edwin.Kremer@edge.cs.ruu.nl
  X.400   : G=Edwin;S=Kremer;OU=cs;O=ruu;PRMD=surf;ADMD=400net;C=nl
#! rnews 1000