LifeOnSPARCstations.tioga
Pier, May 14, 1992 11:08 am PDT
Christian Jacobi, April 26, 1993 4:48 pm PDT
Life On SPARCstations
CEDAR10 —
Life On SPARCstations
or, How I Learned to Stop Worrying and Love the Calm
Ken Pier and Friends
© Copyright 1989, 1990, 1991, 1992, 1993 Xerox Corporation. All rights reserved.
Abstract: This document is intended for the DCedar user who is faced with a SPARCstation and has no knowledge of Sun or Unix. It contains some instructions and some tips for bringing up and surviving in Cedar. It does not claim to be complete. Addenda are welcome (via E-Mail to Pier:PARC:Xerox) by authoritative contributors.
Created by: Ken Pier <Pier:PARC:Xerox>
Maintained by: Ken Pier <Pier:PARC:Xerox>
Keywords: Cedar, SPARCstation, UNIX, Sun
Stored as: /Cedar10.1/CedarDoc/LifeOnSPARCstations.tioga
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

1. Introduction
Purpose of this document
This document is intended to help an individual who knows how to handle a Dorado to get from the delivery of a SPARCstation up to the point at which they are ready to initiate running Cedar again. At that point, refer to the excellent documentation in /Cedar10.1/CedarDoc/CedarPrimer.tioga. /Cedar10.1/CedarDoc/CedarDocDoc.tioga points to numerous other sources of information about Cedar which we do not duplicate here.
More detailed information on powering, booting, and halting may be found in the Sun System & Network Manager's Guide which is usually delivered with your SPARCstation documentation and may be found on various researcher shelves in the area.
IF the reader is completely unfamiliar with UNIX, AND this document fails to get the reader into Cedar, THEN get some help.
2. Getting Started
Delivery
Your SPARCstation should be delivered to you completely configured and in working condition. Your SPARCstation consists of a keyboard, which looks like a cross between the IBM PC and Apple Mac keyboards, a three-button mouse and mouse pad, a pizza box, and a display. The pizza box contains the entire workstation: power supply, processor, memory (probably 16-32 MBytes), I/O interfaces, and two 100-200 MByte hard disc drives. Sandwiched between the pizza box and the display may be a piece of plywood. The plywood provides sufficient structural strength to allow Sony color monitors to reside on top of the pizza box. The plywood is not decorative nor is it someone's idea of proper monitor height. It is structural. Don't remove it. (Mike doesn't work here anymore, you are now free to remove the plywood)
The Sun mouse not only feels awful and points with its hind-feet, but is orientation sensitive. In other words, it doesn't work well unless it is kept mostly aligned with the edges of the underlying mouse pad. In addition, you have to orient the mouse pad as well; the usual orientation has the long edge of the mouse pad parallel to long edge of the keyboard. For best results, replace the stock Sun mouse with a compatible opto-electronic LOGITECH three-button mouse (model M-CD9-SUN-8MD).
Your SPARCstation should have the latest version of the Sun operating system (as of today, May 14, 1992, that is SunOS Release 4.1.1) installed. Watch the system boot messages as they roll by for the SunOS version on your machine. The file /etc/motd should also indicate the SunOS version (type "cat /etc/motd" to a Unix shell).
Before you Begin
There is little sense in firing up your SPARCstation without the requisite user account, user name, user privileges, membership in critical user groups, and some filing space of your own called a "home directory." If you have not already acquired these resources, do so. At PARC CSL/EDL, talk to Sharon Johnson <SJohnson:PARC:Xerox> for both Cedar and Unix access.
3. Power Up and Down
Location and Use of Power Switches
Sun recommends that the pizza box be the first thing powered on and the last thing powered off as you bring the hardware up and down. The power switch for the box is inconveniently located on the back face of the box. It is small, smooth, and hard to find by feel. If possible, look at the back face of the box. The power switch is in the upper left corner of that face. It is a small rocker type switch. If you are blocked from looking at the back face of the box, try the following: hold the three middle fingers of your right hand together, then place them on the rear right corner of the upper face of the box with the rightmost finger placed on that corner. Slide your fingertips over the rear edge and down the rear face. One of the other two fingers will contact the power switch about one inch below the rear edge. Try turning the power on; if you succeed the discs will spin up and the processor will beep at you.
CAUTION: Always allow 10 seconds between turning off the power and turning it back on. This pause prevents possible damage to power supply components in your system.
To power on the display, locate the somewhat larger rocker type switches on the display housing. For the Sony color monitors, the power switch is mounted just below the front face of the monitor. Isn't that nice! For the Sun color and monochrome monitors, the power switch is located at the bottom of the rear face of the housing near the centerline. Try rotating the housing for a better look and feel of the switch.
To power down your SPARCstation, follow the directions found below for cleanly halting the system. Failing to do so may result in a damaged file system. Then, turn off first the display power and then the pizza box power. Always allow 10 seconds between turning off the power and turning it back on. This pause prevents possible damage to power supply components in your system.
Managing your Monitor Screen
Always power off your monitor when not in use for more then a few minutes. Monitors should never be left on with a static image, because it burns in. To turn the screen black helps, to turn it white is bad because the circuitry and CRT are running at full power. A black screen is less effective than turning the monitor off. Even with a black screen, there always is a current that leaks to the CRT. Because blue phosphors are less effective, a higher current circulates in the blue filament of the CRT, hence the monitor will turn yellow with time.
Modern monitors have circuitry that raises the current very slowly. High end monitors can be power cycled as often as you like without affecting performance or lifetime. There exist a rumour that monitors break when they are powered down. However, this is only true for monitors which haven't been properly powerd down for a long time. Parc CSNS will gladly repair you monitor if necessary if you help save the power.
4. Booting and Halting
Automatic Power-On Booting
Your system automatically boots every time you turn on the power. It displays several screenfulls of system status data as it grinds through the booting process. If your system doesn't boot at power-on time, try User Initiated Booting (below). If the system doesn't respond in a few seconds, turn the power off, wait at least ten seconds, and turn the power on. If the boot still fails to take place, at PARC, notify CSNS, the computer maintenance center, at extension 2670 (4SUN. Get it?).
User Initiated Booting
Simultaneously depress the STOP key (also called the L1 key) and the letter A key. The STOP key is located at the upper leftmost corner of the entire keyboard. Shortly, the message
Type b (boot), c (continue) or n (new command mode)

will appear on your screen. (If you have hit STOP-A by mistake, you can continue by typing the letter c (continue), followed by RETURN.) Type the letter b, followed by RETURN. If the system doesn't respond in a few tens of seconds, turn the power off, wait at least ten seconds, and turn the power on. If the boot still fails to take place, notify CSNS.
Halting
To halt a system in preparation for rebooting or power-off, first be certain you have finished your work, completed your edits, packed your bags, etc.
Normal Halting
Normal halting and rebooting is done with the sync command followed by the fastboot command in a UNIX shell. To get a UNIX shell in RawViewers, use the Plumb command to a PCedar CommandTool. Become superuser (ha!). Type sync; when it returns, type fastboot. You can instead terminate Cedar and do this in your console shell. In X11Viewers, don't worry about Plumb but use any old X terminal.
If you don't know the superuser password, there are two solutions. First, any user can invoke sync, so typing sync and then following the crash halt procedure (below, except type b for booting instead of n for new command) is sort of an ok way to regain control for a reboot. Another solution is to get someone with the root password to make /usr/etc/halt, /usr/etc/fastboot, and /usr/etc/reboot all "setuid root". This means a mere mortal can invoke these programs and the programs assume the root identity.
If all this makes you gag, try crash halting, described below.
Crash Halting
Simultaneously depress the STOP key (also called the L1 key) and the letter A key.
Shortly, the message
Type b (boot), c (continue) or n (new command mode)

will appear on your screen.
When you press STOP-A you are interrupting UNIX and giving control to a PROM monitor program. You can continue UNIX with the 'c' command, reboot UNIX with 'b', or enter a FORTH command interpreter with 'n'. The FORTH interpreter gives a different prompt, "ok". So STOP-A is a powerful tool, but you need to use it carefully because interrupting UNIX at arbitrary points can leave its file system in an inconsisent state.
Type the letter n, followed by RETURN.
The system will display the characters "ok" as a prompt. Type sync, followed by RETURN. The sync command helps prevent the system from losing data by synchronizing the file system. The system will sync the file system, display some messages, and begin a core dump. Simultaneously depress the STOP key and the letter A key to abort the dump (don't wait until it completes). Proceed to power-off, as above, or type reset followed by RETURN to boot the system.
If you boot by the procedure above and subsequently depress the STOP key and the letter A key, you may end up already in the dialog with the "ok" prompt. Proceed to sync and reset. Don't try other options unless you know what you are doing.
Christian's secret method for halting a sparc station
Toggle the power switch into the off position. (If you power the machine down, wait at least 10 seconds before powering up again).
If that should fail, or, if you don't find the power switch: Pull the plug. (Don't use a hammer).
5. After a sucessful boot
Deciphering your keyboard
Here is the key mapping every Cedar user needs to know:
LOOK => R9 (R9 is on the key front, not the key top)
NEXT => R12 (R12 is on the key front, not the key top)
SWAT => R15 (R15 is on the key front, not the key top)
← => ShiftDash (also known as underscore. May display
as underscore or left arrow, depending on font)
SHIFT/CTRL-← => SHIFT/CTRL-R10 (left cursor key)
^  => Shift6 (also known as caret or hat)
CAPS LOCK => not available. CapsLock doesn't work in Cedar
Logging In
After a successful boot, your SPARCstation will display a prompt like

Host login:

which is the prompt for login-in into Unix.. You may now login by typing your user name followed by RETURN; remember, it is all lower case and uses no domain notation. For example, as far as Sun/UNIX is concerned my login name is pier, not Pier.parc. Similarly, type your password.
Logging Out
To log out from a session (after you have exited Cedar), you can type either of the following to your Unix shell:
host% exit
host% logout
host% CtrlD (that's Control and D simultaneously).
6. Getting information from UNIX
Man and Apropos
If you know the name of a UNIX command, you can type the following to your Unix shell:
host% man commandName
and you will get whatever information is there, if an environment variable called your MANPATH has the right incantation in it.
If you don't know the UNIX command name but can guess a keyword on what the command does and type the following to your unix shell:
host% apropos keyword
For example, "apropos manual" produces
hostname% apropos manual
catman (8) - create the cat files for the manual
man (1) - display reference manual pages; find reference pages by keyword
man (7) - macros to format Reference Manual pages
route (8C) - manually manipulate the routing tables
whereis (1) - locate the binary, source, and manual page files for a command
xman (1) - Manual page display program for the X Window System.
xman (1) - display manual pages
if nothing else works, look for somebody who has suffered Unix for a while.
7. Life in Cedar
This section should probably be in LifeInCedar or some new folklore document. Anyway:
Starting
Cedar runs in two distinct modes. In RawViewers, Cedar takes over the display and keyboard from UNIX and runs natively in its own window system called Viewers. The advantage to RawViewers is performance speed and maximum screen real estate for Cedar. The disadvantage to RawViewers is that foreign applications needing XWindows and an X based window manager cannot run.
Here is a start-up sequence for RawViewers as seen from your machine console. Characters typed by the machine are underlined, as in machine output.
Host login: YourUserName
Password: YourPassword
host% enable cedar10.1
host% RawViewersWorld
In X11Viewers, Cedar is started from an UNIX shell in an already running X Windows world and runs within a big X window. The disadvantage to X11Viewers is that its perfrmance is less good then RawViewers. The advantage to X11Viewers is that foreign applications needing XWindows and an X based window manager can run simultaneously and Cedar doesn't monopolize the machine.
Here is a start-up sequence for X11Viewers as seen from a UNIX shell running within XWindows. Characters typed by the machine are underlined, as in machine output.
Host login: YourUserName
Password: YourPassword
host% enable cedar10.1
host% X11ViewersWorld
UNIX shells are available using either the Plumber or Bridge programs in Cedar. I recommend Bridge. To get a UNIX shell (within a Cedar world) for your local machine, type
% bridge localhost
to a Cedar CommandTool.
To get a UNIX shell for another machine (HostName), type
% bridge HostName
to a Cedar CommandTool.
Ending
For RawViewers, click the Bye mouse button at the top right corner of the Cedar screen or type Diamond and Pause simultaneously; you will end up in your console session, UNIX shell, or Bridge window, depending on how you started. Type quitworld or Control-D to cleanly exit to the UNIX shell.
Commander% quitworld
For X11Viewers, click on the button labeled X11Viewers near the top right corner of the Cedar screen; a menu of commands including ExitCedar will appear. Click on ExitCedar.
Uncaught signals, threads debugging, ...
Uncaught signals and unrecognized errors can do several things. If the Cirio debugger is already loaded, then a Cirio window will pop up. Be patient, it takes several tens of seconds to initialize Cirio. If Cirio is not around and the root of the offending process is a CommandTool, the CommandTool will offer you several options: abort, invoke Cirio, or invoke StackTrace. StackTrace is a tool which will display the call stack for the offending thread and is often enought to tell you what is wrong. See /Cedar/Documentation/StackTraceDoc.tioga.
Full file systems
Arbitrarily bad things happen when your home directory file system is 100% full or you are SModeling and the Cedar10.1 file system is 100% full or sometimes if /tmp is full. To discover the state of file systems, get to a UNIX shell and give the df command. For example:
host% df
Filesystem  kbytes  used  avail capacity Mounted on
/dev/sd0a   7548   3111  3682 46% /
...
...
palain:/    22617  12803   7552 63% /tmp←mnt/net/palain
palain:/usr  493447 398712  45390 90% /tmp←mnt/net/palain/usr
...
palain:/palain842171 814237  11090 99% /tmp←mnt/net/palain/palain
gharlane:/   19311 11690   7621 61% /tmp←mnt/net/gharlane
gharlane:/ute627423 181038   446385 29% /tmp←mnt/net/gharlane/ute
...
nadreck:/pixel1 842171 817329 7998  99% /tmp←mnt/volume/pixel1
Note that /net/palain/palain and /volume/pixel1 are each 99% full. Also note that the units in this chart are one kilobyte chunks; even though palain:/palain is 99% capacity it still has over 11 MBytes of storage available.
Emergency Save All Edits in RawViewers
Viewers can get wedged. There is no way out. You could push the Bye button with unsaved work. If Viewers wedges or you go Bye while you have unsaved edits in Cedar windows, there is hope to save the edits. Find the Commander which started your Cedar world and type:
Commander: SaveAllEdits
and it will save all the edited viewers in your world. Unnamed editor viewers will be saved on your home directory on unique files with file names starting with "SaveAllEdits-".
Emergency Save All Edits in X11Viewers
When viewers are wedged, an X11Viewers pop up menu can still be activated by deleting the window with the X window manager. In the X11Viewers main menu is a Rescues sub-menu which has a Save Edits entry.
ByeBye and Hello Again in RawViewers
If you click the Bye button, input focus will be permanently returned to your starting Commander session. IF you started Cedar from the console, your screen may go blank. Type a RETURN character to get the console visible. If the console remains invisible, Bridge to the machine from another host and try the UNIX command
host% clear𡤌olormap
To restart your Cedar session, do
Commander: rvr
which is an abbreviation for RawViewersRestart.