🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #13119

Re: problem with innwatch and inode limits

#13119
From: Craig Dewick
Date: Mon, 09 Dec 1996 00:00
74 lines
3789 bytes

In <32A9F77D.6DCE@phase-one.com.au> Peter Marelas <maral@phase-one.com.au> writes:

>From my innwatch.ctl
>!!! df -i /u02 | awk 'NR == 2 { print $3 }' ! lt ! 200 ! throttle ! No
>space (spool inodes /u02)

Ok, having just done some more sniffing around, and some logical figuring
out of what the awk expressions in innwatch.ctl mean, I believe I've found
an error (at least as far as SunOS 4.1.4 is concerned) with the defaults
in the 1.5 distribution... 

In 1.4, the check for free inodes in the spool directory looks like this:

##  =()<!!! df -i . | awk 'NR == 2 { print $3 }' ! lt !
@<INNWATCH_SPOOLNODES>@ ! throttle ! No space (spool inodes)>()=
!!! df -i . | awk 'NR == 2 { print $3 }' ! lt ! 200 ! throttle ! No space
(spool inodes)

In 1.5, the same thing looks like this:

##  =()<!!! @<INNWATCH_DF>@ -i . | awk 'NR == 2 { print $@<INNWATCH_INODES>@
}' ! lt ! @<INNWATCH_SPOOLNODES>@ ! throttle ! No space (spool inodes)>()=
!!! /bin/df -i . | awk 'NR == 2 { print $7 }' ! lt ! 200 ! throttle ! No
space (spool inodes)

What's the difference? Well, look carefully at the 'print $x' in each
example. In 1.4, the third string was used, but in 1.5, this has somehow
become the 7th.

Now, here's a sample line from doing 'df -i' on my server machine:

Filesystem             iused   ifree  %iused  Mounted on
...
/dev/sd1e             122677  115979    51%   /var/spool/news

Release 1.4 uses the 3rd string, which specifies the total number of free
inodes. Release 1.5 seems to be using the 7th string, and there isn't one!
I've changed the copy of innwatch.ctl installed into /usr/local/news, and
the server has not been throttled since.

So, where is this coming from? Well, in release 1.4, there was no way to
specify which field each awk expression would use as the subject of it's
calculation, but having checked config/config.data for 1.5, there now is! 
Here is the default:

##  Field number of INNWATCH_DF (with -i) output that gives free
##  inodes (starting at 1).
#### =()<INNWATCH_INODES        @<INNWATCH_INODES>@>()=
INNWATCH_INODES         7
##  Field number of INNWATCH_DF output that gives the free block count.
##### =()<INNWATCH_BLOCKS       @<INNWATCH_BLOCKS>@>()=
INNWATCH_BLOCKS         4

So, the simple solution is to change the setting of INNWATCH_INODES from
'7' to '3', and all is well for my system once I run 'make install' in the
site directory.

Can anyone tell me if doing 'df -i' on other system produces output in a
different format to SunOS? This might explain how a '7' slipped in for the
default for INNWATCH_INODES.

Regards,

Craig.

--
            Craig Dewick. Send email to 'cdewick@lios.apana.org.au'
   Point a web browser at 'http://lios.apana.org.au/~cdewick/sun_ark.html' to
       access my collection of Sun information and links to other places.


Technical Details
Message-ID: <Pine.SUN.3.95.961209081009.29355B-100000@lios.apana.org.au>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-aus.computers.sun.mbox.zip!not-for-mail
References: <58bi7p$qrc@lios.apana.org.au> <58coac$rc7@lios.apana.org.au> <32A9F77D.6DCE@phase-one.com.au>

Show Full Headers
Complete Article Headers
Message-ID: <Pine.SUN.3.95.961209081009.29355B-100000@lios.apana.org.au>
Subject: Re: problem with innwatch and inode limits
Date: Mon, 09 Dec 1996 00:00:00 +0000
From: Craig Dewick <cdewick@lios.apana.org.au>
References: <58bi7p$qrc@lios.apana.org.au> <58coac$rc7@lios.apana.org.au> <32A9F77D.6DCE@phase-one.com.au>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-aus.computers.sun.mbox.zip!not-for-mail
X-Deja-AN: 203033148
To: Peter Marelas <maral@phase-one.com.au>, inn-bugs@isc.org
Content-type: TEXT/PLAIN; charset=US-ASCII
Organization: Jedi - Fighting for Net.Freedom
Mime-version: 1.0
Newsgroups: news.software.nntp,comp.sys.sun.apps,comp.sys.sun.admin,aus.computers.sun