🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #6424

Re: Unwanted.log file

#6424
From: Mike Pelletier
Date: Tue, 09 Apr 1996 00:00
97 lines
3963 bytes
In article <4kcp81$m7e@opus.anet-stl.com>,  <gpalexa@anet-stl.com> wrote:
>
>Colin Gilyeat <cgilyeat@chesapeake.net> wrote:
>
>] I'm new to running a news server and haven't been able to figure out 
>] where this log (unwanted.log) file in generated from.  The date/time 
>] stamp is the same as my daily cleanup, but I don't know what process 
>] creates or updates it.
>
>Look at the tally.unwanted script in your /usr/contrib/lib/news/bin
>directory. 
>
>It just shows what news groups you received messages for and don't
>carry. The only problem I have with it is that it is cumulative and
>even if you have added a group it still shows up. I usually just move
>it somewhere else or delete it after a while so that it gives me a
>fairly good picture of what new groups are popular.

Here's a bit more information for you, Colin...

The "tally.unwanted" script is called by the "scanlogs" program, which is
called by the "news.daily" program, which should be called by the "cron"
program at the time indicated in the "/etc/crontab" (or whatever your
crontab file is called on your system) file.

If you'd like to have a better idea of how long the unwanted.log file 
has been around to accumulate the numbers it has, without having to invoke
a seldom-used option to the "ls" command (which won't work anyway because
the unwanted.log file is recreated every time tally.unwanted runs) make
the following changes to the "tally.unwanted" script:

*** tally.unwanted      Fri Feb  3 19:30:12 1995
--- tally.unwanted.new  Tue Apr  9 10:27:36 1996
***************
*** 23,34 ****
  
  ##  Prepare the files.
  if [ ! -f ${LOG} ]; then
!     touch ${LOG}
      chmod 0660 ${LOG}
  fi
  rm -f ${UNWANTED_NEW} ${UNWANTED_OLD}
  ln ${LOG} ${UNWANTED_OLD}
! touch ${UNWANTED_NEW}
  chmod 0660 ${UNWANTED_NEW}
  
  ##  Grab the data.
--- 23,34 ----
  
  ##  Prepare the files.
  if [ ! -f ${LOG} ]; then
!     echo "Unwanted article tally since `date`" > ${LOG}
      chmod 0660 ${LOG}
  fi
  rm -f ${UNWANTED_NEW} ${UNWANTED_OLD}
  ln ${LOG} ${UNWANTED_OLD}
! grep "^Unwanted article tally since" ${UNWANTED_OLD} > ${UNWANTED_NEW}
  chmod 0660 ${UNWANTED_NEW}
  
  ##  Grab the data.
***************
*** 50,56 ****
                }
            }
        }' \
!     | sort -n -r >${UNWANTED_NEW}
  mv -f ${UNWANTED_NEW} ${LOG}
  
  ##  All done.
--- 50,56 ----
                }
            }
        }' \
!     | sort -n -r >>${UNWANTED_NEW}
  mv -f ${UNWANTED_NEW} ${LOG}
  
  ##  All done.
----------------------------

The date will start appearing once you move the existing unwanted.log file
out and let it create a new one.  If you have an idea of when the tally
started, you can insert it into an existing file by inserting the line:

Unwanted article tally since <put date here>

Make sure the "U" is the first character in the line, and make sure
everything's worded just as indicated in the tally.unwanted "grep" command.

	-Mike Pelletier.

DISCLAIMER: I haven't tested this, but it looks right to me based on my
	    11-12 years of shell script programming experience.  However,
            I'm a bit ill today, and I haven't had any coffee.  I can't
            take any responsability for the results on your system,
            proceed at your own risk.

Technical Details
Message-ID: <4kdvga$22l@valhalla.comshare.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <31644764.5FE1@chesapeake.net> <4kcp81$m7e@opus.anet-stl.com>

Show Full Headers
Complete Article Headers
Message-ID: <4kdvga$22l@valhalla.comshare.com>
Subject: Re: Unwanted.log file
Date: Tue, 09 Apr 1996 00:00:00 +0000
From: mikep@valhalla.comshare.com (Mike Pelletier)
References: <31644764.5FE1@chesapeake.net> <4kcp81$m7e@opus.anet-stl.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 146552699
Distribution: inet
Organization: A poorly-installed InterNetNews site
Newsgroups: news.software.nntp