Sun-Spots-Request@RICE.EDU (William LeFebvre) (07/29/88)
SUN-SPOTS DIGEST Wednesday, 27 July 1988 Volume 6 : Issue 155 Today's Topics: Re: How do I make an IBM readable tape on a SUN Re: Bell problems & X10 Re: XDR Question Re: Amount of virtual memory Re: "My Mac can do it, why can't the Sun?" Sun 4.0, shared objects, and dbx Ansitape correction- Not ftp'able Bug in SunOS_3.5 C compiler Update to Unix domain socket bug problem SunOS 4.0 on a non-Sun server? Performance of lots of disks on one Xylogics controller? IBM-BITNET host running VM as a gateway? Suns on a Novell Network? Send contributions to: sun-spots@rice.edu Send subscription add/delete requests to: sun-spots-request@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@rice.edu" or mail the word "help" to the same address for more information. ---------------------------------------------------------------------- Date: Fri, 15 Jul 88 09:55:16 EDT From: John Laird <laird@bgsu.edu> Subject: Re: How do I make an IBM readable tape on a SUN > ...The files I want to move > are all c source (hence ascii text). I think the IBM can handle the > ASCII-EBCDIC conversion, but if I can preconvert on the sun that would > make me more confident.... Anybody know how to do this? I have written a script and a program for that purpose. The script allows the user to skip tape files, specify the logical record length (lrecl) and block size (blksize), and to create any number of tape files. The associated program pads the input lines with blanks up to lrecl and then packs the lines into blocks of size blksize. As usual there are no guarantees, stated or implied, but if these are of use you're welcome to them. Two comments, though: 1) the tape is unlabeled; if a labeled tape is required, you should learn the format of the ibm tape labels and write them on the tape (one file preceeding, one file trailing the data file). 2) I suspect (but don't know) that dd does not write 2 EOF's at the end of each file. If not, the tape will have only one EOF at the end, so the ibm will not recognize it as the end-of-tape. John Laird (laird@andy.bgsu.edu [on csnet]) Dept. of Physics and Astronomy Bowling Green State Univ. ******************************** #!/bin/csh # sun2etap # this C-Shell script moves card image files from disk to EBCDIC tape. # skip files echo -n enter number of files to be skipped : set nskip = ($<) if ($nskip > 0) mt fsf $nskip @ nfile = $nskip + 1 @ lrecl = 80 @ blksize = 8000 loop: echo -n enter input file name : set infil = ($<) if ($#infil == 0) goto end echo -n enter output lrecl and blksize : set argv = ($<) if ($#argv > 0) then set argv = ($1) set lrecl = $1 if ($#argv == 2) set blksize = $2 endif block $lrecl <$infil | dd of=/dev/nrmt0 obs=$blksize conv=ebcdic,ibm echo $infil in file $nfile lrecl=$lrecl blksize=$blksize @ nfile++ goto loop end: mt rewind ******************************** #include <stdio.h> #include <strings.h> /**************************************************************/ main(argc,argv) /* block */ /* remove newlines and add trailing blanks */ /* in preparation for writing in large blocks on tape */ /* lrecl is the output logical record length */ /* each line (up to 133 characters) is read */ /* and filled out to lrecl as necessary */ int argc; char *argv[]; { char s[135]; int lrecl,len,j; lrecl = atoi(argv[1]); while( (len = getline(s,135)) != 0) { for (j=0; j<=len-2; j++) { putchar(s[j]); } for (j=len-1; j<lrecl; j++) { putchar(' '); } } } /**************************************************************/ getline(s,lim) /* from Kernighan and Ritchie */ /* s contains the string /* /* lim specifies the maximum length */ /* the actual length (incl newline and null) is returned */ char s[]; int lim; { int c,i; i = 0; while (--lim > 0 && (c=getchar()) != EOF && c != '\n') s[i++] = c; if (c == '\n') s[i++] = c; s[i] = '\0'; return(i); } ------------------------------ Date: Fri, 15 Jul 88 11:23:57 PDT From: Mark D. Baushke <mdb@silvlis.com> Subject: Re: Bell problems & X10 > To: sun!rice.edu!Sun-Spots > Date: Wed, 6 Jul 88 16:52:37 PDT > From: bchen@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. You need to have a /dev/bell for this feature to work in X10 (at least with the X10.4 Sun drivers originally distributed from MIT). The following should do the trick. % /etc/mknod /dev/bell c 12 2 % /bin/chmod ugo+rw /dev/bell % ls -l /dev/bell crw-rw-rw- 1 root 12, 2 Sep 9 1987 /dev/bell > 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? Bell on turns the bell on...it will stay on until you turn it off. The "loudness" of a bell is really the duration for which you have the bell turned on. Enjoy! Mark D. Baushke Internet: mdb%silvlis.com@sun.com Silvar-Lisco, Inc. Nameservers: mdb@silvlis.com 1080 Marsh Road Usenet: {pyramid,sun}!silvlis!mdb Menlo Park, CA 94025-1053 Telephone: +1 415 853-6411 / +1 415 969-8328 ------------------------------ Date: Fri, 15 Jul 88 12:28:34 PDT From: sxn@sun.com (Stephen X. Nahm) Subject: Re: XDR Question >Can anyone give me the general idea behind the XDR (sp?) specification. XDR (eXternal Data Representation) has been published as RFC 1014 (Request For Comments) by the folks at NIC (ARPA/DDN's Network Information Center). This doesn't mean that XDR has official approval, just that those folks are taking it seriously. (Also, Sun RPC [Remote Procedure Call] has been published as RFC 1050.) You can also find the XDR (and RPC) specification in the latest version of RPCSRC (3.9). RPCSRC 3.9 is Sun's unlicensed (read "free") source implementation of the RPC/XDR library and utilities that comprise the ONC (Open Network Computing) platform upon which NFS (Network File System) is built. RPCSRC 3.9 is available from the sun-spots archive, and was posted to comp.unix.sources earlier this year (Volume 13, if you look in the archives). [[ Uhhh, you mean volume 6 number 13 (v6n13). The original announcment appeared in volume 5 number 68 (v5n68). --wnl ]] Steve Nahm Portable ONC/NFS PS - HP is an NFS licensee ------------------------------ Date: 15 Jul 88 21:37:37 GMT From: cudcv%WARWICK.AC.UK@cunyvm.cuny.edu (Rob McMahon) Subject: Re: Amount of virtual memory In digest <v6n126> out moderator writes: >One of the constraints on process virtual memory that people tend to >forget is swap space. To get more swap space you need to either (1) >repartition your hard disk (a serious endeavor) or (2) get another disk >and do interleaved swapping. I've not tried it, but since SunOS 4.0 you should just be able to say: mkfile 16M /somewhere/useful/extraswap swapon !$ using the same route diskless clients now use ? Rob UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick ARPA: cudcv@warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England [[ Wow! I didn't realize they had done that in 4.0. --wnl ]] ------------------------------ Date: Fri, 15 Jul 88 19:06:17 EDT From: Root Boy Jim <rbj@nav.icst.nbs.gov> Subject: Re: "My Mac can do it, why can't the Sun?" > From: rochester!srs!dan@rutgers.edu > ...Both commands are one-line shell scripts: > #!/bin/csh -f -e > # print current text selection > echo "" | cat /tmp/winselection - | sed 1d | lpr -h > ... The `#!' construct only accepts one argument. The line should be recoded as: #! /bin/csh -fe Most likely the -e is being ignored. No comment on anything else. (Root Boy) Jim Cottrell <rbj@icst-cmr.arpa> National Bureau of Standards Flamer's Hotline: (301) 975-5688 The opinions expressed are solely my own and do not reflect NBS policy or agreement ------------------------------ Date: Fri, 15 Jul 88 16:14:38 edt From: panda!jpn@talcott.harvard.edu (John P. Nelson) Subject: Sun 4.0, shared objects, and dbx I have found what I believe to be a bug in the SUN 4.0 dbx. If a task should crash in a "shared object", dbx is totally confused. This makes debugging MUCH harder. Dbx should understand shared objects much better, especially since using them is the default cc behavior. The following script session demonstrates the problem. There are two C source files, both of which are compiled with the default flags (except for -g), which links in the shared "libc". Note how dbx shows me that the program DIED in "strlen", but cannot tell me the arguments, nor how it got there. Note the two different testcases: One program calls "strlen" directly (with a bad argument), and the other calls "mktemp" with a bad argument, and mktemp calls strlen. The information from dbx is IDENTICAL and insufficient in both cases. The manual lists something about running "main" before symbol information for shared objects is available, so I used the "where" command both on the core dump before running anything, and after "run"ning the program under dbx. The results are the same in either case. Obviously both programs are contrived and overly simple. It concerns me that more complex programs will be impossible to debug if we use shared "libraries". Script started on Thu Jul 14 14:29:55 1988 toysun% cat /etc/motd SunOS Release 4.0 (GENERIC) #3: Sat Apr 9 00:12:28 PDT 1988 toysun% toysun% echo '************ START OF TESTCASE #1 ****************' > /dev/null toysun% cat tst.c main() { /* this is an obvious programming error. mktemp calls strlen(arg1) */ mktemp(0); /* crash and burn */ } toysun% cc -g -o tst tst.c toysun% ldd tst -lc.0 => /usr/lib/libc.so.0.10 toysun% tst Segmentation fault (core dumped) toysun% dbx tst Reading symbolic information... Read 34 symbols (dbx) where strlen(?args?) etext(0x0) at 0xd7b71a main(0x1, 0xfffba4, 0xfffbac), line 4 in "tst.c" (dbx) run Running: tst signal SEGV (segmentation violation) in strlen at 0xd7b71a 0xd7b71a: dbeq d1,0xd7b718 (dbx) where strlen(?args?) etext(0x0) at 0xd7b71a main(0x1, 0xfffba4, 0xfffbac), line 4 in "tst.c" (dbx) quit toysun% echo '************ START OF TESTCASE #2 ****************' > /dev/null toysun% cat tst1.c main() { /* this is an obvious programming error. */ strlen(0); /* crash and burn */ } toysun% cc -g -o tst1 tst1.c toysun% ldd tst1 -lc.0 => /usr/lib/libc.so.0.10 toysun% tst1 Segmentation fault (core dumped) toysun% dbx tst1 Reading symbolic information... Read 34 symbols (dbx) where strlen(?args?) etext(0x0) at 0xd7b71a main(0x1, 0xfffba4, 0xfffbac), line 4 in "tst1.c" (dbx) run Running: tst1 signal SEGV (segmentation violation) in strlen at 0xd7b71a 0xd7b71a: dbeq d1,0xd7b718 (dbx) where strlen(?args?) etext(0x0) at 0xd7b71a main(0x1, 0xfffba4, 0xfffbac), line 4 in "tst1.c" (dbx) quit toysun% ^Z script done on Thu Jul 14 14:37:11 1988 ------------------------------ Date: Fri, 15 Jul 88 18:04:58 EDT From: Bill Arbaugh <arbaugh@hqda-ai.arpa> Subject: Ansitape correction- Not ftp'able I made a mistake. Our anonymous account was recently removed. The software is still public domain though. If you would like a copy e-mail me a note and we can make some kind of an arrangement. The program is small- only five files if I remember correctly. Bill Arbaugh Phone: (202) 694-6912 UUCP: *!uunet!cos!hqda-ai!arbaugh ARPA: arbaugh@hqda-ai.arpa ------------------------------ Date: 15 Jul 88 23:17:53 GMT From: olson@tcgould.tn.cornell.edu (olson) Subject: Bug in SunOS_3.5 C compiler /* This code demonstrates a bug in the SunOS3.5 C compiler * the problem is void and ?: interact badly */ int f() {} int g() {} void F() {} void G() {} main() { int (*h)(); void (*H)(); h = (0==0) ? f : g; /* no problem */ H = F; /* no problem */ H = G; /* no problem */ H = (0==0) ? F : G; /* ERROR, see below (this is line 17) */ } /* "t.c", line 17: operands of : have incompatible types */ Todd Olson olson@helios.tn.cornell.edu Physics Dept/Clark Hall/Cornell Univ/Ithaca NY 14853 ------------------------------ Date: 16 Jul 88 00:18:16 GMT From: cruff@handies.ucar.edu (Craig Ruff) Subject: Update to Unix domain socket bug problem I recieved this message from our local Sun office: > Received the code. Ran it on a 3/260 with 3.5, hangs the machine. > Changing the socket to AF_INET fixes the problem. The AF_UNIX is > a known bug (since 3.0), bugid 1002976. The description says that > the kernel panics...sort of misleading. The bug is listed in the > Software tech. Bulletin for June 1988, pg. 1078. > > The code works under 4.0. It seems that Sun has a haphazard policy about which bugs to fix. Release 3.0 has been out how long? And how many releases since 3.0? In all fairness, our local Sun office has been most helpful, within their limits of operation. Even they have trouble getting assistance from corporate headquarters. Craig Ruff NCAR INTERNET: cruff@ncar.UCAR.EDU (303) 497-1211 P.O. Box 3000 CSNET: cruff@ncar.CSNET Boulder, CO 80307 UUCP: cruff@ncar.UUCP ------------------------------ Date: Fri, 15 Jul 88 10:16:32 PDT From: ultra!ted@ames.arc.nasa.gov (Ted Schroeder) Subject: SunOS 4.0 on a non-Sun server? Hi, I'm supposed to try out Sun 4.0 on my workstation (diskless), but we don't have a spare SUN server to bring up to 4.0. We do, however, have an Alliant that I can use as a server. Unfortunately suninstall won't run on the alliant. After calling Alliant they tell me I need a hunk of software from sun called "D/NFS 1.0" (Diskless NFS install kit). I've tried my salesman, telemarketing, etc. at sun and nobody will fess up to knowing what this is or how I can get it. Has anybody out there tried anything silly like this (:->) and know about what I need to do to convince the Sun folks they make such a product? Any clues will be greatly appreciated. Ted Schroeder ultra!ted@Ames.arc.nasa.GOV Ultra Network Technologies 2140 Bering drive with a domain server: San Jose, CA 95131 ted@Ultra.COM 408-922-0100 ------------------------------ Date: Fri, 15 Jul 88 15:32:52 EDT From: John Hanley <hanley@cmcl2.nyu.edu> Subject: Performance of lots of disks on one Xylogics controller? Could anyone share war stories about CDC Sabre 850Mb Winchesters or about a Xylogics 451's controlling 2 disks? Positive experiences would be OK, too. Also, if you know anything about the STC 2925 Dual Speed Streaming tape, we're planning on buying one of those, too. At $12K with controller it sounds too good to be true... --hanley@cmcL2.nyu.edu ------------------------------ Date: Fri, 15 Jul 88 14:44:50 MEZ From: TS36@DFVLRGO1.BITNET Subject: IBM-BITNET host running VM as a gateway? Reference: v6n139 in v6n139 VIJAY@ITIVAX.BITNET writes: how can I arrange things so that I can use the Vax as a gateway to the wide world? his Vax sits on BITNET. I have a similar problem. my suns sit on a LAN and can TCP/IP to an IBM which sits on BITNET. I would be thankfull for any solution. exspecially those not involving our IBM system manager. schorsch pagendarm ------------------------------ Date: Fri, 15 Jul 88 16:47:07 EDT From: gotham!marine!roth@sun.com (Steve Roth) Subject: Suns on a Novell Network? Does anyone know of software that will enable a Sun 3 or Sun 4 to communicate on an ethernet LAN using Novell protocols? Thanks in advance. Steven Roth sun!gotham!marine!roth Technical Analysis Group Marine Midland Bank New York, NY ------------------------------ End of SUN-Spots Digest ***********************