View Single Post
  #9   Report Post  
Posted to rec.crafts.metalworking
Christopher Tidy Christopher Tidy is offline
external usenet poster
 
Posts: 599
Default Ping: Don Nichols re. Sun workstation

Hi Don,

I can't find "top" on my Solaris 9 system. In which directory is it
normally located? It isn't a command that was introduced with Solaris
10, is it? I guess it's possible that its directory isn't in my PATH.



It is an open source program, so for Solaris 10 it is in

/opt/sfw/bin/top

I suspect that it is in the same directory for Solaris 9 -- *if* you
have installed the Software_Companion CD. Otherwise, you can download
the source and compile it yourself. This is one program which *has* to
be compiled on the OS version on which you need to use it, because it
has to dig deep into the kernel to get the information which it
displays. I've compiled it on a lot of systems over the years, each
automatically customized to the system under which I was compiling it,
including the ability to display the load on each of multiple processors
at need.


I've only got the GIMP installed from the Software Companion CD. Nothing
else. I'm thinking I'm going to re-install Solaris shortly - certain
pieces of software got corrupted, I think the result of a shared
libraries problem of some sort, and re-installing seems the simplest way
to fix everything - so I can add "top" from the Companion CD then.

I often get the feeling that shared libraries aren't such a great idea.

Here is an example from the system on which I am typing this,
cut off after what I intend to show:

================================================== ====================
load averages: 0.05, 0.04, 0.03 22:41:35
236 processes: 234 sleeping, 2 on cpu
CPU states: 90.8% idle, 0.9% user, 8.3% kernel, 0.0% iowait, 0.0% swap
Memory: 6144M real, 267M free, 663M swap in use, 7894M swap free

PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
728 dnichols 1 35 0 1576K 1336K cpu/0 0:01 3.02% find
7076 dnichols 1 59 0 175M 72M sleep 113.1H 0.25% Xsun
692 root 1 49 0 4136K 1752K cpu/1 0:01 0.20% top
696 noaccess 25 59 0 202M 98M sleep 101:39 0.04% java
7227 dnichols 1 59 0 4848K 1888K sleep 21:52 0.04% xeyes
556 root 1 59 0 2288K 800K sleep 59:57 0.02% rpc.rstatd
7242 dnichols 1 49 0 10M 5480K sleep 0:36 0.02% dtterm
7296 dnichols 1 49 0 10M 4752K sleep 0:32 0.02% dtterm
16739 dnichols 1 49 0 5696K 2576K sleep 4:59 0.02% perfmeter
16729 dnichols 1 49 0 5624K 2528K sleep 5:18 0.02% perfmeter
================================================== ====================

Note that in the "STATE" column, you will see that most
processes are showing as "sleep", but one is "cpu/1" and one is "cpu/0".
Naturally, one of the two will always show as "top", since it has to be
active to run the software to display the information.

If you have four CPUs , you will see all four on there, if the
system is busy enough. Normally most processes are using little enough
of the system so they fall off the bottom of the list. I had to start
a:

find / -name junuqe -print

to get two up high on the list at the same time. :-)


I'll try this when I get "top" installed.

It is working at byte level. You write 0x80 to set the
write-enable bit, then after you have entered the stop bit, you re-write
the contents of the time field, with a 0x0 where you had 0x80, so you
don't really care about the lost information in the lower bits.

How does 0x80 correspond to setting the write-enable bit to 1?


The register uses the MSB for the write-enable bit according to
the data which we have. 0x80 is the symbol for hex 80, which in binary
is: 1000 0000 (Broken into upper and lower nybbles corresponding to the
digits in the hex number.) So -- it sets the MSB (the write-enable bit)
to 1, and all others to zero.


I think I see. Does the "0x" indicate that the other two characters
represent a number in hexadecimal?



Yes. It is standard in 'C' -- and scanf(3) when trying to read
in numbers.

Numbers which start with [1-9] are decimal. Numbers which start
with '0' are octal -- *unless* the next character is 'x'. It is also a
standard output format in printf(3).


Thanks for explaining that. It makes sense now.

[ ... NVRAM life extension for retired machines ... ]


You might want to wire the address lines, and other inputs to
ground, so it won't pick up noise and get weird possible settings.

Good idea. This might be a simpler solution. I think I have a 5 V "wall
wart" adaptor somewhere. Or I guess I could just power up the unused
machine now and then, but that might not be so effective at preserving
the battery life.


Nope -- you need to power the chips *full* *time* to preserve
the battery life -- and they will eventually die just from shelf life
anyway. :-)


I just looked at the data sheet again. I thought at first that the
battery was rechargeable, which would seem sensible, but it seems that
it is not. Thanks for pointing this out!



Nope -- it is a coin cell -- and those are typically not
rechargeable.


Surely you can get a bunch of different kinds of rechargeable coin cell,
such as lithium-ion, NiCad and NiMH cells? I guess they aren't as common
as alkaline, lithium and silver-oxide cells, but they do exist.

I thought ST would have been smart enough to use one of these
rechargeable types in the NVRAM chip, but it seems not.

Incidentally, what exactly does the phrase "wire wrap" mean? I think
I've followed your meaning, but I've not come across that phrase before.


A method of construction which I like for quick-and-dirty
experiments. You don't have to make a PC board for it. Essentially,
each pin on each socket has a long square shaft with sharp edges. The
wire-wrap tool takes the 30 Ga solid wire and wraps it ten times around
the square pin under tension. There is enough pin length to allow three
wires to be terminated on there. There are tools which you can twirl
between thumb and index finger, or tools which operate by squeezing a
handle to get the 10 turns, or electrically or air powered guns for the
task. I have examples of all but the air powered version, and have
built entire CPU boards for a SWTP 6800 (to separate the baud rate
generation from the CPU clock generation so I could go to the full 2MHz
on the later 68B00 CPU chips). And I have built a special purpose
computer at work with multipile dual-port memory boards for a project.

It works quite well, and it is easy to revise the design at
need.


I seem to recall seeing circuits built like this under test in
laboratories before. Actually, I think I've seen one which had solder
over the wrapped wire.



Arrggghhhh! The phone company started wire-wrap -- using larger
pins and heavier gauge wires. They consider a wire-wrapped connection
to be "permanent", and a soldered connection to be "temporary", so
putting solder over a wire-wrapped connection is bad news. :-)


Strange. Intuitively I would have thought of the wire-wrapped connection
as being more temporary, but I haven't tried to dismantle one.

BTW -- for most things, unless you have set unusual things into
the EEPROM settings, such as a special boot device, you can simply use
the command "set-defaults" at the "ok" prompt. This does nothing to
restore the HOSTID and the MAC address, unfortunately. :-)


Shame it doesn't fix the HOSTID and MAC address. Would be a useful feature!



It *can't*. The other settings are constant from system to
system as default values, so they are just compiled into the
set-defaults program, but HOSTID and the MAC address *must* be unique
for each system -- so they come in the NVRAM -- and are identified by
the barcode label on the NVRAM chip. If you have licensed software, you
buy a new NVRAM clock chip from Sun, after feeding them the barcode, and
they make a replacement with the same codes.


But if you enter a HOSTID and MAC address which are incorrect for the
particular machine, but start with the right characters (I forget how
many) that'll work, won't it?

Solbourne (made SPARC clone systems) used a coin cell on the
system board in a clip-in holder, and a NVRAM for all the optional
configuration things -- but HOSTID and the MAC address were in a small
bipolar PROM chip. If you had licensed software, and you had to replace
the system board (as I did once at work) you had to transfer that
bipolar PROM to a socket in the new board. The clock chip and the NVRAM
did not have to be transferred.


Neat idea. Sun should have put the HOSTID and MAC address on an PROM
too. Are they on a PROM in the "Blade" machines?

The only SPARC clones I remember here in England were sold under the
name "Lion". I have one of their CD-Rom drives, which has a sturdy metal
case, as opposed to the awful Sun plastic case which you had to stick
nails into the side of to release the latches.

The thing is, with a web browser, you often can't be sure what's causing
the delay.


Agreed.

My won favorite browser is Opera -- for the UltraSPARC machines
and several other flavors made by other companies, but not for the older
Sun machines. (Hmm ... it is compiled as 32-bit code, so maybe it will
work with the older systems -- if the needed shared libs are present.
Of course, I download the static version, so it is less sensitive to
changes in shared libs.


My favourite browser is Netscape 7. Unfortunately I've had to switch to
using Mozilla Firefox for daily use as Netscape is no longer updated. I
still use Netscape 7 for Usenet, though. I tried Opera once, but never
liked the look of it much. I preferred the look of Netscape or Firefox,
and there didn't seem to be an advantage to using Opera.



Opera is typically much faster to start than NetScape, has the
ability to disable JavaScript, Java, and plugins (including FLASH) and
then re-enabling them on a site-by-site basis as needed.

There are multiple "skins" available for Opera, which change the
look and feel of it.


I remember there being three or four skins at the time I tried Opera,
and I didn't really like any of them. It was also somewhat unstable.

Firefox seems fine. I just wish they hadn't made the main navigation
buttons smaller when they developed Netscape 7 or Mozilla 1.5 to become
Firefox.

It can also be set to claim that it is NetScape or Internet
Explorer -- or even to "mask" as either for web sites which depend on
IE's broken behavior. :-)

*And* -- there is a setting in there which allows you to set the
behavior with control sequences -- such as ^A to move to the beginning
of the line, or ^U to erase the whole line (unix style) -- or to invoke
other things by default. I prefer the unix style setting.


At least with Sun machines, they don't seem to get slower with time like
Windows machines. One of my friends once said that Windows had a half
life of six months: i.e., the speed of your computer for most practical
purposes halves every six months.


Well ... part of that is that they get bogged down with spyware
and malware which starts chewing up CPU cycles.

Also -- the filesystem needs regular defragmenting.

And Microsoft keeps "improving" them by loading yet more stuff
in there with every service pack. :-)

And -- it all still has to continue working with ancient
programs which make it harder to patch for fixing security holes. :-)


I have never been sure how backward compatible Solaris is supposed to
be. I'm sure that on one occasion in the past I got a program intended
for Solaris 7 or 8 to run under Solaris 9.



I've run programs which I compiled under SunOs 4.1.4 in Solaris
2.6, and I believe that it is still possible in Solaris 10. Solaris 10
can run 32-bit or 64-bit mode as needed, and most programs compiled
under the earlier systems run using compatibility shared libs. Come
things (such as top) which dig deeply into the kernel, *can't* do this,
but most application programs have no problems.

I ran jove (my favorite editor) for years using an old version
compiled under SunOs 4.1.2 or SunOs 4.1.4. I recently re-compiled it to
run in 64-bit mode under Solaris 10 using the "Studio 12" compilers from
Sun. (Jove tended to have troubles compiling under gcc, which is why I
ran the older version for so long. But now Solaris 10 includes the
ability to separately download the development system (Studio 12 and
"NetBeans" -- the java-based integrated development environment.


So it's a case of often, but not always.

Many thanks,

Chris