Sun-Spots Digest, v6n140

William LeFebvre Sun-Spots-Request at RICE.EDU
Fri Jul 15 03:40:07 AEST 1988


SUN-SPOTS DIGEST          Thursday, 14 July 1988      Volume 6 : Issue 140

Today's Topics:
                       Re: 4.0 SOS questions (FTP)
                           Miranda (correction)
                   Sun 3/50 eyestrain and accommodation
                          Eye strain/headaches.
                             Diskless Booting
                            tn3270 on a Sun4?
                     Alternatives to Sun Maintenance?
                      PC-NFS and Socket connections?
                              Bell problems
             Finding which process is accessing a file system

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:    Tue,5 Jul 12:38:32 1988
From:    Mario Wolczko <mario%mushroom.computer-science.manchester.ac.uk at nss.cs.ucl.ac.uk>
Subject: Re: 4.0 SOS questions (FTP)

>The first problem is that I can't ftp into a 4.0 SOS machine unless I use
>the user name root.  All other accounts are denied access.

One possible gotcha is the use of a "non-standard" shell (ie, something
that isn't /usr/bin/sh or /usr/bin/csh).  In the ftpd man page it points
out (via the getusershell man page) that any non-standard shells should be
listed in /etc/shells.

Mario Wolczko

Dept. of Computer Science    Internet:   mario%ux.cs.man.ac.uk
The University               USENET: mcvax!ukc!man.cs.ux!mario
Manchester M13 9PL           JANET:      mario at uk.ac.man.cs.ux
U.K.                         Tel:    +44-61-275 2000 extn 6146

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

Date:    Tue, 5 Jul 88 19:42:13 WET DST
From:    dat%ukc.ac.uk at nss.cs.ucl.ac.uk
Subject: Miranda (correction)

The arpanet address for obtaining  further  information  about  the  new
release of the Miranda functional programming system is
	mira-request%ukc at nss.cs.ucl.ac.uk
this address was garbled in an earlier message.  In fact from many sites
	mira-request at ukc.ac.uk		(uucp: mcvax!ukc!mira-request)
will  work  too.   Apologies  to  people  whose requests for information
didn't get through.

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

Date:    Wed, 6 Jul 88 15:13:23 EDT
From:    tony at cortex.psych.nyu.edu (Tony Movshon)
Subject: Sun 3/50 eyestrain and accommodation

There's a growing collection of slightly muddled messages about eyestrain
in Sun-Spots these days. This contribution to the continuing saga is
provoked by some misinformation in a message from the aptly-named "Brain
in Neutral" <bin at rhesus.primate.wisc.edu>, in v6n130. In particular, the
assertion that " ...  a larger source of eyestrain is introduced if you
use windows or backgrounds that are white instead of gray or black" is
definitely *incorrect*. In fact, a major component of eyestrain in CRT
viewing is associated with viewing characters on a *dark* background.
This is because the effective contrast of light text on a dark background
is so high that it causes "contrast adaptation" in the visual pathway,
with consequent effects on accommodation. Dark text on a light background,
the usual situation on paper and on Sun screens, has lower effective
contrast and causes little contrast adaptation.

It would also be sensible to ignore the persistent concern with the
resting (or "dark") focus of accommodation. Most people view Sun screens
from distances equal or greater than normal reading distances, and there
is therefore no unusual accommodative strain involved.

"Beats" between the flicker of the Sun screen and fluorescent lighting
could be a problem. But it would be better not to remove the room lighting
altogether, because a bright screen in dark surroundings is more prone to
cause eyestrain than one in light surroundings.

[[ The assertion that black on white caused greater eyestrain was based on
the "beat" problem:  more active phosphor should make the beating more
noticeable, thus more eyestrain.  --wnl ]]

The simplest suggestion is probably the one that would work best: make
your default text font larger. I've used cour.r.16 since I got my Sun for
just that reason.

Tony Movshon

Internet:  movshon at nyu.edu
US Mail:   Visual Neuroscience Laboratory
	   Department of Psychology, NYU
	   6 Washington Place
	   New York, NY 10003
Phone:	   (212) 998-7880

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

Date:    Wed, 6 Jul 88 16:49:55 BST
From:    jeremy%informatics.rutherford.ac.uk at nss.cs.ucl.ac.uk
Subject: Eye strain/headaches.

I have read some of the articles on eye strain suffered when using sun
screens (I use a Sun 3/50).  I avoid having fluorescent lighting on and I
have tried the screen at every angle to the window and away from it.   I
do find that I am getting severe headaches by the end of a day of using
the screen a lot.  In fact I think that the main reason is the highly
reflective screen, with my eyes fighting to see through reflections,
whatever the angle to incident light.  The atmosphere is not helped by
three workstations and their noisy fans in one office, with the heat
generated.  I did not get the discomfort when using a traditional, good
quality, non-reflective screen v.d.u..  (Yes, I know I did not get
windowing etc. either).

I am astonished that Sun should have sold (or buyers bought) hardware with
reflective screens and noisy fans after all the research showing the
importance of good quality, non-reflective screens etc.. Indeed in some
countries government departments are not allowed by Health and safety
agreements to buy reflective screens etc..  A colleague of mine even found
that until he moved his screen a full desk width away from his seat he was
getting reddened, "burnt" skin on his face.

The only other problem is that the height of the screen above the desk,
being raised some seven inches, is uncomfortable, particularly as one's
paper work is not that high!  I suppose the answer is to put the machine
on a lower table?

Jeremy Isserlis
<jeremy at inf.rl.ac.uk>
<...uunet!mcvax!ukc!rlinf!jeremy>

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

Date:    6 Jul 88 15:33 -0700
From:    Dave Gagne <daveg at ee.ubc.ca>
Subject: Diskless Booting

> From:    clyde at emx.utexas.edu (Head UNIX Hacquer)
>
> We could NOT get our diskless 2/50s to successfully boot....

We were having a similar problem with our Suns.  We are running SunOS 4.0
on a Sun 3/260 with 2 ethernet boards, and are serviing clients (3/60s)
from both boards.  We initially got the clients on one side to boot, but
the ones on the other side would not boot properly.  They would download
the boot program from the tftp server correctly, and receive all the
information needed from the bootparamd (hostname, yp-domain name, and
disk-server name).  However, when they tryed to mount the root file system
from the server, they would die with a "Timeout Bus Error".

Eventually (after reading the Sun-spots article mentioned above), we tried
changing the server name.  Initially the name we were using on the
interface which worked, we were using the server name 'coho.ee.ubc.ca'.
The name on the other side was 'coho-gw.ee.ubc.ca' (note: 3 characters
longer).  We modified the 2nd name, changing it to just 'coho-gw' (in the
/etc/bootparams file on the server) and suddenly the clients began to boot
correctly!

Dave Gagne  &  Rod Barman.

daveg at ee.ubc.ca
daveg%ee.ubc.cdn%ean.ubc.ca at RELAY.CSNET


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

Date:    Wed, 06 Jul 88 14:56:01 -0400
From:    John M. Vogtle <jmvogtle at icarus.cns.syr.edu>
Subject: tn3270 on a Sun4?

We're trying to bring up tn3270 on a Sun 4/110 runnning SunOS 4.0.  tn3270
compiles just fine, but it won't run.  You see something like the
following:

	tn3270 hostname
	Trying...
	Connected to hostname.something.something
	Segmentation fault (core dumped)

This is not the way the program was advertised to work!!!  If anyone has
any ideas, please let me know.

Thanks in advance.

John M. Vogtle
Systems Programmer
Syracuse University
Internet:   jmvogtle at icarus.cns.syr.edu
AT&T Net:   (315)-443-5772
Snail Net:  221 Machinery Hall
            Syracuse University
            Syracuse, New York 13244-1260

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

Date:    Wed, 6 Jul 88 10:08:08 EDT
From:    berger at datacube.com (Bob Berger)
Subject: Alternatives to Sun Maintenance?

Has anyone had experience with companies that offer 3rd party maintenance
of Sun hardware? Sun maintenance has been very good for us, but it is very
expensive. We can not afford to have all our machines covered. So we are
looking for either less expensive contracts or places to send equipment to
be repaired a flat rates.

I know of the following places, but have not had much experience with
them:

	Motorola Field Service (!)
	214-888-2189

	Apex Computer
	206-867-1900

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

Date:    6 Jul 88 14:17:43 GMT
From:    umn-cs!com2sun!ahby at rutgers.edu ()
Subject: PC-NFS and Socket connections?

I am having no end of trouble trying to get the PC-NFS Programmers Toolkit
to allow me to connect() to a Sun server with a daemon listen()ing on a
socket.  The software I have written works perfectly between two Suns
using an AF_INET style connection, but when the client code is compiled on
a PC it invariably gives me a error code 61 (ECONREFUSED).  I would really
appreciate it if anyone out there who has made this work could get in
touch with me.

Shane P. McCarron			ATT:	+1 612 452-9522
Project Manager				UUCP:	ahby at c2s.mn.org

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

Date:    Wed, 6 Jul 88 16:52:37 PDT
From:    bchen at esvax.berkeley.edu (Benjamin Chen)
Subject: Bell problems

I'm using a Sun 3/60 running 4.3 BSD and X10.  None of my applications
echo an audio beep when it should.  I've tried 'xset b #' and it had no
effect.  I tried writing a program which sends the "bell on" command
defined in kbd.h, but all that produces is an unending bell.  What gives?

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

Date:    Tue, 5 Jul 88 17:40:09 BST
From:    Richard Tobin <richard%aiai.edinburgh.ac.uk at nss.cs.ucl.ac.uk>
Subject: Finding which process is accessing a file system

Having many remote filesystems mounted, we often wish to unmount one in
order to back it up for example.  Often, umount prints "device busy"
because a program is accessing the partition.  Here's a program that
attempts to discover which process is causing the trouble.  It knows about
open files, current directories, root directories (rare!) and active text
files.  No doubt it has many holes...

(You'll need separately compiled versions for Sun 2's and 3's, I know
nothing about Sun 4's or SunOS 4.0.)

Richard Tobin,                         JANET: R.Tobin at uk.ac.ed             
AI Applications Institute,             ARPA:  R.Tobin%uk.ac.ed at nss.cs.ucl.ac.uk
Edinburgh University.                  UUCP:  ...!ukc!ed.ac.uk!R.Tobin

[[ The program is a little long for a digest, but it is so incredibly
useful that I'm going to include it.  Every system manager will want a
copy.  It's tricky to compile if you don't have "/sys/h".  I just created
a symlink in the parent of the directory where I put the source:
../h -> /usr/include/sys, and then compiled with "-I.".  --wnl ]]

/*
 * find-fs filesystem
 *
 * Finds processes accessing an nfs file system.
 * Compile by cc -I/sys/h -o find-fs find-fs.c
 *
 * Copyright Richard Tobin, AIAI 1988 (R.Tobin at uk.ac.ed)
 * May be freely redistributed if this notice remains intact.
 */


#define KERNEL			/* so we get the stuff we need */

#include <sys/types.h>
#include <sys/file.h>
#include <sys/param.h>
#include <a.out.h>
#include <sys/time.h>
#include <sys/proc.h>
#include <sys/user.h>
#include <machine/pte.h>
#include <sys/vnode.h>
#include <sys/vfs.h>
#include <sys/stat.h>
#include <sys/text.h>
#include <stdio.h>		/* must be after vfs - sigh */
#include <mntent.h>

#undef KERNEL

struct user *get_user();
void check(), name(), get_names(), kread(), mread(), error(), xperror();
int sread();
fsid_t *fsid();
int mfd, kfd, sfd;

main(argc, argv)
int argc;
char **argv;
{
    int f;
    int k_proc, k_procNPROC;
    struct proc *proc, *procNPROC, *paddr, p;
#undef u			/* where is this??? */
    struct user *u;
    struct file file;
    struct text text;
    fsid_t *id;

    if(argc != 2)
	error("usage: find-user filesystem");

    id = fsid(argv[1]);
    printf("looking for id %x %x\n", id->val[0], id->val[1]);

    kfd = open("/dev/kmem", O_RDONLY);
    if(kfd < 0)
	xperror("open: /dev/kmem");

    mfd = open("/dev/mem", O_RDONLY);
    if(mfd < 0)
	xperror("open: /dev/mem");

    sfd = open("/dev/drum", O_RDONLY);
    if(sfd < 0)
	xperror("open: /dev/drum");

    name("_proc", &k_proc);
    name("_procNPROC", &k_procNPROC);
    get_names("/vmunix");

    kread(k_proc, &proc, sizeof(proc));
    kread(k_procNPROC, &procNPROC, sizeof(procNPROC));

    for(paddr=proc; paddr<=procNPROC; ++paddr)
    {
	kread(paddr, &p, sizeof(p));
	if(p.p_pid <= 2)	/* 1 and 2 cause problems */
	    continue;

	if(p.p_textp)
	{
	    kread(p.p_textp, &text, sizeof(text));
	    check(text.x_vptr, id, "process %d text\n", p.p_pid, 0);
	}

	if(p.p_stat == SZOMB) continue;

	u = get_user(&p);
	if(!u)
	{
	    printf("warning: couldn't read u area for process %d\n", p.p_pid);
	    continue;
	}

	check(u->u_cdir, id, "process %d current directory\n", p.p_pid, 0);
	check(u->u_rdir, id, "process %d root directory\n", p.p_pid, 0);

	for(f=0; f<NOFILE; ++f)
	{
	    if(u->u_ofile[f])
	    {
		kread(u->u_ofile[f], &file, sizeof(file));
		if(file.f_type == DTYPE_VNODE)
		    check(file.f_data, id, "process %d descriptor %d\n",
			  p.p_pid, f);
	    }
	}
    }

    exit(0);
}

void check(v, id, format, arg1, arg2)
struct vnode *v;
fsid_t *id;
char *format;
int arg1, arg2;
{
    struct vnode vnode;
    struct vfs vfs;

    if(!v)
	return;

    kread(v, &vnode, sizeof(vnode));
    kread(vnode.v_vfsp, &vfs, sizeof(vfs));
    if(bcmp(&vfs.vfs_fsid, id, sizeof(fsid_t)) == 0)
	printf(format, arg1, arg2);
}


#define MAXAD 50
struct nlist nl[MAXAD];
int *ad[MAXAD], nad=0;

void name(nm, addr)
char *nm;
int *addr;
{
    if(nad == MAXAD)
	error("too many names");

    nl[nad].n_un.n_name = nm;
    ad[nad++] = addr;
}

void get_names(file)
char *file;
{
    char buf[100];

    if(nlist(file, nl) < 0)
	error("can't nlist /vmunix");

    do
    {
	if(nl[--nad].n_type == N_UNDF)
	{
	    sprintf(buf, "can't find symbol %s", nl[nad].n_un.n_name);
	    error(buf);
	}

	*ad[nad] = nl[nad].n_value;
    }
    while(nad > 0);
}

void kread(address, buffer, size)
int size;
char *address, *buffer;
{
    extern int errno;

    if(lseek(kfd, (long)address, L_SET) == -1)
	xperror("kmem seek");
    errno = 0;
    if(read(kfd, buffer, size) != size)
	xperror("kmem read");
}

void mread(address, buffer, size)
int size;
char *address, *buffer;
{
    extern int errno;

    if(lseek(mfd, (long)address, L_SET) == -1)
	xperror("mem seek");
    errno = 0;
    if(read(mfd, buffer, size) != size)
	xperror("mem read");
}

void error(message)
char *message;
{
    fprintf(stderr, "%s\n", message);
    exit(1);
}

void xperror(message)
char *message;
{
    perror(message);
    exit(1);
}

struct user *get_user(p)
struct proc *p;
{
    /* nonsense because read from swap returns too many bytes! */
    static union
      {struct user u; char dum[(sizeof(struct user) | 4095) + 1];} ubuf;
    struct user *u = &ubuf.u;
    struct pte ptes[UPAGES], *pte;
    char *buf;
    int bytes;

    if(p->p_flag & SLOAD)
    {
	/* it's in memory */
	kread(p->p_addr, ptes, sizeof(ptes));

	for(bytes = sizeof(*u), pte = ptes, buf = (char *)u;
	    bytes > 0;
	    bytes -= NBPG, pte++, buf += NBPG)
	    mread(pte->pg_pfnum * NBPG, buf, bytes > NBPG ? NBPG : bytes);
    }
    else
    {
	/* read from swap */
	if(lseek(sfd, (long)dtob(p->p_swaddr), L_SET) == -1)
	    xperror("swap seek");
	if(read(sfd, u, sizeof(*u)) < sizeof(*u))
	    return (struct user *)0;
    }

    return u;
}

fsid_t *fsid(name)
char *name;
{
    static struct statfs fsbuf;
    struct stat statbuf;

    if(stat(name, &statbuf) < 0)
	xperror("stat");

    if(statbuf.st_dev < 0)	/* seems to mean nfs */
    {
	if(statfs(name, &fsbuf) < 0)
	    xperror("statfs");
    }
    else
    {
	fsbuf.f_fsid.val[0] = statbuf.st_dev;
	fsbuf.f_fsid.val[1] = 0;
    }

    return &fsbuf.f_fsid;
}

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

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



More information about the Comp.sys.sun mailing list