🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by John F. Morse Fri, 26 Jun 2009 18:47
cnfsstat default "l" time
#81486
Author: John F. Morse
Date: Fri, 26 Jun 2009 18:47
46 lines
2496 bytes
I would like to change the default "l" time interval in cnfsstat from
600 to 3600 seconds. This is for my application only, and not a request
to modify the released version.

I know this is possible with the "cnfsstat -l" command,

       -l [ seconds ]
              Cnfsstat  prints a status snapshot every seconds, and only
exits if there is an error.  The default
              interval is 600 seconds.

However, to make it survive a reboot, I have <docnfsstat in inn.conf> =
‘‘true’’

Since cnfsstat is then running, the manual use of "cnfsstat -l 3600"
launches another instance.

Q. Could the default "l" time interval in cnfsstat be changed within the
script itself to make it survive a reboot?

If so, would the following be the proper place?:


    1 #! /usr/bin/perl
    2 require '/usr/lib/news/innshellvars.pl';
    3
    4 #  $Id: cnfsstat.in 7060 2004-12-19 21:36:38Z rra $
    5 #
    6 #  Copyright Andreas Lamrecht 1998
    7 #  <Andreas.Lamprect@siemens.at>
    8 #
    9 #  Modified by Kjetil T. Homme 1998, 2000
   10 #  <kjetilho@ifi.uio.no>
   11 #
   12 #  Modified by Robert R. Collier 1998
   13 #  <rob@lspace.org>
   14 #
   15 #  bigint support added by Duane Currie (sandman@hub.org) 1998
   16

---82 my($sleeptime) = (defined($opt_l) && $opt_l > 0) ? $opt_l : 600;
+++82 my($sleeptime) = (defined($opt_l) && $opt_l > 0) ? $opt_l : 3600;


-- 
John
Re: cnfsstat default "l" time
#81487
Author: Julien ÉLIE
Date: Fri, 26 Jun 2009 19:23
27 lines
2075 bytes
Hi John,

> I would like to change the default "l" time interval in cnfsstat from
> 600 to 3600 seconds. This is for my application only, and not a request
> to modify the released version.
>
> Q. Could the default "l" time interval in cnfsstat be changed within the
> script itself to make it survive a reboot?

It could and your change would be fine.

However, I suggest that you change instead your rc.news script.  There are
lines like these:

${DOCNFSSTAT} && {
    echo "Scheduled start of cnfsstat."
    ( sleep 60 ; ${PATHBIN}/cnfsstat -s -l -P ) > /dev/null &
}

Just add 3600 after "-l" and restart INN with rc.news.

-- 
Julien ÉLIE

« Le chemin n'est pas difficile, c'est le difficile qui est le chemin. »
  (Kierkegaard) 
Re: cnfsstat default "l" time
#81503
Author: John F. Morse
Date: Sat, 27 Jun 2009 18:03
48 lines
2881 bytes
Julien ÉLIE wrote:
> Hi John,
>
>> I would like to change the default "l" time interval in cnfsstat from
>> 600 to 3600 seconds. This is for my application only, and not a request
>> to modify the released version.
>>
>> Q. Could the default "l" time interval in cnfsstat be changed within the
>> script itself to make it survive a reboot?
>
> It could and your change would be fine.
>
> However, I suggest that you change instead your rc.news script.  There
> are
> lines like these:
>
> ${DOCNFSSTAT} && {
>    echo "Scheduled start of cnfsstat."
>    ( sleep 60 ; ${PATHBIN}/cnfsstat -s -l -P ) > /dev/null &
> }
>
> Just add 3600 after "-l" and restart INN with rc.news.
>

Hi Julien.

That worked great, but only on optima11. I could not get optima2 to move
from the 600 second sleep time period.

After some ten hours of fighting it, editing rc.news, and even cnfsstat
in two places, many restarts, it never changed from 600 seconds.

Then I looked at ps and discovered another cnfsstat process running! Of
course that -l was at the default 600. :-[

Killing it and then restarting rc.news finally fixed the problem.

After waiting an hour to see if it did indeed work, I crawled off to bed.

It's always those little things that cause the most loss of hair! ;-)


-- 
John 

No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.

The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads