Sun-Spots Digest, v6n170

William LeFebvre Sun-Spots-Request at RICE.EDU
Mon Aug 8 15:19:28 AEST 1988


SUN-SPOTS DIGEST          Friday, 5 August 1988       Volume 6 : Issue 170

Today's Topics:
                    Re: Using BITNET host as a gateway
                Re: login problems when NFS server crashes
                 Installing SunOS4.0 from a 3.X tapehost
                     making yp do name server lookups
             mbuf leak with Unix domain sockets in SunOS 3.5
                           lockscreen -e "bug"
        are y'all quite bored of this "set prompt" business yet? 
                     Questions about SCSI on the SUN
                              mice for sun3?
              clearing the 68020 on-chip instruction cache?
                   Word Processing on PC's with PC-NFS?

Send contributions to:  sun-spots at rice.edu
Send subscription add/delete requests to:  sun-spots-request at rice.edu
Bitnet readers can subscribe directly with the CMS command:
    TELL LISTSERV AT RICE SUBSCRIBE SUNSPOTS My Full Name
Recent backissues are available via anonymous FTP from "titan.rice.edu".
For volume X, issue Y, "get sun-spots/vXnY".  They are also accessible
through the archive server:  mail the request "send sun-spots vXnY" to
"archive-server at rice.edu" or mail the word "help" to the same address
for more information.

----------------------------------------------------------------------

Date:    Thu, 28 Jul 88 16:39 U
From:    <VIJAY at ITIVAX.BITNET>
Subject: Re: Using BITNET host as a gateway

My apologies for taking so long to submit a summary of responses that I
got - we have been reorganising office space here. I also have to make a
confession - due to my ineptitude with the VAX/VMS mailer, I managed to
lose the first three responses that I got. I have indicated what I can
remember of them below.  This accident also shows why I would prefer to be
able to handle my mail directly from my Sun :-)

1) was a plea for help too. I hope this summary will serve.
2) was a msg from a very nice gentleman in Europe who said he has exactly the
same set-up (VAX/VMS, Wollongong TCP/IP, Suns, Ethernet). He included his
sendmail.cf that he said allowed the Sun to send mail out via the Vax. Losing
this msg really hurt (hint, hint - if you recognise yourself, could you please
send the mail again?).
3) was a msg from a gentleman suggesting I make my Suns real nodes on BITNET.
The required software is UREP. He gave a contact e-mail address which I can't
remember but you can send mail to INFO at BITNIC.BITNET for more info on UREP.
4) Jacob Gore (gore at eecs.nwu.edu) suggested I contact Ned Freed
(ned at ymir.bitnet) for info about PMDF for VAX/VMS. As far as I can make out
PMDF is a configurable mailer for VMS. My Vax sysadmin is giving serious
thought to considering looking more closely at it (he has obviously read "Yes,
Minister" :-)
5) Dan Davison (dbd%genome at lanl.gov) gave me a reference to a friend of his.
I tried sending mail but did not get a response.
6) Doug Myhre (doug at loihi.hig.hawaii.edu) suggested I post a msg to
INFO-VAX at KL.SRI.COM. I haven't tried it yet.

This summary has also been directly sent to others who requested to be
kept informed.

Vijay Shah
Knowledge Systems Laboratory
Information Technology Institute
Singapore

------------------------------

Date:    27 Jul 88 13:37:39 GMT
From:    neil at ist.CO.UK (Neil Todd)
Subject: Re: login problems when NFS server crashes
Reference: v6n143

phil at Rice.edu (William LeFebvre):
> ...I was
> able to solve the problem for most of the users by making sure that the
> directory for their file system appeared before any other NFS file systems
> in "/".  This is not as easy to do as I thought it would be...

[All this for < SunOS4.0 ]
Here is a script to make life easier. There are two cases: diskless nodes
(when you can get at the root partition via the server) and diskful nodes.
Pls read script and see what is going on before you start.

0) Take a dump of the root partition and make sure you know where the
distribution tapes are, if the worst happens you can always load the mini
root and restore from your dump tape.

1) Diskless nodes.

Halt the node.

Mount the root partition of the node on the server using the local nd
entry (e.g /dev/ndl0) onto some convenient point (e.g. /mnt).

cd into the directory

ls -f > /tmp/afile

edit afile to reflect the order of the directory you want (it is in the
current order), put the NFS mounted partitions last.

run reorder.sh by: reorder.sh `cat /tmp/afile`

cd /

unmount /mnt

reboot the node.

2) Diskfull nodes

Go single user

fsck root to be on the safe side.

ls -f > /etc/afile

edit afile to reflect the order of the directory you want (it is in the
current order), put the NFS mounted partitions last.

unmount all filesystems (it probably won't let you umount /pub - don't
worry).

run reorder.sh by: reorder.sh `cat /etc/afile`

You may get complaints regarding moving directories across partitions this
should just be 'cos of /pub

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	reorder.sh
# This archive created: Wed Jul 27 14:35:50 1988
export PATH; PATH=/bin:$PATH
echo shar: extracting "'reorder.sh'" '(1596 characters)'
if test -f 'reorder.sh'
then
	echo shar: will not over-write existing file "'reorder.sh'"
else
sed 's/^	X//' << \SHAR_EOF > 'reorder.sh'
	X
	X#! /bin/sh
	X#
	X# Reorder current directory entries
	X#
	X# Neil Todd (neil at ist.co.uk)
	X# Wed Jul 27 10:44:39 BST 1988
	X#
	X# Use this at your own risk
	X#
	X# Usage: reorder.sh [ file* ]
	X#
	X# e.g. reorder.sh file1 file2 file3
	X# This will put file1 in first, file2 in second and file3 in third
	X# everything else will go in alpha order.
	X
	X# Gather up the order list
	XORDER=
	XOK=1
	X
	Xwhile [ x$1 != x ]
	Xdo
	X	# Check for files, dirs and sym links
	X	if [ \( -f $1 \) -o \( -d $1 \) -o \( -h $1 \) ]
	X	then
	X		if [ $1 = "." -o $1 = ".." ]
	X		then
	X			echo "Sorry, I won't touch $1"
	X			OK=0
	X		else
	X			# Can't check for dups
	X			ORDER="$ORDER $1"
	X		fi
	X	else
	X		echo "No such file as $1 in current directory"
	X		OK=0
	X	fi
	X	shift
	Xdone
	Xif [ $OK != 1 ]
	Xthen
	X	echo "Give me a correct order list, then I can reorder"
	X	exit 2
	Xfi
	X	
	X# Invent a directory name
	XMYPID=$$
	XPLACEHOLDER=".leaveme"
	X
	X# Make sure that the directory is unique
	Xwhile [ -f $PLACEHOLDER$MYPID ]
	Xdo	
	X	MYPID = `expr $MYPID + 1`
	Xdone
	X
	XPLACEHOLDER=$PLACEHOLDER$MYPID
	X
	Xmkdir $PLACEHOLDER
	X
	X# Fix up PATH - we're moving bin remember!
	X# It is just about possible that hash may give problems
	XPATH=$PATH:$PLACEHOLDER/bin:/pub/bin export PATH
	X# Move everything into the new directory
	Xfor FILE in `ls -a`
	Xdo
	X	if [ $FILE != "." -a $FILE != ".." -a $FILE != $PLACEHOLDER ]
	X	then
	X		mv $FILE $PLACEHOLDER
	X	fi
	Xdone
	X
	X# Now bring it up in the requested order
	X
	Xfor FILE in $ORDER
	Xdo
	X	mv $PLACEHOLDER/$FILE .
	Xdone
	X
	X# Move anything remaining up
	X
	Xcd $PLACEHOLDER
	Xfor FILE in `ls -a`
	Xdo
	X	if [ $FILE != "." -a $FILE != ".." ]
	X	then
	X		mv $FILE ..
	X	fi
	Xdone
	X
	Xcd ..
	Xrm -r $PLACEHOLDER
	X# Done !
	Xexit 0
SHAR_EOF
if test 1596 -ne "`wc -c < 'reorder.sh'`"
then
	echo shar: error transmitting "'reorder.sh'" '(should have been 1596 characters)'
fi
fi # end of overwriting check
#	End of shell archive
exit 0

------------------------------

Date:    Thu, 28 Jul 88 15:35:35 bst
From:    Malcolm Harper <mkh%prg.oxford.ac.uk at nss.cs.ucl.ac.uk>
Subject: Installing SunOS4.0 from a 3.X tapehost
Reference: v6n123

Graham Campbell <gc at ewok.amd.bnl.gov> complained in v6n123 that Sun does
not support 4.0 install from a remote tapehost unless the tapehost is
already running 4.0, and pointed out that generally the file-server with
the tape drive is the LAST system one wants to upgrade to a radically new
operating system.  I entirely agree with him about that.

Don't believe everything you read in the manuals! Think how much cheaper
and easier it is for Sun to say it can't be done than to print an extra 46
pages of walkthroughs in every copy of the installation manual...  I've
just installed SunOS 4.0 on a Sun-3/280 with xy0 disk, from a 3/280
tapehost running 3.2.  In the following, make the appropriate changes for
sun4, st8 tape, etc.

Make the target system a diskless client of a 3.X ND server.
"Sophisticated administrators" [I like that phrase, Sun] will realise that
this does not have to be the same machine as the tapehost.  You won't need
the target system as a diskless client for long, so if necessary halt a
real diskless workstation and borrow its ND partition.  If necessary, load
the 3.X stand/diag from the server across the ethernet to format and
partition the target system's disk (only the a, b and c partitions need
"final" labels -- suninstall will alter the disk label to change the
positions and sizes of partitions d to h).

Boot the target system using a 3.X kernel which includes the appropriate
disk driver (eg a GENERIC kernel), but use root on nd0.  If necessary make
the disk devices:
    target# cd /dev; ./MAKEDEV xy0
Mount the first SunOS4.0 tape, and do:
    tapehost# mt -f /dev/nrmt0 rewind
    tapehost# mt -f /dev/nrmt0 fsf 3
    tapehost# dd if=/dev/nrmt0 bs=20b | rsh target dd of=/dev/rxy0b obs=20b
or equivalent for your tape and disk type (replace 20b by 126b or 200b for st).
Halt the target system.

Extract ./stand/boot.sun3 from the "usr files" section of the distribution
tape (eg "mt .. rewind; mt -f /dev/nr... fsf 7; tar xfv /dev/...
./stand/boot.sun3") and move it to /tftpboot/boot.sun3 .  Construct an
appropriate symbolic link from the hexadecimal representation of the
target's IP address (see page 41 of the 4.0 "System & Network
Administration" manual).  Continue from section 5.2.5 of the 4.0
"Installing the SunOS" manual (from the top of page 107), with appropriate
modification of 5.2.6.

Good luck! -- Malcolm Harper

------------------------------

Date:    Thu, 28 Jul 88 19:20:17 EDT
From:    hobbit at topaz.rutgers.edu (*Hobbit*)
Subject: making yp do name server lookups

"makedbm -b" adds a magic entry to your hosts database, YP_INTERDOMAIN or
some such, that tells ypserv that if it can't find a host in the database,
go off and try the nameserver.  This is really nifty because you can put
nicknames for your favorite hosts in the database [like you could with an
old host table] and still be able to find everybody else.  You can turn
this on by doing 
  make hosts DIR=/wherever/you/keep/it MAKEDBM="makedbm -b"
from your yp directory.  The manpage is very sketch wrt "-b", but as far
as I can tell that's all it does, and it's up to ypserv to see it.

I believe you have to have a "fixed" ypserv, and i'm not sure where to get
it [Roy?  Where'd that tape come from?].

_H*

------------------------------

Date:    Thu, 28 Jul 88 13:53:35 PDT
From:    Craig Leres <leres at helios.ee.lbl.gov>
Subject: mbuf leak with Unix domain sockets in SunOS 3.5

We noticed a LARGE number of data mbufs allocated on our file server.
Investigation uncovered a bug Unix domain socket code; mbufs can be lost
when there's an error sending data. In our case, there was a program
writing to a socket that no one was reading from. The broken code is in
uipc_usrreq() in sys/uipc_usrreq.c. As usual, a short context diff is
appended.

We STILL don't have 4.0 source, so I don't know if it has the bug too.

		Craig
------
RCS file: RCS/uipc_usrreq.c,v
retrieving revision 1.1
diff -c -r1.1 uipc_usrreq.c
*** /tmp/,RCSt1a00820	Thu Jul 28 13:48:01 1988
--- uipc_usrreq.c	Wed Jul 27 21:01:40 1988
***************
*** 180,185 ****
--- 180,186 ----
  			snd->sb_hiwat -= rcv->sb_cc - rcv->sb_hiwat;
  			rcv->sb_hiwat = rcv->sb_cc;
  			sowakeup(so2, rcv);
+ 			m = 0;
  #undef snd
  #undef rcv
  			break;
***************
*** 187,193 ****
  		default:
  			panic("uipc 4");
  		}
- 		m = 0;
  		break;

  	case PRU_ABORT:
--- 188,193 ----

------------------------------

Date:    Thu, 28 Jul 88 14:30:28 CDT
From:    chicken at shell.UUCP (Roy Johnson)
Subject: lockscreen -e "bug"

That's not a bug, it's a 'feature'!  It works as designed if you are
sufficiently convoluted, to whit:

	1. IF you call suntools from your .login file,
	2. AND you logout in your .login file,
	3. AND you run lockscreen -e in the background,

the program logs the user off.  This is of course the most obvious setup;
WHY AREN'T YOU SET UP LIKE THAT?

Pecking out the bugs,
Chickenman

[[ Perhaps obvious to you, maybe not to others.  Personally, I "exec"
suntools from my c-shell.  --wnl ]]

------------------------------

Date:    Thu, 28 Jul 1988 21:02:26 EDT
From:    *Hobbit* <hobbit at pyrite.rutgers.edu>
Subject: are y'all quite bored of this "set prompt" business yet? 

I'm catching up on back issues, so this may be a tad outdated, but... in
regard to the trailing-space prompt discussion: Here's what I came up
with, and it's really gross, but short of writing a program is there a
better way to do what I want [set it to the caseified first token of the
machine's name; here it becomes "Pyrite+ "]??  [I leave "pbase" set in the
environment so I only have to do this lossage once per login.]

# Set machine-name-based prompt string that we can tack other things on to.
# This is a horrible kludge, but sed is fun, and there aren't any tr-like
# builtins that I can find.
set pcap=`hostname | sed 's;^\(.\).*$;\1;' | tr a-z A-Z`
setenv pbase $pcap`hostname | sed 's;.\([^\.]*\).*$;\1;'`
unset pcap
# ... later on in the init file ...
# if we're god, change things a bit
if (`whoami` == root) then
  set prompt="${pbase}\\!\\! "
else
  set prompt="${pbase}+ "
endif

_H*

------------------------------

Date:    28 Jul 88 18:37:56 GMT
From:    srt at cos.com (Stan R. Turner)
Subject: Questions about SCSI on the SUN

We are planning on controlling a SCSI device using a SUN 3/160.  We have
noticed that the Sun uses SCSI to talk to its disk drives.  We have had
difficulty in finding out how to use the Sun SCSI hardware.

What I want to know is: 

(1) Is it possible to use the built in SCSI to talk to devices of my own
choosing?  And if so, then where can I find the information to talk to the
Sun SCSI driver.

(2) If it is to difficult to use Sun's SCSI implementation then could
somebody recommend a SCSI board that we could plug into our Sun to control
our device.  

Thanks in advance,
	Stan

Please Email your responses

Mail to  {decuac,hadron,hqda-ai,uunet}!cos.com!srt (Stanley R. Turner)

------------------------------

Date:    Thu, 28 Jul 88 12:07:40 PDT
From:    laa%janus.Berkeley.EDU at berkeley.edu (Laura Agapay)
Subject: mice for sun3?

Does anyone know who sells these (other than Sun)?

laa

------------------------------

Date:    Thu, 28 Jul 88 20:43:03 EDT
From:    haahr%bogey.Princeton.EDU at princeton.edu
Subject: clearing the 68020 on-chip instruction cache?

is there a way, from user level, to clear the 68020's instruction cache on
a sun-3?  i am generating code on the fly that may be in the same spot in
memory (on the stack) as previously generated code, and i don't to run the
risk of executing bad code in the cache.  that hasn't yet happened, and my
guess is that it normally won't, but i don't want code that works only
some of the time.

move to cache control register is a privileged instruction, so that's not
any help. the best advice i've gotten so far is "execute 256 bytes of nop
instructions," which really is unsatisfactory since i'm performance is the
reason i need this.

paul haahr
princeton!haahr or haahr at princeton

------------------------------

Date:    Thu, 28 Jul 88 10:32:50 CDT
From:    johnpar at rosevax.rosemount.com (John Parker)
Subject: Word Processing on PC's with PC-NFS?

HELP! (From Rosemount England via Rosemount Inc, Mpls, Mn)

Does anyone out there have experience of using PC's on PC-NFS for
wordprocessing. 

Our network consists of a Sun 3/160 Server running 3.4, with three IPC
cards fitted, six diskless Sun 3/50's, and eight IBM PC's running PC-NFS
3.0 on 3Com 3C501 cards, all linked by thin ethernet. 

We use Multimate at present but it has some problems especially on the IPC
cards. The problems range from mixed up screen characters to document
files which self destruct.

We would like to use Multimate Advantage II LAN. It has some new features
and is supposed to work ok with networks. When we tried it on our system,
although files were created we could not re-edit or print. The files
appear ok but Multimate Adv II LAN will not access them.

I asked Sun UK and they could only say that they did not know of anyone
who had tried Multimate Advantage II LAN. Ashton Tate's response was that
it works ok with PC-NET, 3Com 3+, and Novell.

If anyone has had any experience of Multimate and knows of fixes, or if
anyone can recommend a wordprocessor for PC's on PC-NFS, please let me
know by mail. I will summarise the replies and post to this conference.

John Parker
Sun System Manager
Rosemount England

johnpar at rosesun.rosemount.com (John Parker)

[[ Please respond directly to Mr. Parker.  This is a marginal topic.
--wnl ]]

------------------------------

End of SUN-Spots Digest
***********************



More information about the Comp.sys.sun mailing list