Sun-Spots-Request@RICE.EDU (William LeFebvre) (11/21/87)
SUN-SPOTS DIGEST Friday, 20 November 1987 Volume 5 : Issue 62 Today's Topics: A fix for NFS problems Re: How to find the NFS file system on which a file is mounted (2) Re: Need information on Electronic Publishing Systems Re: Questions about 2400 baud tip and uucp Re: plot(5) tool Re: BUG in libmath.a on Sun 3.4 Sun and cdc wren/scsi read-modify-write on Sun's "dbx" problems Delinquent ttyp* terminals Pascal question Questions on Shoebox Upgrade CDC Drives and Sun 4/280? Anyone know how to get kadb to work with nd supplied kernels? Anyone ported timed to the Sun? CAI package for Calculus? ---------------------------------------------------------------------- Date: 12 Nov 87 05:37:38 GMT From: chris@amethyst.ma.arizona.edu (Chris Ott) Subject: A fix for NFS problems I decided to post this article, since there is a very good possibility (I think) that many other people are having the same problem. sparks@batcomputer.tn.cornell.edu (Steve Gaarder) writes: > We, too, are having lots of trouble with NFS. We have two Iris 3020's > which are set up as clients with a Vaxstation II/GPX running Ultrix > 2.0 as the server. We have the following trouble: > > 1. "pwd" does not work in most (but not all) NFS directories. It gives > "read error in .." > > 2. C-shell scripts do not work in the same directories. The error here is > "file not found". Bourne shell scripts run fine. > > 3. Occasionally, if there are 2 or more users running ld, the server > or one of the clients will crash. > > Any and all suggestions for fixes would be greatly appreciated. Students > have managed to cope ok, but our developers now refuse to work in NFS > directories. At my lab, the IRISes have a file system mounted from a Sun, and I had the same problems, initially. Fortunately, the IRISes are on maintainence, so I called the Hotline. The engineer told me the problem: the IRIS's file system uses 16-bit I-node numbers, while the Sun's file system uses 32-bit I-node numbers. I suspect you are having the same problem with your system. This is how they told me to fix it: remake the Sun's file system (the Vax's, in your case) so that only 65535 I-nodes are reserved. This way, you can never get an I-node number that is larger than the IRIS's 16 bits can represent. Unfortunately, "mkfs" only has a parameter to set the number of bytes per I-node. This isn't a real problem, though, since you just have to take the number of bytes in the file system and divide it by 65535. For example, on my file system, there are 237200000 bytes (approximately). Divide it by 65535 and you get 3620. So, when I did the "mkfs", I told it to allocate one I-node for every 3620 bytes. Of course, the Vax may use blocks instead of bytes, in which case you will have to convert the size of the file system to blocks. If it helps any, the name of the "mkfs" parameter in the "man" pages for my system is "nbpi". It may be different for yours, but I'm not sure. I haven't had any problems since. Chris Ott Computer-Aided Engr. Lab It is impossible to make anything foolproof University of Arizona because fools are so ingenious. Internet: chris@spock.ame.arizona.edu UUCP: {allegra,cmcl2,hao!noao}!arizona!amethyst!spock!chris ------------------------------ Date: Thu, 12 Nov 87 10:10:05 EST From: Dan Trinkle <trinkle@purdue.edu> Subject: Re: How to find the NFS file system on which a file is mounted (1) I have several programs that do this, they work on SunOS 3.2, 3.4, Mt. Xinu BSD with NFS, and Sequent Dynix 3.0. You stat() the file, check the major device (using major() macro) to see that it is 0xFF (NFS, at least in my experience), then use the minor device as an index into the mntent table. Beware that the minor device is the number (0 based) of the nfs type mount (don't count 4.2 types). Here is the source for the program I have called fstat that demonstrates the feature. It is called fstat, a user command interface to stat() information. You must define -DNFS to get NFS stuff to work. Daniel Trinkle trinkle@cs.purdue.edu ARPA Computer Science Department trinkle%purdue.edu@relay.cs.net CSNET Purdue University {ucbvax,decvax,ihnp4}!purdue!trinkle UUCP West Lafayette, IN 47907 (317) 494-7844 PHONE [[ The program is too large to include in a digest. It is in the archives as "sun-source/fstat.c". It can be retrieved via anonymous FTP from the host "titan.rice.edu" or via the archive server. For more information about the archive server, send a mail message containing the word "help" to the address "archive-server@rice.edu". --wnl ]] ------------------------------ Date: 13 Nov 87 01:59:43 GMT From: eggert@grand.sm.unisys.com (Paul Eggert) Subject: Re: How to find the NFS file system on which a file is mounted (2) Try statfs(2). Use getmntent(3) + statfs(2) to grab the fsids of all the mounted file systems; then compare your file's fsid to the list. This will work unless the mount table changes underneath you. The following program (with dumb memory management, and with error checking replaced by abort()) prints the name of a filesystem given the name of a file in that filesystem. [[ This one is much shorter than fstat.c. --wnl ]] #include <stdio.h> #include <mntent.h> #include <sys/types.h> #include <sys/vfs.h> #define FSIDS 100 int fss; fsid_t fsid[FSIDS]; char dir[FSIDS][100]; initialize() { struct statfs s; struct mntent *m; FILE *f = setmntent("/etc/mtab", "r"); if (!f) abort(); while ((m = getmntent(f))) { if (sizeof(dir[0]) <= strlen(m->mnt_dir)) abort(); strcpy(dir[fss], m->mnt_dir); if (statfs(m->mnt_dir, &s) < 0) abort(); if (FSIDS <= fss) abort(); fsid[fss++] = s.f_fsid; } endmntent(f); } char *file_system_name(f) char *f; { int i; struct statfs s; if (statfs(f, &s) < 0) abort(); for (i=0; i<fss; ++i) if ( fsid[i].val[0] == s.f_fsid.val[0] && fsid[i].val[1] == s.f_fsid.val[1] ) return dir[i]; abort(); return 0; } main(argc, argv) char **argv; { initialize(); while (*++argv) printf("%s\n", file_system_name(*argv)); return 0; } ------------------------------ Date: Fri, 13 Nov 87 10:25:23 EST From: "H.David Scarbro" <ileaf!io!penguin!hds%umb.edu@relay.cs.net> Subject: Re: Need information on Electronic Publishing Systems Interleaf has an email address that requests for information or literature and questions can be sent to. It is: UUCP: ..!{sun!sunne,harvard!umb}!leafmail-misc!hds Internet: ileaf!leafmail-misc@umb.edu H. David Scarbro UUCP: ..!{sun!sunne,harvard!umb}!ileaf!hds Internet: ileaf!hds@umb.edu Interleaf, Inc., Ten Canal Park, Cambridge, MA 02141 ------------------------------ Date: Sun, 15 Nov 87 02:48:03 EST From: harvard!spdcc!m2c!applix!jim@rutgers.edu (Jim Morton) Subject: Re: Questions about 2400 baud tip and uucp tip and uucico support for the Hayes 2400 modem command set is only supported in SunOS 3.2 and later. Jim Morton, APPLiX Inc., Westboro, MA UUCP: ...ames!harvard!m2c!applix!jim ...rutgers!harvard!m2c!applix!jim ------------------------------ Date: Thu, 12 Nov 87 05:31:17 PST From: shipley%widow.Berkeley.EDU@lilac.berkeley.edu Subject: Re: plot(5) tool There is a Program called xplot on hoser.berkeley.edu [128.32.152.19] (look in X/berkeley/xplot via anonymous ftp) that works well. I did not write this program I am just passing the information along. Pete Shipley: email: shipley@violet.berkeley.edu ucbvax!violet!shipley [[ As the name implies, this is an X program. I believe the original poster wanted a SunView plot tool. But thanks for the information. --wnl ]] ------------------------------ Date: Thu, 12 Nov 87 16:16:59 CST From: William LeFebvre <phil@Rice.edu> Subject: Re: BUG in libmath.a on Sun 3.4 Remember the "bug" in libmath.a that was mentioned in issue 58? Basically, log(-10.1) returns NaN like it is supposed to, but errno doesn't get set to 33. In my remark I said "Under 3.2, this program behaves correctly". I was wrong. Someone from Sun has pointed out to me that SVID compatibility is not guaranteed unless you compile with -fsoft. The original poster said that he had a Sun3/75 with 68881. Presumably, he compiled with -f68881. I just checked, and compiling the test program under V3.2 with -f68881 does indeed duplicate the problem. Errno isn't set when the 68881 generates an error. This is apparently documented somewhere deep within the Floating-Point Programmer's Guide. This problem will likely be fixed in V4.0. William LeFebvre Department of Computer Science Rice University <phil@Rice.edu> ------------------------------ Date: Thu, 12 Nov 87 21:39:57 +0100 From: helge@nta-odin.arpa (Helge Skrivervik S-DATA) Subject: Sun and cdc wren/scsi We have been manufacturing disk subsystems for the sun 3 series using the cdc wren drives for about 6 months and recommend these strongly. They are fast, stable and cheap and runs immediately on all sun3 models (we have not tested the 200 series). Here are some things to watch out for for: when setting up the disk, tell the system you are using the adaptec controller; you have to specify the minimum number of spare tracks even though these will never be used; ignore the 'bad format on volume' message; formatting id normally not required (the units come preformatted), but works fine using sun standalone diag for both drive types. The 3/60 will only run a generic kernel. I believe there are some minor incompatibilities in the scsi interface that shows up on this system because it is faster than the others. using the generic kernel probably increases the overhead enough to bypass the problem. Also, 3.4 bootsd won't work on the 3/60, use 3.2 boot. The wren 4 (300MB) won't boot a 3.2 kernel, use 3.4. Througput on continuous reads is 540kb/s for the wren 3 and about 700kb/s for the wren-4. We have about 50 systems in the field, increasing daily. With regard to the 8" disks from cdc, we have not tested these on the sun yet. It took us quit a while to get all the switch settings right on the Pyramid and the alliant, but it works (SMD), and we expect no serious problems on the suns. The speed is about average for standard SMD disks. We hope to thest the new sabre (cdc) 800 MB ESMD drive soon, and will report the results. Good luck. helge@ucbvax (sdata!helge@nta-odin.arpa) ------------------------------ Date: 11 Nov 87 15:51:45 GMT From: ll-xn!atexrd!munsell!jwf@rutgers.UUCP (Jim Franklin) Subject: read-modify-write on Sun's There is a hardware bug in the Sun-3/100 series that prevents the use of read-modify-write instructions (such as TAS, CAS) to do interprocessor synchronization across the VMEbus. Sun acknowledges this in "User's Guide to the Sun-3/100 VMEbus", Part #800-1487-01: > RMW instructions must not be used while DVMA is occurring, as the > 68020 will not relinquish and retry on deadlock during RMW cycles, > which will cause timeout bus errors. As we understand it, the block diagram for a Sun-3/100 board is essentially +---------+ +---+ +----------+ || | MC68020 |<===>| |<===>|VMEbus |<===>|| V +---------+ | | |MASTER INT| || M |SUN| +----------+ || E +---------+ |MMU| +----------+ || B |SUN LOCAL| | | |VMEbus | || U |MEMORY |<===>| |<===>|SLAVE INT |<===>|| S +---------+ +---+ +----------+ || Using a logic analyzer, we have observed that the timeout occurs if the disk controller issues AS* and DS* at approximately the same time the CPU starts to execute the CAS instruction. We have guessed that the failure is caused by the following "deadly embrace" scenario: 1. The disk controller arbitrates for, and is granted mastership of, the VMEbus. 2. The CPU starts executing the CAS instruction. As no higher priority requests are pending, the MMU begins servicing the CPU. The MMU gives the mapped address to the VMEbus master interface. 3. The Sun VMEbus master interface issues a request for the bus, but must wait for the disk controller to finish transfers before the request will be granted. 4. The disk controller asserts AS* and DS*. The Sun VMEbus slave interface decodes the address and determines that it should respond. It issues a request for the MMU, but must wait for the CPU to finish its transfer before the request is granted. This completes the "deadly embrace". Does anyone know if this hardware bug has been fixed on the Sun-3/200 series or the Sun-4? I.e., do the RMW instructions on these processors work across the VMEbus? Thanks ... {harvard!adelie,{decvax,allegra,talcott}!encore}!munsell!jwf Jim Franklin, Eikonix Corp., 23 Crosby Drive, Bedford, MA 01730 Phone: (617) 663-2115 x415 ------------------------------ Date: Thu, 12 Nov 87 17:52:57 EST From: Nathaniel Mishkin <apollo!mishkin@eddie.mit.edu> Subject: "dbx" problems I'm trying to use "dbx" and getting: Reading symbolic information... gettype: file index too large, fileindex 26, nextfile 25; at "=s60inq_port:(26,2)=*(26,3)=... The thing I'm trying to debug isn't really very large -- only about 20 modules. If I use "-g" on only a handful of the modules, the problem seems to go away. I updated to from SunOS 3.0 to 3.3 in the (apparently vain) hope that the bug would be fixed. Does anyone have any explanation or workaround? Thanks. ------------------------------ Date: Fri, 13 Nov 87 15:57 PST From: <jon@uclastro.bitnet> Subject: Delinquent ttyp* terminals To Sun Spots, A couple of general questions: a) A problem with owner-less ttyp* terminals. An example to explain the problem: You are in suntools with a shelltool, console, vt100tool, and a tektool running. You do a 'w' in the shelltool and you see (approximately): User tty what user console suntools user ttyp0 shelltool <<CONSOLE>> user ttyp1 shelltool user ttyp2 vt100tool user ttyp3 tektool Now, exit suntools without quiting any of the windows and do the 'w' command again, and you see: User tty what user console w user ttyp2 - user ttyp3 - The ttyp2 and ttyp3 users will be shown like this until someone needs ttyp2 and 3 (when creating windows, etc.). Doing a 'ps -ax' does not show any processes attached to these ttyp*'s. Why do they not get 'dequeued'? How would one get rid of them? b) Speaking of 'w', where does 'w' get its information for the 'what' field? Sometimes when I do 'w', the 'what' field for my process will show 'w', sometimes '(w)', sometimes '%%pp[[' (non-sensical characters), and sometimes apparently random file names. Other processes seem consistent, but 'w' appears to have problems with its own process. Has anyone else ever seen this? Am I going crazy? (Don't answer that :-) ). Jonathan Eisenhamer UCLA Astronomy JON@UCLASTRO.BITNET BONNIE::JON (SPAN 5828) (213) 206-8596 p.s. This is for SunOS 3.2. ------------------------------ Date: Thu, 12 Nov 87 21:42:51 +0100 From: helge@nta-odin.arpa (Helge Skrivervik S-DATA) Subject: Pascal question has anyone seen the following message from pc: 6prep.p, line 5310: stack overflow: too many local variables any hints as to what we can do (except chopping up the program...)?? helge@ucbvax (sdata!helge@nta-odin.arpa) ------------------------------ Date: Sat, 14 Nov 87 18:02:27 PST From: John Bossert <bossert@thebes.thalatta.com> Subject: Questions on Shoebox Upgrade Like many Sun users, I'm appalled at the price Sun wants to upgrade a 70 Mb shoebox to 140 Mb. Thus, I'm investigating alternatives. I have found a source for Micropolis 1355 disks (160 Mb formatted, ESDI) and Adaptec SCSI-ESDI controllers for under $1500. This looks very attractive to me (though I wish the 360 Mb 1558's were obtainable) but I have no idea as to the drawbacks. I'm looking for comments from *experienced* users who have replaced the st506 70 Mb drive in 3/50 shoeboxes with higher capacity ESDI drives. We're currently running SunOS 3.3. I'm specifically looking for comments along the lines of: Am I totally wrong in my proposed solution? Is there a better priced alternative? Better performance alternative? Will the new disk and controller just drop in? Will the existing power supply handle a bigger disk? The 1355 draws 4.3A Max at start-up, 2.0A average. Given 2 or 3 diskless 3/50's, would a shoebox with, say, 360 Mb of disk make a *adequate* server while pennies are saved for a 3/180 or such? Thanks. In-Real-Life: John Bossert, Thalatta Corporation, (+1 206 643 7187) Domain: bossert@Thalatta.COM Path: uw-beaver!uw-entropy!thebes!bossert ------------------------------ Date: Thu, 12 Nov 87 13:46:24 +0200 From: amf@bengus.cs.bgu.ac.il (Fuhrmann Amir) Subject: CDC Drives and Sun 4/280? I am currently installing A Sun 4/280, with it I am getting A Fujitsu Drive with SMD Controller. I am interested in increasing this capacity by adding other drives. A possible source is CDC. They offer high capacity disks at very low prices. They offer the following disks: 9720-368 - 368 MB (Unformatted) 9720-500 - 491 MB (Unformatted) 9720-736 - 736 MB (Unformatted) All disks have SMD-O, SMD-E and SCSI interfaces. I am interested to know if anyone has had experience with these disks at all and specifically in the configuration described. Should I expect problems? On the face of it, all seems well. Am I wrong?? Amir Fuhrmann BITNET : amf@bengus ARPA : amf%bengus.BITNET@wiscvm.wisc.edu UUCP : amf!bengus!humus!mcvax!.... (fuzzy connection) INTERNET : amf%bengus.bgu.ac.il@csnet-relay ------------------------------ Date: 14 Nov 87 23:16:01 GMT From: jason@violet.berkeley.edu (Jason Venner) Subject: Anyone know how to get kadb to work with nd supplied kernels? I can get kadb to boot, but it seems to be unable to load the kernel I want to single step. Thanx -- jason Jason Venner UUCP {tektronix,dual,sun,ihnp4,decvax}!ucbvax!jade!jason New style jason@jade.berkeley.edu ARPA | CSNET jason%jade@Berkeley.ARPA BITNET jason@ucbjade.BITNET ------------------------------ Date: 13 Nov 87 22:58:41 GMT From: trwrb!lou@aero.arpa (Lou Nelson) Subject: Anyone ported timed to the Sun? I have started to port /etc/timed from 4.3BSD and am having a lot of trouble. I'm trying to do the port to a Sun 3/280 running OS 3.2. If anyone has already done this, or has advice, please let me know. Thanks. Lou Nelson lou@aerospace.aero.org trwrb!aero!lou ------------------------------ Date: 15 Nov 87 20:00:52 GMT From: Alan Cabrera <13501ADC%msu.bitnet@rutgers.edu> Subject: CAI package for Calculus? I would like to get my hands on a CAI package that would assist calculus students in learning calculus. More specifically, I would like a graphics package that would graphically portray the method of computing volumes by cross sections and cylindrical shells. The student should be able to select simple formulas and view the shape on the screen. The student should also be able to select the number of washers/cylinders to be used to approximate the volume of the object and view the new set of washers/cylinders. Does such a package exist? It would be nice if the package ran on a Sun workstation. I don't mind a package that would have to be purchased but prefer a PD program. Thanks. ------- Alan D. Cabrera Bitnet: 13501adc@msu Computer Laboratory Internet: cabreraad@clvax1.cl.msu.edu Room 400d Computer Center Michigan State University East Lansing, Michigan 48824-1042 ------------------------------ End of SUN-Spots Digest ***********************