[news.software.b] Missing history file??

asp@cos.com (Andrew S. Partan) (03/25/88)

I got the following message last night:
	From: news
	Date: 24 Mar 88 06:17:57 GMT
	To: usenet
	Subject: Missing files!
	Responding-System: cos.com

	System: cos.com

	There was a problem with /usr/local/lib/news/history!!
	The problem has been taken care of.

Checking in the code, it seems as if my history file got zapped and was
recreated.  Does anyone know how a history file can be zapped?  It has
never happened (to me) before.

It seems to have happened during my expire run.  I run 13 expires every
night, each with a different set of newsgroups for different amounts of
time.  The history file seems to have gone away either before or during
the 3rd or 4th expire run.

The only thing that I was changing yesterday was my ~news/sys file to
try to get an ihave/sendme feed up & running the way that I would like
it.

I am running news B 2.11, patchlevel 14.

Mystified,
	--asp (Andrew Partan @ Corporation for Open Systems)
	-- asp@cos.com or asp%cos.com@uunet.uu.net
	-- {uunet, sundc, decuac, hqda-ai, hadron}!cos!asp
	ASN.1 Object Identifier: "{joint-iso-ccitt mhs(6) group(6) 157}"
DISCLAIMER:  Opinions expressed are not necessarily those of the
Corporation for Open Systems, its members, or any standards body.

woods@ncar.ucar.edu (Greg Woods) (03/25/88)

  I've seen the history file get trashed before, when the file system
on which it is stored runs out of space during an expire run.

--Greg

emv@umix.cc.umich.edu (Edward Vielmetti) (03/26/88)

In article <1219@cos.com> asp@cos.com (Andrew S. Partan) writes:
>It seems to have happened during my expire run.  I run 13 expires every
>night, each with a different set of newsgroups for different amounts of
>time.  The history file seems to have gone away either before or during
>the 3rd or 4th expire run.

13 expires a night sounds like a bit much to me.  If there's
some groups that you keep around for 45 days, let's say, then
it would probably be sufficient to expire them weekly.  Even
three week groups can handle a twice a week expire.

zeeff@b-tech.UUCP (Jon Zeeff) (03/27/88)

In article <1219@cos.com> asp@cos.com (Andrew S. Partan) writes:
>
>It seems to have happened during my expire run.  I run 13 expires every
>night, each with a different set of newsgroups for different amounts of
>time.  The history file seems to have gone away either before or during
>the 3rd or 4th expire run.
>
Instead of doing this, I'd recommend that you run the C news expire.
It allows you to expire all the groups at diffferent times in one pass.
It's also much faster.

--Jon


-- 
Jon Zeeff           		Branch Technology,
uunet!umix!b-tech!zeeff  	zeeff%b-tech.uucp@umix.cc.umich.edu

rees@apollo.uucp (Jim Rees) (03/28/88)

Here are the patches to inews to make it work with C news expire.
You also need to apply some patches to C expire but I don't have those
handy right now.

You should also #define CHIST in your defs.h.

diff -c -b src/control.c control.c
*** src/control.c	Mon Nov 30 10:00:17 1987
--- control.c	Thu Jan 14 18:07:58 1988
***************
*** 626,631 ****
--- 645,653 ----
  		struct tm *tm;
  		log("Can't cancel %s:  non-existent", argv[1]);
  		(void) time(&t);
+ #ifdef CHIST
+ 		sprintf(bfr, "%s\t%ld~-\tcancelled", argv[1], t);
+ #else
  		tm = localtime(&t);
  #ifdef USG
  		sprintf(bfr,"%s\t%2.2d/%2.2d/%d %2.2d:%2.2d\tcancelled",
***************
*** 634,639 ****
--- 656,662 ----
  #endif /* !USG */
  		   argv[1], tm->tm_mon+1, tm->tm_mday, tm->tm_year, tm->tm_hour,
  		   tm->tm_min);
+ #endif /* CHIST */
  		savehist(bfr);
  		return -1;
  	}
***************
*** 657,663 ****
  #endif /* ORGDISTRIB */
  		STRCMP(header.distribution, "local") == 0))
  		su = 1;
! 	while (*p) {
  		q = index(p, ' ');
  		if (q)
  			*q = '\0';
--- 680,686 ----
  #endif /* ORGDISTRIB */
  		STRCMP(header.distribution, "local") == 0))
  		su = 1;
! 	while (q && *p) {
  		q = index(p, ' ');
  		if (q)
  			*q = '\0';
diff -c -b src/inews.c inews.c
*** src/inews.c	Mon Nov 30 10:00:38 1987
--- inews.c	Fri Mar  4 14:03:20 1988
***************
*** 902,907 ****
--- 935,941 ----
  	int is_invalid = FALSE;
  	int exitcode = 0;
  	long now;
+ 	char expbuf[80];
  #ifdef DOXREFS
  	register char *nextref = header.xref;
  #endif /* DOXREFS */
***************
*** 916,931 ****
  	}
  
  	(void) time(&now);
! 	tm = gmtime(&now);
  	if (header.expdate[0])
  		addhist(" ");
! #ifdef USG
! 	sprintf(bfr,"%2.2d/%2.2d/%d %2.2d:%2.2d\t",
! #else /* !USG */
! 	sprintf(bfr,"%02d/%02d/%d %02d:%02d\t",
! #endif /* !USG */
! 		tm->tm_mon+1, tm->tm_mday, tm->tm_year,tm->tm_hour, tm->tm_min);
! 	addhist(bfr);
  	log("%s %s ng %s subj '%s' from %s", spool_news != DONT_SPOOL
  		? "queued" : (mode==PROC ? "received" : "posted"),
  		header.ident, header.nbuf, header.title, header.from);
--- 950,964 ----
  	}
  
  	(void) time(&now);
! #ifdef CHIST
! 	sprintf(expbuf, "%ld~%s\t", now, (header.expdate[0] ? header.expdate : "-"));
! 	addhist(expbuf);
! #else
  	if (header.expdate[0])
  		addhist(" ");
! 	addhist(arpadate(&now));
! 	addhist("\t");
! #endif
  	log("%s %s ng %s subj '%s' from %s", spool_news != DONT_SPOOL
  		? "queued" : (mode==PROC ? "received" : "posted"),
  		header.ident, header.nbuf, header.title, header.from);