[comp.sys.sun] Sun-Spots Digest, v6n5

Sun-Spots-Request@RICE.EDU (William LeFebvre) (01/20/88)

SUN-SPOTS DIGEST         Tuesday, 19 January 1988       Volume 6 : Issue 5

Today's Topics:
                        Suns-at-Home mailing list
                          HP LaserJet Series II
                    Optimization with Interphase 4200
              Strange failure of bind(2) on diskless clients
        Floating-Point Programmer's Guide for the Sun Workstation
                     Programs to do inverted indices
                           TOD clock on Sun 3's
                      Problems (bug) with SunOS 3.4
                         Text Display on Sunview
                      Help with kernel configuration
                      Laser printers over Ethernet?
                     Retaining a drawing on a panel?
                 Adding a node to a server-based system?
             Using keyboard and monitor with console on ttya?
                      Good random number generators?
                         MIDI interface for Suns?

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

Date:    Fri, 8 Jan 88 10:07:54 EST
From:    mckay@courageous.ecn.purdue.edu (Dwight D McKay)
Subject: Suns-at-Home mailing list

A new mailing list is forming for those of you who have a Sun Workstation
at home, Suns-at-home.

This mailing list grows out of the Suns at Home SIG held at the Sun User's
Group conference in San Jose this past December.

To Join, send a message to:
	Suns-at-Home-Request@ea.ecn.purdue.edu
		--- or ---
	ihnp4!pur-ee!mckay!Suns-at-Home-Request

To submit an article, send it to:
	Suns-at-Home@ea.ecn.purdue.edu
		--- or ---
	ihnp4!pur-ee!mckay!Suns-at-Home

--Dwight D. McKay, Moderator of Suns-at-Home
--mckay@courageous.ecn.purdue.edu
--ihnp4!pur-ee!mckay!dwight (at home)

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

Date:    Mon, 4 Jan 88 13:01:11 CST
From:    blu@sc.msc.umn.edu
Subject: HP LaserJet Series II

This shar file contains all of the relevent files I use on my Sun 3/50 with
my HP LaserJet.  This includes the printcap entries , nroff filters, and 
the much requested rasterfile filter.  Please send any bug reports and/or
suggested/implemented enhancements to me.
Brian Utterback
Cray Research Inc.
One Tara Blvd. Suite 301
Nashua NH. 03062.
(603) 888-3083
blu%hall.cray.com@umn-rei-uc.arpa

[[ The shar file has been placed in the archives as
"sun-source/hp-filters.shar".  It can be retrieved via anonymous FTP from
the host "titan.rice.edu" or via the archive server with the command
"send sun-source hp-filters.shar".  For more information about the archive
server, send a mail message containing the word "help" to the address
"archive-server@rice.edu".  --wnl ]]

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

Date:    7 Jan 88 01:47:20 GMT
From:    tolerant!vsi1!lmb@ucbvax.berkeley.edu (Larry Blair)
Subject: Optimization with Interphase 4200

We recently upgraded the disk controller in our Sun-3 from an Interphase
3200 to a 4200.  I'm trying to configure things so that we achieve the
tremendous performance improvement that should be possible.

When we upgraded, I was able to do an apples to apples that indicates the
kind of improvement available (in theory).  Using a Fuji 2361A
(supereagle) that was formatted with skew=1, I did the following "dd" of a
filesystem (length 20Mb) on a completely idle system:

time dd if=/dev/rip0a of=/dev/null

With the 3200, the elapsed time was 50 seconds.  With the 4200 it was 22
seconds.  It seems to me that 25 seconds of the improvement was due to the
readahead of the 4200.  If so, then only 3 seconds of the improvement was
from higher transfer rate.  It is, of course, true that reading sequential
blocks of a raw filesystem, is completely unlike reading a file within a
filesystem.

My goal is to get the 4200's readahead to actually read the block I'll
want next.  I think that by changing the "maxconfig" and "rotdelay"
settings with tunefs(8), I can achieve this.  It's not a all clear to me
exactly what values I should use.  I'm also concerned that I may get the
readahead but end up losing a rotation.  Should I change the skew in the
formatting?

In addition to the Fuji, we have a CDC FSD-340.

I will appreciate all advise and I will attempt to obtain an apples to
apples do determine the real improvement.

Larry Blair - VICOM Systems Inc.                 (408)432-8660
2520 Junction Ave.  San Jose, CA  95134
{amdahl!oliveb | {hplabs|sun}!pyramid | ucbvax}!tolerant!vsi1!lmb

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

Date:    Fri, 8 Jan 88 08:31:23 EST
From:    Steve D. Miller <steve@mimsy.umd.edu>
Subject: Strange failure of bind(2) on diskless clients

I think this might be enlightening.  I haven't really tested this fix, as
the only diskless machines I deal with are running 3.3, and I don't have
3.3 sources.  I'm pretty sure it will work, and I know that when I looked
at the ifnet structure, what should have been sin_zero if you cast the
interface address to be a sockaddr_in was instead sin_garbage...

I think I notified Sun of this bug, but I remember being pretty busy at
that time, and I might have forgotten.  I'm Cc'ing sunbugs on this just in
case.

Index:	/usr/src/sun/sys/netinet/if_ether.c 3.2 SUNSRC [Fix]

Description:

	If the address assigned to an interface via RARP during network
	booting differs from the address later ifconfig'ed onto that
	interface, the ifconfig will fail with EBUSY.  Furthermore, the
	sockaddr assigned to the interface during RARP has lots of garbage
	where it should have zeroes; this means that binding sockets with
	the local address explicitly will fail, breaking FTP and lots of
	other things.

Repeat-By:
	Use /etc/ethers on some server to assign a particular IP address
	to a host when it RARPs.  Attempt to ifconfig a different address
	onto the Ethernet interface in /etc/rc.boot (the ifconfig will
	silently fail, unless its stderr is redirected to /dev/console),
	Run ftp, and try to get a file from a remote machine onto the
	local machine.  The ftp will fail with "ftp: bind: can't assign
	requested address."

	This bug also manifests on machines running SunOS 3.3, and is
	probably also present on machines running 3.0 or 3.4.  A simple
	peek at the source should indicate whether the bug is present.

Fix:
	Make sure that the temporary address bound to the interface via RARP
	is properly zeroed out, so that the equal() comparison in
	in_pcbbind() will work properly.  To do so, apply the following
	diff.

	I suspect that the ifconfig problem is not really a problem, as re-
	ifconfig'ing one's interface when using ND seems sort of silly.

*** /up/3.2src/sun/sys/netinet/if_ether.c	Fri Jun 19 13:00:26 1987
--- if_ether.c.fixed	Wed Sep 23 11:32:40 1987
***************
*** 501,506 ****
--- 501,507 ----
  	 * We need to give the interface a temporary address just
  	 * so it gets initialized. Hopefully, the address won't get used.
  	 */
+ 	bzero((caddr_t)&temp, sizeof temp);
  	sin = (struct sockaddr_in *)&temp;
  	sin->sin_family = AF_INET;
  	sin->sin_port = 0;

Spoken: Steve Miller    Domain: steve@mimsy.umd.edu    UUCP: uunet!mimsy!steve
Phone: +1-301-454-1808  USPS: UMIACS, Univ. of Maryland, College Park, MD 20742

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

Date:    Thu, 7 Jan 88 17:36:42 PST
From:    dgh@sun.com (David Hough)
Subject: Floating-Point Programmer's Guide for the Sun Workstation

is a manual distributed in the SunOS 3.2 document box.  I frequently tell
people to read it; less frequently they do so, but often they learn more
than they wanted to know. 

The general scope of the manual is everything you need to know about
numerical scientific and engineering computation on Suns that you can't
find anywhere else.

Anyway, the time has come (and passed) to revise it to encompass the sys4
and 4.0 releases.  If you have had occasion to look in the 3.2 version and
have not been able to find the answer to a question that should have been
answered there, please send me mail telling about it.

When I have finished the first draft I'll so announce here and offer
interested parties the opportunity the review it.

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

Date:    Sat, 2 Jan 88 17:47:04 est
From:    science@nems.ARPA (Mark Zimmermann)
Subject: Programs to do inverted indices

Forwarded by fox@vtopus.cs.vt.edu (Ed Fox)

Hi there!  Ed, if you could forward this note to SUN-SPOTS and/or to Igor
Metz, who asked about text retrieval software for the Sun, I'd greatly
appreciate it -- I am terrible at figuring out addresses to send things to
from here, and my mailer is even worse.

I wrote up a bunch of programs in C about 6 months ago that run on Sun,
VAX, Macintosh, etc., which generate simple complete inverted indices to
every word in an ascii text file.  (Leaving out 'stop words' turns out to
be something of a waste of the computer's time and doesn't save a
significant amount of disk space either.)  If anybody wants to see copies
of the best of these programs, 'qndxr.c' and 'brwsr.c', and can get me an
address on the net to send them to (from arpanet, from a picky mailer) I'd
be more than happy to do so.

'qndxr.c' is about 50 kB long, including comments, and seems pretty
transportable ... I've sent out dozens of copies and haven't heard of any
bugs from the latest version.  It takes an arbitrarily-large text file
(disk space limits you, until you get to 2 or 4 GB where my 32-bit
pointers run out) and breaks it up into chunks that fit into memory, then
does a quicksort on pointers to every word in the chunk, and writes the
resulting chunks of index files to disk ... then, it goes through and
merges the chunks of index together until there is a single (pair) of
index files (one holding keys, the other holding pointers to every
occurrence of words).  Very very simple ... I'm working on extensions, but
more on that later.

Current version seems to build indices at roughly 10-15 MB/hour pace on a
Sun or Mac II, and at 3-4 MB/hour on a Mac Plus....

'brwsr.c' lets you browse through the index ... gives you a display of
words and their occurrence rates, like:

   100 aardvark
  9876 aaron
    21 aarons

etc.  If you are interested in aardvarks, you can pop down into a complete
key-word-in-context display of the occurrences of the string aardvark (all
100 of them), like: was eaten by a voracious aardvark in 1492, when his
boat landed...  took the left leg of his aardvark and painted it blue
without a...  among the earliest known aardvark civilizations.  Now it can
be...  etc.  Then, if any of these lines of the KWIC display look
promising, you can pop down into the full text around that chosen line,
and read, copy to a file of notes, etc.  The C code for brwsr is also
about 50 kB long including comments.

I have been spending the past few weeks rewriting most of the above to
integrate it into HyperCard (Macintosh program ... my routines become
external functions and commands) ... should have some good stuff to start
distributing in a few weeks, if all goes well.  My sabbatical time is
running out, so my work will be slower next year, alas.

Oh, I forgot to mention, 'brwsr.c' above has simple proximity searching.
You can define a working subset of the dataspace as, for example, only to
include words within a few sentences of '1492', for instance, in which
case the index display shows the counts in that subset, e.g.,

  1/100 aardvark
 17/9876 aaron
  2/21   aarons

etc.  Now, if you ask for a KWIC display of aardvark, you only see the one
occurrence in the neighborhood of '1492'.

I use my Macintosh versions of brwsr and qndxr all the time ... have
accumulated over 12 MB of text from the past year or so of arpanet and
usenet and delphi digests, mostly related to Macintosh programming,
information retrieval, etc. -- it's easy to browse and pull out tidbits
that I vaguely recall the existence of.

As stated earlier, the programs are free (at the moment), but I can't
afford to spend a lot of time distributing them or supporting them at that
price, and my time will be even scarcer starting next week.

Best,   ^z   (Mark Zimmermann, 'science@nems.arpa')

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

Date:    5 Jan 1988 1503-EST
From:    franceus@tycho.arpa  (Paul Franceus)
Subject: TOD clock on Sun 3's

I have been reading this discussion with interest.  It seems that we have
a very interesting manifestation of this problem.  Here we have 4 Sun 3's
(3 160s and a 260).  Two of the machines appear to be keeping proper time
(the 260 and one of the 160s) while the other 2 are both messed up.  Also,
on the two that are wrong, the clock is skewing at different rates.  Seems
rather strange to me, does this make sense to anyone?

Paul Franceus
Natl. Computer Security Center

[[ The problem would not manifest itself until the machine was rebooted
(although it is possible to start it skewing without rebooting).  And
different machines skew at different rates.  There's a very good technical
reason for this, but I don't understand it well enough to explain it.  For
those who came in late....Sun provided the Sun-Spots readers with an
*official* patch to fix the leap-year clock drifting problem.  It was sent
out in digest Volume 6 Issue 1.  Everyone should get ahold of a copy of
this patch and install it as soon as possible.  --wnl ]]

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

Date:    5 Jan 88 05:13:25 GMT
From:    iuvax!ndmath!ndcheg!evan@rutgers.edu (Evan Bauman)
Subject: Problems (bug) with SunOS 3.4

I've been having some weird problems since upgrading the Sun 3/50 to SunOS
3.4 from 3.3.

For instance, I login, fire up suntools, and open up a whole slew of
shelltools and commandtools.  Then, when I'm finished, I select 'Exit
Suntools'.  This drops me back out of suntools, but a 'w' or 'who' command
indicates that several pseudo-ttys are still being used.  A quick look in
/etc/utmp verifies this.  I can fix this by going to single-user and then
back to multi-user, but this should not be necessary.

Has anyone else had this problem and if so, been able to fix it?
I know it's not a major problem.  The improvements in 3.4 outweigh
this disadvantage, but this bug makes administration difficult.

Thanks in advance for all help.

	Evan Bauman
	Univ. of Notre Dame
	..!iuvax!ndcheg!evan


[[ This problem didn't exist in 3.3?  Or 3.2?  There has been a flurry of
other articles in the digest talking about this very problem.  I was of
the impression that this "bug" has existed for as long as suntools has.
--wnl ]]

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

Date:    5 Jan 88 14:52:32 GMT
From:    harvard!vaxine!bunny!pgs@seismo.css.gov (Peter Sliwkowski)
Subject: Text Display on Sunview

In Sunview, the TEXT subwindow only allows for one fixedwidth font to be
displayed.  I need a subwindow which allows for the display of a
fixedwidth font with multiple text attributes such as bold,underline,and
italics.

Does anyone know of someone who has develop such a text display window for
Sunview?  If not for other windowing system such as X or NeWS?

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

Date:    Thu, 7 Jan 88 16:38:00 EST
From:    <erm@williams.edu>
Subject: Help with kernel configuration

I know this is a RTFM questions, and I'm pretty sure I've seen the answer,
but of course I can't find it now ...

I'm a believer in custom kernels, rather than using GENERIC
indiscrimanetly.  I'm currently tweeking a Sun-3/140 machine.  It works
fine with GENERIC, but which specific cpu type is it.  I've tried both
3/110 and 3/160, but neither worked completely and I may have had
something else off.  Anyone out there know the right way to do it ??

Evan R. Moore
Williams College Computer Center
BITNET: 91ERM@WILLIAMS
Internet: erm@cs.williams.edu
CSnet: erm@williams.edu

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

Date:    Tue, 05 Jan 88 16:29:01 -0500
From:    randy@ncifcrf.gov
Subject: Laser printers over Ethernet?

I am interested in the experiences and recommendations of people who have
laser printers running as shared devices off of an ethernet from Unix
boxes (specifically Suns, since that's what I'm running).  What are you
using?  How reliable, fast, and generally satisfactory is the beast?  What
resolution does it have and does it do color?  I'll accept info on all
types of Laser printers, but I'm most interested in Postscript engines
(probably no big suprise there).  Our systems are about ready for some
hardcopy, and I thought I'd tap into the availible netxpertise.  If there
is interest (say more than four requests) I'll post a summary.  Thanks in
advance for any and all help.

				-- Randy

P.S.  Cross-posted by hand to comp.laser-printers and the sun-spots
mailing list.


  Randy Smith    @	NCI Supercomputer Facility
  c/o PRI, Inc.		Phone: (301) 698-5660                  
  PO Box B, Bldng. 430  Uucp: ...!uunet!ncifcrf.gov!randy
  Frederick, MD 21701	Arpa: randy@ncifcrf.gov

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

Date:    Thu, 17 Dec 87 16:01:39 EST
From:    Steve Graham <sgraham%watdragon.waterloo.edu@relay.cs.net>
Subject: Retaining a drawing on a panel?

I am trying to build a panel to represent a tree (actually a directed
acyclic graph). The nodes are implemented as panel items (buttons) so they
can be selected and hence cause a pre-specified action to occur.  I am
having trouble building the arcs. I thought I could implement them by
calling pw_vector using the pixwin of the panel.  This partially works,
but the panel painting routine appears to be not displaying the vector
when the panel is repainted (ie after the portion with the vector is
scrolled off of the window and back into it).

Is there some way to figure out where the Pixwin for the panel is, modify
this pixwin by drawing pw_vectors on it and make sure that this modified
pixwin is somewhat permanent, (ie the vectors won't disappear when the
panel is scrolled)?

sgg

please respond by e-mail

U. of Waterloo Office Automation Lab
sgraham@watdragon

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

Date:    Thu, 7 Jan 88 19:29:04 EST
From:    Mike Jipping <jipping@cs.hope.edu>
Subject: Adding a node to a server-based system?

We're just getting our Sun network going.  We've been four months with a
server and a single (1) diskless client.  Now we've got another node to
add to the net and more on the way (months from now).

Here's from the I-Can't-Believe-This department.  Apparently, I should
have made room for future diskless nodes when I ran "setup" to set up the
initial configuration.  I didn't.  Thus, I have to set up new partitions
and all that.  The system administration manual is real foggy on this, so
I call Sun software support.  The support guy tells me I botched it back
at setup time and that I have to run "setup" again NOW to add the node
properly.  

Now, pardon me, but that's crazy.  There's a lot of stuff out there on the
disks.  Running "setup" means trashing the disks, initializing the
appropriate files in "/etc" and all, THEN re-installing 3.2 AND 3.4, THEN
restoring the old files from tape.  What a mess!  We're looking at a day's
worth of aggravation just to add a node onto the network.

Did I just screw up?  Does everyone make extra partitions "in case" they
get new nodes?  And, most importantly, is there a better way?  It would
seem to me that just a few files need to be modified (e.g.,
"/etc/nd.local"), and some initialization should take place.  Clue me in!

Thanks.

-- Mike Jipping
   Department of Computer Science
   Hope College
   jipping@cs.hope.edu

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

Date:    Wed, 6 Jan 88 14:31:40 EST
From:    Steve M. Burinsky <smb@mimsy.umd.edu>
Subject: Using keyboard and monitor with console on ttya?

I would like to run my console on ttya (mainly so I can have a paper log
of all console messages) but still use the Sun keyboard and monitor for
running suntools.  How can I do this?

I have tried changing the primary terminal at the monitor level.  That
does cause ttya to be the console, but leaves the Sun keyboard and monitor
useless (as far as I can tell so far).  Any sugesstions?

Steve
smb@mimsy.umd.edu

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

Date:    Thu, 7 Jan 88 10:03:40 EST
From:    Brook_Milligan@um.cc.umich.edu
Subject: Good random number generators?

Does anyone have a *good* random number generator that will produce double
precision numbers in the interval [0, 1)?  Either a function that will
convert long integers (produced by the library function random, for
example) to double precision or an entirely independent generator would be
suitable.  I need to link the function to existing C programs.

Thanks for any help you can give.

Brook Milligan
Department of Biology
University of Michigan
Ann Arbor, Michigan  48109
(313) 747-0898
Brook_Milligan@um.cc.umich.edu

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

Date:    Mon, 4 Jan  1988 16:29:25
From:    lacy@allegra.uucp
Subject: MIDI interface for Suns?

Does anyone know of a midi-interface for Suns?

thanks,
jack lacy (allegra!lacy)
bell labs (201)582-7711

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

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