🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.b
4 messages
4 total messages Started by Damian Centgraf - WSHB System Ad... Mon, 28 Feb 1994 11:51
CNEWS Spacefor problems (CNEWS2)
#7082
Author: Damian Centgraf - WSHB System Ad...
Date: Mon, 28 Feb 1994 11:51
132 lines
5531 bytes

Hi,
	
	I was wondering if anyone could give me some help with cnews.  I
and currently trying to get it up and running on a 486 machine running
SCO ODT 3.0 as a server and run a mounted spooler via NFS.

	I am having problems with too little space when I try to post
an article doing inews.

	When doing a df command I receive the following:

/         (/dev/root        ):   386524 blocks    48367 i-nodes
/u        (/dev/u           ):   410892 blocks    47743 i-nodes
/usr/spool/news (swii:/usr/spool/news ):   261438 blocks        0 i-nodes

	when I do a df /usr/spool/news I receive the following:

/usr/spool/news (swii:/usr/spool/news ):   261438 blocks        0 i-nodes

	The Inodes are there on the swii machine.  So the 0 inodes is 
misleading.

	I've tried to run the program with spacefor.sysv, spacefor.v7 
to no avail.  I've added some echo statements to the spacefor file
to see where the problem is.  I was unable to get the nf and nr outputs.
I don't understand what is trying to be done here.
	I've also sent along spacefor to show where the echo statements
are placed.
	I hope you will be able to help me with this.  Any help
would be greatly appreciated!

	Also could you please send any response via mail as I do not have
any news running at this time... I'm trying to get cnews up. 
	damian@wshb.csms.com
Thanks
Damian

this is the t2 output from running a post news: 

PATH=/usr/lib/news/bin:/usr/lib/newsbin:/bin:/usr/bin:/usr/local/bin  umask=002
server=/usr/lib/news
server=wshb.csms.com  me=wshb.csms.com
head off special case = 1
case #2=articles  dfunit=512
 df argument= /usr/spool/news NR= nr= NF= nf=
 df argument= /usr/spool/news NR= nr= NF= nf=

spacefor... below

#! /bin/sh
# spacefor - determine available disk space
# About how many things of $1 bytes will fit in the available space for
# stuff of type $2 ("incoming", "articles", "control", "outbound $3",
# or "archive") without cramping things too badly?
#
# You'll have to change this -- your blocksize, minimum-free-desired amounts,
# and df output format will probably differ, and you may need to name
# your filesystems explicitly.

# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/lib/news/bin/config}

PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
umask $NEWSUMASK
echo "PATH=$PATH  umask=$NEWSUMASK" >> t2

# punt to server if necessary
if test -r $NEWSCTL/server
echo "server=$NEWSCTL" >> t2
then
	server="`cat $NEWSCTL/server`"
	me="`hostname`"
	echo "server=$server  me=$me" >> t2
	if test " $server" != " $me"
	then
		exec rsh $server -n /bin/sh -c "'PATH=$PATH `basename $0` $*'"
		# does not return
	fi
fi

# head off special case
echo "head off special case = $1" >> t2
case "$1" in
0)	echo 10000 ; exit 0 ;;
esac

# argument to df, df units, and free space desired (in df units)
dfunit=512			# default df unit (bytes)
echo "case #2=$2  dfunit=$dfunit" >> t2
case "$2" in
incoming)	arg="$NEWSARTS/in.coming" ; desire=5000 ;;
articles)	arg="$NEWSARTS" ; desire=5000 ;;
control)	arg="$NEWSCTL" ; desire=3000 ;;		# for expire, mostly
outbound)	arg="/usr/spool/uucp" ; desire=10000 ;;	# ignore $3
archive)	arg="$NEWSARTS" ; desire=1 ;;		# system-specific
*)		echo "$0: bad type argument \`$2'!!" >&2
		exit 2 ;;
esac

# In the following, the initialization of nf determines which field the
# block count comes from, and the one for nr determines which line.  For
# System V, the Makefile edits in a sed which tries to strip silliness
# off in a reasonably System-V-variant-independent way.  Expr would be
# faster than awk, but on a 16-bit machine, expr does 16-bit arithmetic,
# which isn't enough.

# this is set up for the stupid System V df
echo " df argument= $arg NR=$NR nr=$nr NF=$NF nf=$nf" >> t2
df $arg | sed "s/.*:/: :/" | awk "BEGIN { nf = 3 ; nr = 2 }
	NR == nr && NF >= nf {
		nb = (\$nf - $desire) * $dfunit / $1
		if (nb > 10000)
			nb = 10000	# ensure representable as integer
		nb = int(nb)
		if (nb <= 0)
			print 0
		else
			print nb
		exit
	}
	NR == nr && NF < nf {		# idiotic Berkeley continuation
		nr += 1
		nf -= 1
	}"
echo " df argument= $arg NR=$NR nr=$nr NF=$NF nf=$nf" >> t2
-- 
       Damian L. Centgraf II        | "Use the key unlock the door" 
     WSHB-System Administrator      | "See what your fate might have in store" 
      WSHB-Broadcast Engineer       | "Come explore your dreams creation"
 INTERNET ...damian@wshb.csms.com   | "Enter this world of imagination" -Rush
Re: CNEWS Spacefor problems (CNEWS2)
#7081
Author: Bill Vermillion
Date: Wed, 02 Mar 1994 04:27
42 lines
2676 bytes
In article <1994Feb28.115108.26024@wshb.csms.com>,
Damian Centgraf - WSHB System Administrator - Engineer <damian@wshb.csms.com> wrote:

>	I am having problems with too little space when I try to post
>an article doing inews.
>
>	When doing a df command I receive the following:
>
>/         (/dev/root        ):   386524 blocks    48367 i-nodes
>/u        (/dev/u           ):   410892 blocks    47743 i-nodes
>/usr/spool/news (swii:/usr/spool/news ):   261438 blocks        0 i-nodes
>
>	when I do a df /usr/spool/news I receive the following:
>
>/usr/spool/news (swii:/usr/spool/news ):   261438 blocks        0 i-nodes
>
>	The Inodes are there on the swii machine.  So the 0 inodes is 
>misleading.

How do you know the inodes are there.   Do an fsck and see if
they come back.  If they do it's probably the Sys V bug that
most people have gotten fixed by now, but news gobbles up
inodes in a hurry.   I  have seen  0 inodes far too often when
running news.

># In the following, the initialization of nf determines which field the
># block count comes from, and the one for nr determines which line.  For
># System V, the Makefile edits in a sed which tries to strip silliness
># off in a reasonably System-V-variant-independent way.  Expr would be
># faster than awk, but on a 16-bit machine, expr does 16-bit arithmetic,
># which isn't enough.
>
># this is set up for the stupid System V df
>echo " df argument= $arg NR=$NR nr=$nr NF=$NF nf=$nf" >> t2
>df $arg | sed "s/.*:/: :/" | awk "BEGIN { nf = 3 ; nr = 2 }
                                                    ^^^^^^^
I'm not running ODT - or SCO on this machine but a Sys V.3.2
and I found that nr needed to be 1 here.   You might try it.


-- 
Bill Vermillion - bill@bilver.oau.org | bill.vermillion@oau.org
Re: CNEWS Spacefor problems (CNEWS2)
#7079
Author: Steve Alexander
Date: Thu, 03 Mar 1994 07:58
30 lines
2445 bytes
In article <1994Feb28.115108.26024@wshb.csms.com> damian@wshb.csms.com (Damian Centgraf - WSHB System Administrator - Engineer) writes:
>	I am having problems with too little space when I try to post
>an article doing inews.
>
>	When doing a df command I receive the following:
>
>/         (/dev/root        ):   386524 blocks    48367 i-nodes
>/u        (/dev/u           ):   410892 blocks    47743 i-nodes
>/usr/spool/news (swii:/usr/spool/news ):   261438 blocks        0 i-nodes
>
>	when I do a df /usr/spool/news I receive the following:
>
>/usr/spool/news (swii:/usr/spool/news ):   261438 blocks        0 i-nodes
>
>	The Inodes are there on the swii machine.  So the 0 inodes is 
>misleading.

This is a "problem" with the NFS protocol.  The concept of the inode is not
supported across NFS.

It's been quite a while since I installed C-News, but I thought it used a
file called /usr/lib/news/server to determine when it needs to run rsh (which
is called rcmd on SCO systems) for various things.  I believe if you create
this file and put the name of the machine that actually holds the news spool
in it this configuration can work.  You may have to tweak the various scripts
so that they run rcmd instead of rsh.   Check out spacefor.xenix or
spacefor.sysv.
-- 
Steve Alexander, Lachman Technology, Inc. | stevea@lachman.com
(708) 505-9555 x256 FAX: (708) 505-9574	  | ...!{sun,ico}!laidbak!stevea
Re: CNEWS Spacefor problems (CNEWS2)
#7078
Author: Matthias Urlichs
Date: Sun, 06 Mar 1994 21:41
26 lines
2143 bytes
In article <1994Feb28.115108.26024@wshb.csms.com>,
 Damian Centgraf - WSHB System Administrator - Engineer <damian@wshb.csms.com> wrote:

>	When doing a df command I receive the following:
>/usr/spool/news (swii:/usr/spool/news ):   261438 blocks        0 i-nodes
>
>	The Inodes are there on the swii machine.  So the 0 inodes is 
>misleading.
> 
True. NFS doesn't report inodes.

Which inews program are you using? I assume the machine "swii" is your news
server, so you'll have to use mini-inews and post via NNTP.

If you are on the server and swii is your news storage machine...don't.
You'll be much happier in the long run if you move either the storage or
the news server.

-- 
Be a better psychiatrist and the world will beat a psychopath to your door.
-- 
Matthias Urlichs        \ XLink-POP N�rnberg  | EMail: urlichs@smurf.noris.de
Schleiermacherstra�e 12  \  Unix+Linux+Mac    | Phone: ...please use email.
90491 N�rnberg (Germany)  \   Consulting+Networking+Programming+etc'ing     42

Click <A HREF="http://smurf.noris.de/~urlichs/finger">here</A>.
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